[RS6000] PowerPC -mcpu=native support
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob11505c0f31f56496b7ba7ff3b0026a68fda0995b
1 2018-11-26  Jonathan Wakely  <jwakely@redhat.com>
3         * testsuite/26_numerics/complex/requirements/more_constexpr.cc: Fix
4         failure on targets without __float128.
6 2018-11-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
8         Implement P0415 More constexpr for std::complex.
9         * include/std/complex (conj(complex<Tp>), norm(complex<Tp>)): Constexpr;
10         (real(Tp), imag(Tp)): Constexpr;
11         (operator@=(Tp), operator@=(complex<Tp>)): Constexpr;
12         (operator@(Tp,complex<Tp>), operator@(complex<Tp>,Tp)
13         operator@(complex<Tp>,complex<Tp>)): Constexpr.
14         * testsuite/26_numerics/complex/comparison_operators/
15         more_constexpr.cc: New test.
16         * testsuite/26_numerics/complex/operators/more_constexpr.cc: New test.
17         * testsuite/26_numerics/complex/requirements/
18         more_constexpr.cc: New test.
19         * testsuite/26_numerics/complex/value_operations/
20         more_constexpr.cc: New test.
21         * testsuite/26_numerics/headers/complex/synopsis.cc:
22         Add _GLIBCXX20_CONSTEXPR to applicable operators; Add missing proj().
23         * testsuite/26_numerics/headers/complex/synopsis.cc: 
24         Add _GLIBCXX20_CONSTEXPR to relevant decls.
26 2018-11-23  Martin Sebor  <msebor@redhat.com>
27             Jonathan Wakely  <jwakely@redhat.com>
29         PR libstdc++/65229
30         * python/libstdcxx/v6/printers.py (StdBitsetPrinter): Handle
31         exception thrown for std::bitset<0>.
32         * testsuite/libstdc++-prettyprinters/simple.cc: Test std::bitset<0>.
34 2018-11-23  Jonathan Wakely  <jwakely@redhat.com>
36         PR libstdc++/87308 (partial)
37         * python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Adjust regex to
38         work around PR 88166.
39         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test std::any
40         containing a local type.
42 2018-11-22  Marc Glisse  <marc.glisse@inria.fr>
44         PR libstdc++/87106
45         * include/bits/stl_algobase.h: Include <type_traits>.
46         (__niter_base): Add noexcept specification.
47         * include/bits/stl_deque.h: Include <bits/stl_uninitialized.h>.
48         (__is_trivially_relocatable): Specialize for deque.
49         * include/bits/stl_iterator.h: Include <type_traits>.
50         (__niter_base): Add noexcept specification.
51         * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
52         Add parameter for meta-programming.
53         (__relocate_a_1, __relocate_a): Add noexcept specification.
54         * include/bits/stl_vector.h (__use_relocate): Test __relocate_a.
56 2018-11-22  Jonathan Wakely  <jwakely@redhat.com>
58         PR libstdc++/85930
59         PR libstdc++/87520
60         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti)
61         [__cpp_rtti]: Define even when RTTI is enabled. Use array of
62         sizeof(type_info) so that type-punned reference binds to an object
63         of the correct size as well as correct alignment.
64         (_Sp_counted_ptr_inplace::_M_get_deleter) [__cpp_rtti]: Check for
65         _S_ti() reference even when RTTI is enabled.
66         (__shared_ptr(_Sp_make_shared_tag, const _Alloc&, _Args&&...))
67         [__cpp_rtti]: Pass _S_ti() instead of typeid(_Sp_make_shared_tag).
69 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
71         PR c++/87386
72         * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust expected
73         line.
74         * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
75         * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
76         * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
77         * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
78         * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
79         * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
81 2018-11-21  Jonathan Wakely  <jwakely@redhat.com>
83         PR libstdc++/88111
84         * include/std/memory_resource (pool_options): Add Doxygen comments.
85         * src/c++17/memory_resource.cc (pool_sizes): Only use suitable values
86         on targets with 16-bit or 20-bit size_t type.
87         (munge_options): Make default values depend on width of size_t type.
89         PR libstdc++/88113
90         * src/c++17/memory_resource.cc (bitset::size_type): Use the smaller
91         of uint32_t and size_t.
92         (bitset::size(), bitset::free(), bitset::update_next_word())
93         (bitset::max_blocks_per_chunk(), bitset::max_word_index()): Use
94         size_type consistently instead of size_t.
95         (chunk): Adjust static_assert checking sizeof(chunk).
97 2018-11-20  Ville Voutilainen  <ville.voutilainen@gmail.com>
99         Housekeeping for the effective targets of optional's tests.
100         * testsuite/20_util/optional/77288.cc: Adjust.
101         * testsuite/20_util/optional/84601.cc: Likewise.
102         * testsuite/20_util/optional/assignment/1.cc: Likewise.
103         * testsuite/20_util/optional/assignment/2.cc: Likewise.
104         * testsuite/20_util/optional/assignment/3.cc: Likewise.
105         * testsuite/20_util/optional/assignment/4.cc: Likewise.
106         * testsuite/20_util/optional/assignment/5.cc: Likewise.
107         * testsuite/20_util/optional/assignment/6.cc: Likewise.
108         * testsuite/20_util/optional/assignment/7.cc: Likewise.
109         * testsuite/20_util/optional/assignment/8.cc: Likewise.
110         * testsuite/20_util/optional/cons/77727.cc: Likewise.
111         * testsuite/20_util/optional/cons/copy.cc: Likewise.
112         * testsuite/20_util/optional/cons/deduction.cc: Likewise.
113         * testsuite/20_util/optional/cons/default.cc: Likewise.
114         * testsuite/20_util/optional/cons/move.cc: Likewise.
115         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
116         * testsuite/20_util/optional/cons/value.cc: Likewise.
117         * testsuite/20_util/optional/cons/value_neg.cc: Likewise.
118         * testsuite/20_util/optional/constexpr/cons/default.cc: Likewise.
119         * testsuite/20_util/optional/constexpr/cons/value.cc: Likewise.
120         * testsuite/20_util/optional/constexpr/in_place.cc: Likewise.
121         * testsuite/20_util/optional/constexpr/nullopt.cc: Likewise.
122         * testsuite/20_util/optional/constexpr/observers/1.cc: Likewise.
123         * testsuite/20_util/optional/constexpr/observers/4.cc: Likewise.
124         * testsuite/20_util/optional/constexpr/observers/5.cc: Likewise.
125         * testsuite/20_util/optional/constexpr/relops/1.cc: Likewise.
126         * testsuite/20_util/optional/constexpr/relops/2.cc: Likewise.
127         * testsuite/20_util/optional/constexpr/relops/3.cc: Likewise.
128         * testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
129         * testsuite/20_util/optional/constexpr/relops/5.cc: Likewise.
130         * testsuite/20_util/optional/constexpr/relops/6.cc: Likewise.
131         * testsuite/20_util/optional/in_place.cc: Likewise.
132         * testsuite/20_util/optional/make_optional.cc: Likewise.
133         * testsuite/20_util/optional/nullopt.cc: Likewise.
134         * testsuite/20_util/optional/observers/1.cc: Likewise.
135         * testsuite/20_util/optional/observers/2.cc: Likewise.
136         * testsuite/20_util/optional/observers/3.cc: Likewise.
137         * testsuite/20_util/optional/observers/4.cc: Likewise.
138         * testsuite/20_util/optional/observers/5.cc: Likewise.
139         * testsuite/20_util/optional/observers/6.cc: Likewise.
140         * testsuite/20_util/optional/relops/1.cc: Likewise.
141         * testsuite/20_util/optional/relops/2.cc: Likewise.
142         * testsuite/20_util/optional/relops/3.cc: Likewise.
143         * testsuite/20_util/optional/relops/4.cc: Likewise.
144         * testsuite/20_util/optional/relops/5.cc: Likewise.
145         * testsuite/20_util/optional/relops/6.cc: Likewise.
146         * testsuite/20_util/optional/relops/7.cc: Likewise.
147         * testsuite/20_util/optional/requirements.cc: Likewise.
148         * testsuite/20_util/optional/swap/1.cc: Likewise.
149         * testsuite/20_util/optional/swap/2.cc: Likewise.
150         * testsuite/20_util/optional/typedefs.cc: Likewise.
152 2018-11-19  François Dumont  <fdumont@gcc.gnu.org>
154         * include/ext/throw_allocator.h
155         (annotate_base::insert(void*, size_t)): Use insert result to check for
156         double insert attempt.
157         (annotate_base::insert_construct(void*)): Likewise.
158         (annotate_base::check_allocated(void*, size_t)): Return found iterator.
159         (annotate_base::erase(void*, size_t)): Use latter method returned
160         iterator.
161         (annotate_base::check_constructed(void*, size_t)): Return found iterator.
162         (annotate_base::erase_construct(void*)): Use latter method returned
163         iterator.
165 2018-11-19  Ville Voutilainen  <ville.voutilainen@gmail.com>
167         PR libstdc++/87855
168         Also implement P0602R4 (variant and optional
169         should propagate copy/move triviality) for std::optional.
170         * include/std/optional (_Optional_payload): Change
171         the main constraints to check constructibility in
172         addition to assignability.
173         (operator=): Make constexpr.
174         (_M_reset): Likewise.
175         (_M_construct): Likewise.
176         (operator->): Likewise.
177         * testsuite/20_util/optional/assignment/8.cc: Adjust.
178         * testsuite/20_util/optional/assignment/9.cc: New.
180 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
182         PR libstdc++/88084 - Implement LWG 2777
183         * include/std/string_view (basic_string_view::copy): Use traits to
184         copy.
185         * testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
186         New test.
187         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
188         New test.
190 2018-11-18  Michele Pezzutti <mpezz@tiscali.it>
191             Edward Smith-Rowland  <3dw4rd@verizon.net>
193         PR libstdc++/83566 - cyl_bessel_j returns wrong result for x>1000
194         for high orders.
195         * include/tr1/bessel_function.tcc: Perform no fewer than nu/2 iterations
196         of the asymptotic series (nu is the Bessel order).
197         * testsuite/tr1/5_numerical_facilities/special_functions/
198         09_cyl_bessel_j/check_value.cc: Add tests at nu=100, 1000<=x<=2000.
199         * testsuite/tr1/5_numerical_facilities/special_functions/
200         11_cyl_neumann/check_value.cc: Ditto.
201         * testsuite/special_functions/08_cyl_bessel_j/check_value.cc: Ditto.
202         * testsuite/special_functions/10_cyl_neumann/check_value.cc: Ditto.
204 2018-11-17  Jonathan Wakely  <jwakely@redhat.com>
206         Implement std::pmr::synchronized_pool_resource
207         * config/abi/pre/gnu.ver: Add new symbols.
208         * include/std/memory_resource [_GLIBCXX_HAS_GTHREADS]
209         (__cpp_lib_memory_resource): Define to expected value, 201603.
210         (synchronized_pool_resource): New class.
211         [!_GLIBCXX_HAS_GTHREADS] (__cpp_lib_memory_resource): Define to 1.
212         * include/std/shared_mutex (__glibcxx_rwlock_rdlock)
213         (__glibcxx_rwlock_tryrdlock, __glibcxx_rwlock_wrlock)
214         (__glibcxx_rwlock_trywrlock, __glibcxx_rwlock_unlock)
215         (__glibcxx_rwlock_destroy, __glibcxx_rwlock_init)
216         (__glibcxx_rwlock_timedrdlock, __glibcxx_rwlock_timedwrlock): Define
217         weak symbols for POSIX rwlock functions.
218         (__shared_mutex_pthread): Use weak symbols.
219         * include/std/version (__cpp_lib_memory_resource): Define.
220         * src/c++17/memory_resource.cc [_GLIBCXX_HAS_GTHREADS]
221         (synchronized_pool_resource::_TPools): New class.
222         (destroy_TPools): New function for pthread_key_create destructor.
223         (synchronized_pool_resource::synchronized_pool_resource)
224         (synchronized_pool_resource::~synchronized_pool_resource)
225         (synchronized_pool_resource::release)
226         (synchronized_pool_resource::do_allocate)
227         (synchronized_pool_resource::do_deallocate): Define public members.
228         (synchronized_pool_resource::_M_thread_specific_pools)
229         (synchronized_pool_resource::_M_alloc_tpools)
230         (synchronized_pool_resource::_M_alloc_shared_tpools): Define private
231         members.
232         * testsuite/20_util/synchronized_pool_resource/allocate.cc: New test.
233         * testsuite/20_util/synchronized_pool_resource/cons.cc: New test.
234         * testsuite/20_util/synchronized_pool_resource/is_equal.cc: New test.
235         * testsuite/20_util/synchronized_pool_resource/multithreaded.cc: New
236         test.
237         * testsuite/20_util/synchronized_pool_resource/release.cc: New test.
238         * testsuite/performance/20_util/memory_resource/pools.cc: Add
239         multithreaded tests using pmr::synchronized_pool_resource.
241 2018-11-16  Renlin Li  <renlin.li@arm.com>
242             Tejas Belagod  <tejas.belagod@arm.com>
244         testsuite/lib/libstdc++.exp (check_v3_target_prop_cached): New proc.
245         (check_v3_target): Use the check_v3_target_prop_cached.
247 2018-11-15  Jonathan Wakely  <jwakely@redhat.com>
249         * scripts/check_performance: Allow tests to choose a -std flag.
250         * src/c++17/memory_resource.cc (bitset::get_first_unset()): Use local
251         variables of the right types. Call update_next_word() unconditionally.
252         * testsuite/20_util/unsynchronized_pool_resource/cons.cc: New test.
253         * testsuite/performance/20_util/memory_resource/pools.cc: New test.
254         * testsuite/util/testsuite_performance.h (time_counter): Allow
255         timer to be restarted.
257         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Fix
258         test for 32-bit targets. Test additional allocation sizes.
260 2018-11-14  Jonathan Wakely  <jwakely@redhat.com>
262         * scripts/create_testsuite_files: Add special_functions to the list
263         of directories to search. Add comment referring to conformance.exp.
264         * testsuite/libstdc++-dg/conformance.exp: Add comment referring
265         to create_testsuite_files.
267 2018-11-13  Jonathan Wakely  <jwakely@redhat.com>
269         * src/c++17/memory_resource.cc (select_num_pools): Fix off-by-one
270         error when block_size is equal to one of the values in the array.
272         * src/c++17/memory_resource.cc (_Pool::deallocate): Restore
273         attributes to parameters that are only used in assertions.
275         * src/c++17/memory_resource.cc (bitset::find_first_unset()): Remove
276         unused function.
277         (bitset::get_first_unset()): Remove loop, if there's are unset bits
278         then _M_next_word refers to the first one and there's no need to loop.
279         (_Pool::_Pool(size_t, size_t), _Pool::block_size()): Remove dead code.
281         * src/c++17/memory_resource.cc (munge_options): Round up value of
282         largest_required_pool_block to multiple of smallest pool size. Round
283         excessively large values down to largest pool size.
284         (select_num_pools): Increase number of pools by one unless it exactly
285         matches requested largest_required_pool_block.
286         (__pool_resource::_M_alloc_pools()): Make largest pool size equal
287         largest_required_pool_block.
288         * testsuite/20_util/unsynchronized_pool_resource/options.cc: Check
289         that pool_options::largest_required_pool_block is set appropriately.
291         * src/c++17/memory_resource.cc (big_block): Improve comments.
292         (big_block::all_ones): Remove.
293         (big_block::big_block(size_t, size_t)): Use alloc_size.
294         (big_block::size()): Add comment, replace all_ones with equivalent
295         expression.
296         (big_block::align()): Shift value of correct type.
297         (big_block::alloc_size(size_t)): New function to round up size.
298         (__pool_resource::allocate(size_t, size_t)): Add comment.
299         (__pool_resource::deallocate(void*, size_t, size_t)): Likewise. Fix
300         incorrect assertion by using big_block::alloc_size(size_t).
301         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Add
302         more tests for unpooled allocations.
304         * src/c++17/memory_resource.cc (bitset::full()): Handle edge case
305         for _M_next_word maximum value.
306         (bitset::get_first_unset(), bitset::set(size_type)): Use
307         update_next_word() to update _M_next_word.
308         (bitset::update_next_word()): New function, avoiding wraparound of
309         unsigned _M_next_word member.
310         (bitset::max_word_index()): New function.
311         (chunk::chunk(void*, uint32_t, void*, size_t)): Add assertion.
312         (chunk::max_bytes_per_chunk()): New function.
313         (pool::replenish(memory_resource*, const pool_options&)): Prevent
314         _M_blocks_per_chunk from exceeding max_blocks_per_chunk or from
315         causing chunk::max_bytes_per_chunk() to be exceeded.
316         * testsuite/20_util/unsynchronized_pool_resource/allocate-max-chunks.cc:
317         New test.
319 2018-11-12  Jason Merrill  <jason@redhat.com>
321         * libsupc++/new (std::destroying_delete_t): New.
323 2018-11-12  Jonathan Wakely  <jwakely@redhat.com>
325         PR libstdc++/87963
326         * src/c++17/memory_resource.cc (chunk::_M_bytes): Change type from
327         unsigned to uint32_t.
328         (chunk): Fix static assertion for 64-bit targets that aren't LP64.
329         (bigblock::all_ones): Fix undefined shift.
331 2018-11-11  Hans-Peter Nilsson  <hp@axis.com>
333         PR libstdc++-v3/54005
334         * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
335         __atomic_base<_PTp*>::is_lock_free()): Call __atomic_is_lock_free
336         with the type-derived _S_alignment instead of __alignof the object.
337         * include/std/atomic (atomic<T>::is_lock_free()): Likewise.
339 2018-11-11  Jonathan Wakely  <jwakely@redhat.com>
341         Implement P0318R1 unwrap_ref_decay and unwrap_reference
342         * include/std/type_traits (unwrap_reference, unwrap_reference_t)
343         (unwrap_ref_decay, unwrap_ref_decay_t): New traits and aliases.
344         * testsuite/20_util/unwrap_reference/1.cc: New test.
345         * testsuite/20_util/unwrap_reference/2.cc: New test.
347         Implement P1007R3 std::assume_aligned
348         * include/std/memory (assume_aligned): Implement for C++17.
349         * testsuite/20_util/assume_aligned/1.cc: New test.
350         * testsuite/20_util/assume_aligned/2_neg.cc: New test.
351         * testsuite/20_util/assume_aligned/3.cc: New test.
353 2018-11-09  Jonathan Wakely  <jwakely@redhat.com>
355         PR libstdc++/87787
356         * include/bits/stl_uninitialized.h (__relocate_a_1): Do not call
357         memmove when there's nothing to copy (and pointers could be null).
359 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
361         * configure: Regenerated.
363 2018-11-07  Jonathan Wakely  <jwakely@redhat.com>
365         * config/abi/pre/gnu.ver: Fix patterns for size_t parameters.
367 2018-11-06  Jonathan Wakely  <jwakely@redhat.com>
369         Implement std::pmr::unsynchronized_pool_resource
370         * config/abi/pre/gnu.ver: Add new symbols.
371         * include/std/memory_resource (std::pmr::__pool_resource): New class.
372         (std::pmr::unsynchronized_pool_resource): New class.
373         * src/c++17/Makefile.am: Add -fimplicit-templates to flags for
374         memory_resource.cc
375         * src/c++17/Makefile.in: Regenerate.
376         * src/c++17/memory_resource.cc (bitset, chunk, big_block): New
377         internal classes.
378         (__pool_resource::_Pool): Define new class.
379         (munge_options, pool_index, select_num_pools): New internal functions.
380         (__pool_resource::__pool_resource, __pool_resource::~__pool_resource)
381         (__pool_resource::allocate, __pool_resource::deallocate)
382         (__pool_resource::_M_alloc_pools): Define member functions.
383         (unsynchronized_pool_resource::unsynchronized_pool_resource)
384         (unsynchronized_pool_resource::~unsynchronized_pool_resource)
385         (unsynchronized_pool_resource::release)
386         (unsynchronized_pool_resource::_M_find_pool)
387         (unsynchronized_pool_resource::do_allocate)
388         (unsynchronized_pool_resource::do_deallocate): Define member
389         functions.
390         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: New
391         test.
392         * testsuite/20_util/unsynchronized_pool_resource/is_equal.cc: New
393         test.
394         * testsuite/20_util/unsynchronized_pool_resource/options.cc: New
395         test.
396         * testsuite/20_util/unsynchronized_pool_resource/release.cc: New
397         test.
399 2018-11-06  John Bytheway  <jbytheway@gmail.com>
401         PR libstdc++/87872
402         * include/debug/safe_sequence.tcc
403         (_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.
405 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
407         PR bootstrap/82856
408         * Makefile.am: Include multilib.am.
409         * configure.ac: Remove AC_PREREQ.
410         * Makefile.in, aclocal.m4, configure, doc/Makefile.in,
411         include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
412         python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
413         src/c++17/Makefile.in, src/c++98/Makefile.in,
414         src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
416 2018-10-31  Jonathan Wakely  <jwakely@redhat.com>
418         * testsuite/20_util/pair/87822.cc: Test deeper nesting.
420         PR libstdc++/87822
421         * include/bits/stl_pair.h (__pair_base): Change to class template.
422         (pair): Make base class type depend on template parameters.
423         * testsuite/20_util/pair/87822.cc: New test.
425 2018-10-30  Marek Polacek  <polacek@redhat.com>
427         Implement P0892R2, explicit(bool).
428         * testsuite/20_util/any/cons/explicit.cc: Adjust dg-error.
429         * testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
430         * testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.
432 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
434         PR libstdc++/87809
435         * include/bits/forward_list.h (_Fwd_list_impl::_Fwd_list_impl()): Use
436         trait in exception-specification instead of possibly invalid
437         expression.
438         * include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()):
439         Likewise.
440         * include/bits/stl_list.h (_List_impl::_List_impl()): Likewise.
441         * include/bits/stl_vector.h (_Vector_impl::_Vector_impl()): Likewise.
442         * testsuite/23_containers/forward_list/cons/87809.cc: New test.
443         * testsuite/23_containers/list/cons/87809.cc: New test.
444         * testsuite/23_containers/vector/bool/cons/87809.cc: New test.
445         * testsuite/23_containers/vector/cons/87809.cc: New test.
447         PR libstdc++/87784
448         * include/tr2/dynamic_bitset (dynamic_bitset::push_back): When there
449         are no unused bits in the last block, append a new block with the
450         right value so the bit doesn't need to be set. Only increment size
451         after setting the new bit, not before.
452         * testsuite/tr2/dynamic_bitset/pr87784.cc: New test.
454 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
456         * testsuite/17_intro/using_namespace_std_exp_neg.cc: Remove
457         "expected namespace-name before" error.
458         * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Likewise.
460 2018-10-28  François Dumont  <fdumont@gcc.gnu.org>
462         * testsuite/23_containers/deque/48101_neg.cc: Remove dg-prune-output
463         'std' from regex pattern for versioned namespace compatibility.
464         * testsuite/23_containers/vector/48101_neg.cc: Likewise.
465         * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
467 2018-10-25  Jonathan Wakely  <jwakely@redhat.com>
469         PR libstdc++/87749
470         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
471         (basic_string::operator=(basic_string&&)): For short strings copy the
472         buffer inline. Only fall back to using assign(const basic_string&) to
473         do a deep copy when reallocation is needed.
474         * testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
475         New test.
476         * testsuite/21_strings/basic_string/modifiers/assign/char/
477         move_assign_optim.cc: New test.
478         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
479         New test.
480         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
481         move_assign_optim.cc: New test.
483 2018-10-25  Marc Glisse  <marc.glisse@inria.fr>
485         PR libstdc++/87106
486         * include/bits/alloc_traits.h (_S_construct, _S_destroy, construct,
487         destroy): Add noexcept specification.
488         * include/bits/allocator.h (construct, destroy): Likewise.
489         * include/ext/alloc_traits.h (construct, destroy): Likewise.
490         * include/ext/malloc_allocator.h (construct, destroy): Likewise.
491         * include/ext/new_allocator.h (construct, destroy): Likewise.
492         * include/bits/stl_uninitialized.h (__relocate_object_a, __relocate_a,
493         __relocate_a_1): New functions.
494         (__is_trivially_relocatable): New class.
495         * include/bits/stl_vector.h (__use_relocate): New static member.
496         * include/bits/vector.tcc (reserve, _M_realloc_insert,
497         _M_default_append): Use __relocate_a.
498         (reserve, _M_assign_aux, _M_realloc_insert, _M_fill_insert,
499         _M_default_append, _M_range_insert): Move _GLIBCXX_ASAN_ANNOTATE_REINIT
500         after _Destroy.
501         * testsuite/23_containers/vector/modifiers/push_back/49836.cc:
502         Replace CopyConsOnlyType with DelAnyAssign.
504 2018-10-24  François Dumont  <fdumont@gcc.gnu.org>
506         * include/debug/safe_unordered_container.h
507         (_Safe_unordered_container<>::_M_invalidate_locals): Take lambda
508         parameter type from local end variable.
509         (_Safe_unordered_container<>::_M_invalidate_all): Likewise.
510         * include/debug/unordered_map
511         (unordered_map<>::begin()): Use C++11 direct initialization.
512         (unordered_map<>::end()): Likewise.
513         (unordered_map<>::cbegin()): Likewise.
514         (unordered_map<>::cend()): Likewise.
515         (unordered_map<>::begin(size_type)): Likewise.
516         (unordered_map<>::end(size_type)): Likewise.
517         (unordered_map<>::cbegin(size_type)): Likewise.
518         (unordered_map<>::cend(size_type)): Likewise.
519         (unordered_map<>::emplace<>(_Args&&...)): Likewise.
520         (unordered_map<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
521         (unordered_map<>::insert(const value_type&)): Likewise.
522         (unordered_map<>::insert(value_type&&)): Likewise.
523         (unordered_map<>::insert<>(_Pair&&)): Likewise.
524         (unordered_map<>::insert(const_iterator, const value_type&)): Likewise.
525         (unordered_map<>::insert(const_iterator, value_type&&)): Likewise.
526         (unordered_map<>::insert<>(const_iterator, _Pair&&)): Likewise.
527         (unordered_map<>::try_emplace<>(const key_type&, _Args&&...)): Likewise.
528         (unordered_map<>::try_emplace<>(key_type&&, _Args&&...)): Likewise.
529         (unordered_map<>::try_emplace<>(const_iterator, const key_type&,
530         _Args&&...)): Likewise.
531         (unordered_map<>::try_emplace<>(const_iterator, key_type&&,
532         _Args&&...)): Likewise.
533         (unordered_map<>::insert_or_assign<>(const key_type&, _Obj&&)): Likewise.
534         (unordered_map<>::insert_or_assign<>(key_type&&, _Obj&&)): Likewise.
535         (unordered_map<>::insert_or_assign<>(const_iterator, const key_type&,
536         _Obj&&)): Likewise.
537         (unordered_map<>::insert_or_assign<>(const_iterator, key_type&&,
538         _Obj&&)): Likewise.
539         (unordered_map<>::insert(note_type&&)): Likewise.
540         (unordered_map<>::find(const key_type&)): Likewise.
541         (unordered_map<>::equal_range(const key_type&)): Likewise.
542         (unordered_map<>::_M_extract): New.
543         (unordered_map<>::extract(const_iterator)): Use latter.
544         (unordered_map<>::extract(const key_type&)): Likewise.
545         (unordered_map<>::_M_erase): New.
546         (unordered_map<>::erase(const key_type&)): Use latter.
547         (unordered_map<>::erase(const_iterator)): Likewise.
548         (unordered_map<>::erase(iterator)): Likewise.
549         (unordered_map<>::_M_invalidate): New.
550         (unordered_map<>::erase(const_iterator, const_iterator)): Use latter.
551         (unordered_multimap<>::begin()): Use C++11 direct initialization.
552         (unordered_multimap<>::end()): Likewise.
553         (unordered_multimap<>::cbegin()): Likewise.
554         (unordered_multimap<>::cend()): Likewise.
555         (unordered_multimap<>::begin(size_type)): Likewise.
556         (unordered_multimap<>::end(size_type)): Likewise.
557         (unordered_multimap<>::cbegin(size_type)): Likewise.
558         (unordered_multimap<>::cend(size_type)): Likewise.
559         (unordered_multimap<>::emplace<>(_Args&&...)): Likewise.
560         (unordered_multimap<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
561         (unordered_multimap<>::insert(const value_type&)): Likewise.
562         (unordered_multimap<>::insert(const_iterator, const value_type&)): Likewise.
563         (unordered_multimap<>::insert(const_iterator, value_type&&)): Likewise.
564         (unordered_multimap<>::insert<>(_Pair&&)): Likewise.
565         (unordered_multimap<>::insert<>(const_iterator, _Pair&&)): Likewise.
566         (unordered_multimap<>::insert(note_type&&)): Likewise.
567         (unordered_multimap<>::insert(const_iterator, note_type&&)): Likewise.
568         (unordered_multimap<>::find(const key_type&)): Likewise.
569         (unordered_multimap<>::equal_range(const key_type&)): Likewise.
570         (unordered_multimap<>::_M_extract): New.
571         (unordered_multimap<>::extract(const_iterator)): Use latter.
572         (unordered_multimap<>::extract(const key_type&)): Likewise.
573         (unordered_multimap<>::_M_erase): New.
574         (unordered_multimap<>::erase(const_iterator)): Likewise.
575         (unordered_multimap<>::erase(iterator)): Likewise.
576         (unordered_multimap<>::_M_invalidate): New.
577         (unordered_multimap<>::erase(const key_type&)): Use latter.
578         (unordered_multimap<>::erase(const_iterator, const_iterator)): Likewise.
579         * include/debug/unordered_set
580         (unordered_set<>::begin()): Use C++11 direct initialization.
581         (unordered_set<>::end()): Likewise.
582         (unordered_set<>::cbegin()): Likewise.
583         (unordered_set<>::cend()): Likewise.
584         (unordered_set<>::begin(size_type)): Likewise.
585         (unordered_set<>::end(size_type)): Likewise.
586         (unordered_set<>::cbegin(size_type)): Likewise.
587         (unordered_set<>::cend(size_type)): Likewise.
588         (unordered_set<>::emplace<>(_Args&&...)): Likewise.
589         (unordered_set<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
590         (unordered_set<>::insert(const value_type&)): Likewise.
591         (unordered_set<>::insert(value_type&&)): Likewise.
592         (unordered_set<>::insert(const_iterator, const value_type&)): Likewise.
593         (unordered_set<>::insert(const_iterator, value_type&&)): Likewise.
594         (unordered_set<>::insert(note_type&&)): Likewise.
595         (unordered_set<>::insert(const_iterator, note_type&&)): Likewise.
596         (unordered_set<>::find(const key_type&)): Likewise.
597         (unordered_set<>::equal_range(const key_type&)): Likewise.
598         (unordered_set<>::_M_extract): New.
599         (unordered_set<>::extract(const_iterator)): Use latter.
600         (unordered_set<>::extract(const key_type&)): Likewise.
601         (unordered_set<>::_M_erase): New.
602         (unordered_set<>::erase(const key_type&)): Use latter.
603         (unordered_set<>::erase(const_iterator)): Likewise.
604         (unordered_set<>::erase(iterator)): Likewise.
605         (unordered_set<>::_M_invalidate): New.
606         (unordered_set<>::erase(const_iterator, const_iterator)): Use latter.
607         (unordered_multiset<>::begin()): Use C++11 direct initialization.
608         (unordered_multiset<>::end()): Likewise.
609         (unordered_multiset<>::cbegin()): Likewise.
610         (unordered_multiset<>::cend()): Likewise.
611         (unordered_multiset<>::begin(size_type)): Likewise.
612         (unordered_multiset<>::end(size_type)): Likewise.
613         (unordered_multiset<>::cbegin(size_type)): Likewise.
614         (unordered_multiset<>::cend(size_type)): Likewise.
615         (unordered_multiset<>::emplace<>(_Args&&...)): Likewise.
616         (unordered_multiset<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
617         (unordered_multiset<>::insert(const value_type&)): Likewise.
618         (unordered_multiset<>::insert(const_iterator, const value_type&)): Likewise.
619         (unordered_multiset<>::insert(value_type&&)): Likewise.
620         (unordered_multiset<>::insert(const_iterator, value_type&&)): Likewise.
621         (unordered_multiset<>::insert(node_type&&)): Likewise.
622         (unordered_multiset<>::insert(const_iterator, node_type&&)): Likewise.
623         (unordered_multiset<>::find(const key_type&)): Likewise.
624         (unordered_multiset<>::equal_range(const key_type&)): Likewise.
625         (unordered_multiset<>::_M_extract): New.
626         (unordered_multiset<>::extract(const_iterator)): Use latter.
627         (unordered_multiset<>::extract(const key_type&)): Likewise.
628         (unordered_multiset<>::_M_erase): New.
629         (unordered_multiset<>::erase(const_iterator)): Likewise.
630         (unordered_multiset<>::erase(iterator)): Likewise.
631         (unordered_multiset<>::_M_invalidate): New.
632         (unordered_multiset<>::erase(const key_type&)): Use latter.
633         (unordered_multiset<>::erase(const_iterator, const_iterator)): Likewise.
635         * include/c_global/cstddef: Add versioned namespace.
637 2018-10-23  Jonathan Wakely  <jwakely@redhat.com>
639         PR libstdc++/87704
640         * include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
641         not delegate to default constructor.
642         (unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
643         * testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.
645 2018-10-20  François Dumont  <fdumont@gcc.gnu.org>
647         * testsuite/util/testsuite_containers.h
648         (forward_members_unordered<>::forward_members_unordered
649         (const value_type&)): Add local_iterator pre and post increment checks.
650         * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 new symbol.
652 2018-10-19  Jonathan Wakely  <jwakely@redhat.com>
654         * testsuite/23_containers/array/requirements/explicit_instantiation/
655         3.cc: Skip test when compiled with a -std=c++NN strict mode.
656         * testsuite/23_containers/deque/requirements/explicit_instantiation/
657         3.cc: Likewise.
658         * testsuite/23_containers/forward_list/requirements/
659         explicit_instantiation/3.cc: Likewise.
660         * testsuite/23_containers/list/requirements/explicit_instantiation/
661         3.cc: Likewise.
662         * testsuite/23_containers/map/requirements/explicit_instantiation/
663         3.cc: Likewise.
664         * testsuite/23_containers/multimap/requirements/explicit_instantiation/
665         3.cc: Likewise.
666         * testsuite/23_containers/multiset/requirements/explicit_instantiation/
667         3.cc: Likewise.
668         * testsuite/23_containers/set/requirements/explicit_instantiation/
669         3.cc: Likewise.
670         * testsuite/23_containers/unordered_map/requirements/
671         explicit_instantiation/3.cc: Likewise.
672         * testsuite/23_containers/unordered_multimap/requirements/
673         explicit_instantiation/3.cc: Likewise.
674         * testsuite/23_containers/unordered_multiset/requirements/
675         explicit_instantiation/3.cc: Likewise.
676         * testsuite/23_containers/unordered_set/requirements/
677         explicit_instantiation/3.cc: Likewise.
678         * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
679         3.cc: Likewise.
680         * testsuite/23_containers/vector/requirements/explicit_instantiation/
681         3.cc: Likewise.
683         * testsuite/23_containers/deque/48101_neg.cc: Prune additional errors
684         printed when __STRICT_ANSI__ is defined.
685         * testsuite/23_containers/forward_list/48101_neg.cc: Likewise.
686         * testsuite/23_containers/list/48101_neg.cc: Likewise.
687         * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
688         * testsuite/23_containers/set/48101_neg.cc: Likewise.
689         * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
690         * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
691         * testsuite/23_containers/vector/48101_neg.cc: Likewise.
693         * testsuite/23_containers/forward_list/requirements/
694         explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard
695         extension.
696         * testsuite/23_containers/list/requirements/explicit_instantiation/
697         5.cc [__STRICT_ANSI__]: Likewise.
698         * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
699         [__STRICT_ANSI__]: Likewise.
700         * testsuite/23_containers/multimap/requirements/explicit_instantiation/
701         5.cc [__STRICT_ANSI__]: Likewise.
702         * testsuite/23_containers/multiset/requirements/explicit_instantiation/
703         5.cc [__STRICT_ANSI__]: Likewise.
704         * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
705         [__STRICT_ANSI__]: Likewise.
706         * testsuite/23_containers/unordered_map/requirements/debug_container.cc
707         [__STRICT_ANSI__]: Likewise.
708         * testsuite/23_containers/unordered_map/requirements/
709         explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
710         * testsuite/23_containers/unordered_multimap/requirements/
711         explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
712         * testsuite/23_containers/unordered_multiset/requirements/
713         explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
714         * testsuite/23_containers/unordered_set/requirements/
715         explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
717         * testsuite/20_util/scoped_allocator/1.cc: Use allocator with correct
718         value type for the container.
719         * testsuite/23_containers/forward_list/cons/14.cc: Likewise.
720         * testsuite/23_containers/map/56613.cc: Likewise.
721         * testsuite/23_containers/unordered_map/55043.cc: Likewise.
722         * testsuite/23_containers/unordered_map/allocator/copy.cc: Likewise.
723         * testsuite/23_containers/unordered_map/allocator/copy_assign.cc:
724         Likewise.
725         * testsuite/23_containers/unordered_map/allocator/minimal.cc:
726         Likewise.
727         * testsuite/23_containers/unordered_map/allocator/move.cc: Likewise.
728         * testsuite/23_containers/unordered_map/allocator/move_assign.cc:
729         Likewise.
730         * testsuite/23_containers/unordered_map/allocator/noexcept.cc:
731         Likewise.
732         * testsuite/23_containers/unordered_map/cons/81891.cc: Likewise.
733         * testsuite/23_containers/unordered_map/requirements/exception/
734         basic.cc: Likewise.
735         * testsuite/23_containers/unordered_map/requirements/exception/
736         generation_prohibited.cc: Likewise.
737         * testsuite/23_containers/unordered_map/requirements/exception/
738         propagation_consistent.cc: Likewise.
739         * testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
740         * testsuite/23_containers/unordered_multimap/allocator/copy.cc:
741         Likewise.
742         * testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc:
743         Likewise.
744         * testsuite/23_containers/unordered_multimap/allocator/minimal.cc:
745         Likewise.
746         * testsuite/23_containers/unordered_multimap/allocator/move.cc:
747         Likewise.
748         * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc:
749         Likewise.
750         * testsuite/23_containers/unordered_multimap/allocator/noexcept.cc:
751         Likewise.
752         * testsuite/23_containers/unordered_multimap/requirements/exception/
753         basic.cc: Likewise.
754         * testsuite/23_containers/unordered_multimap/requirements/exception/
755         generation_prohibited.cc: Likewise.
756         * testsuite/23_containers/unordered_multimap/requirements/exception/
757         propagation_consistent.cc: Likewise.
758         * testsuite/23_containers/unordered_multimap/requirements/
759         explicit_instantiation/5.cc: Likewise.
760         * testsuite/ext/malloc_allocator/sanity.cc: Likewise.
762         * ext/special_functions/airy_ai/check_nan.cc: Skip test for
763         non-standard extension when a strict -std=c++NN dialect is used.
764         * ext/special_functions/airy_ai/check_value.cc: Likewise.
765         * ext/special_functions/airy_ai/compile.cc: Likewise.
766         * ext/special_functions/airy_bi/check_nan.cc: Likewise.
767         * ext/special_functions/airy_bi/check_value.cc: Likewise.
768         * ext/special_functions/airy_bi/compile.cc: Likewise.
769         * ext/special_functions/conf_hyperg/check_nan.cc: Likewise.
770         * ext/special_functions/conf_hyperg/check_value.cc: Likewise.
771         * ext/special_functions/conf_hyperg/compile.cc: Likewise.
772         * ext/special_functions/hyperg/check_nan.cc: Likewise.
773         * ext/special_functions/hyperg/check_value.cc: Likewise.
774         * ext/special_functions/hyperg/compile.cc: Likewise.
776         * testsuite/23_containers/list/requirements/explicit_instantiation/
777         5_c++0x.cc: Remove redundant test that is functionally identical to
778         the 5.cc test.
779         * testsuite/23_containers/map/requirements/explicit_instantiation/
780         5_c++0x.cc: Likewise.
781         * testsuite/23_containers/multimap/requirements/explicit_instantiation/
782         5_c++0x.cc: Likewise.
783         * testsuite/23_containers/multiset/requirements/explicit_instantiation/
784         5_c++0x.cc: Likewise.
785         * testsuite/23_containers/set/requirements/explicit_instantiation/
786         5_c++0x.cc: Likewise.
788         * include/bits/regex_executor.tcc (_Backref_matcher::_M_apply): Use
789         _GLIBCXX_STD_A to refer to normal mode algorithms.
790         * testsuite/28_regex/headers/regex/parallel_mode.cc: New test.
791         * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Remove empty
792         whitespace.
794         * include/debug/map.h (map::erase(iterator)): Add abi-tag so that
795         C++11 version mangles differently from incompatible C++98 version.
796         * include/debug/multimap.h (multimap::erase(iterator)): Likewise.
797         * include/debug/multiset.h (multiset::erase(iterator))
798         (multiset::erase(const_iterator, const_iterator)): Likewise.
799         * include/debug/set.h (set::erase(iterator))
800         (multiset::erase(const_iterator, const_iterator)): Likewise.
802 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
804         * testsuite/20_util/duration/cons/2.cc: Add -ffloat-store to fix
805         failure when compiled without optimisation.
806         * testsuite/ext/profile/mutex_extensions_neg.cc: Prune additional
807         errors caused by C++17 std::pmr alias templates.
809         PR libstdc++/87642
810         * config/locale/gnu/monetary_members.cc
811         (moneypunct<char, true>::_M_initialize_moneypunct): Use
812         __narrow_multibyte_chars to convert multibyte thousands separators
813         to a single char.
814         * config/locale/gnu/numeric_members.cc
815         (numpunct<char>::_M_initialize_numpunct): Likewise.
816         (__narrow_multibyte_chars): New function.
818         PR libstdc++/87641
819         * include/bits/valarray_array.h (__valarray_sum): Use first element
820         to initialize accumulator instead of value-initializing it.
821         (__valarray_product<_Tp>): Move to ...
822         * src/c++98/valarray.cc (__valarray_product<_Tp>): Here. Use first
823         element to initialize accumulator.
824         (__valarray_product(const valarray<size_t>&)): Remove const_cast made
825         unnecessary by LWG 389.
826         * testsuite/26_numerics/valarray/87641.cc: New test.
828 2018-10-18  François Dumont  <fdumont@gcc.gnu.org>
830         Partial revert.
831         2018-10-08  François Dumont  <fdumont@gcc.gnu.org>
833         * include/debug/list (list<>::cbegin()): Use C++11 direct
834         initialization.
835         (list<>::cend()): Likewise.
836         (list<>::erase(const_iterator, const_iterator)): Ensure consistent
837         iterator comparisons.
838         (list<>::splice(const_iterator, list&&, const_iterator,
839         const_iterator)): Likewise.
841         Partial revert.
842         2018-10-15  François Dumont  <fdumont@gcc.gnu.org>
844         * include/debug/vector (vector<>::cbegin()): Use C++11 direct
845         initialization.
846         (vector<>::cend()): Likewise.
847         (vector<>::insert(const_iterator, const _Tp&)): Use consistent
848         iterator comparison.
849         (vector<>::erase(const_iterator)): Likewise.
850         (vector<>::erase(const_iterator, const_iterator)): Likewise.
852 2018-10-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
854         PR libstdc++/87619
855         * include/std/variant (__select_index): Fix an off-by-one.
856         * testsuite/20_util/variant/87619.cc: New.
858 2018-10-16  Jonathan Wakely  <jwakely@redhat.com>
860         * include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
861         Fix default constructor to call correct function.
863         * testsuite/experimental/net/internet/address/v4/creation.cc: Do not
864         declare ip in global namespace, to avoid collision with struct ip
865         defined in <netinet/ip.h>.
867         * include/experimental/bits/net.h: Move versioned namespace macros
868         to correct location.
869         * include/experimental/buffer: Likewise.
870         * include/experimental/executor: Likewise.
871         * include/experimental/internet: Likewise.
872         * include/experimental/io_context: Likewise.
873         * include/experimental/netfwd: Likewise.
874         * include/experimental/socket: Likewise.
875         * include/experimental/timer: Likewise.
877         * config.h.in: Regenerate.
878         * configure: Regenerate.
879         * configure.ac: Check for headers used by Networking TS.
880         * include/experimental/executor: Include <condition_variable>
881         instead of <mutex>.
882         * include/experimental/internet: Use autoconf macros for available
883         headers.  Include <sys/socket.h> for.  Remove <cstring> and use
884         __builtin_memcpy and __builtin_strchr.
885         (resolver_errc) [!_GLIBCXX_HAVE_NETDB_H]: Do not define.
886         (address_v4::to_string, address_v6::to_string)
887         [!_GLIBCXX_HAVE_ARPA_INET_H]: Likewise.
888         (basic_resolver_results) [!_GLIBCXX_HAVE_NETDB_H]: Make private
889         constructors report errors.
890         [!_GLIBCXX_HAVE_NETINET_TCP_H] (tcp::no_delay): Do not define.
891         * include/experimental/io_context: Likewise.
892         * include/experimental/socket: Likewise.
893         [!_GLIBCXX_HAVE_SYS_SOCKET_H, !_GLIBCXX_HAVE_POLL_H] (socket_base): Do
894         not define nested types when relevant header not available.
895         (__socket_impl::native_non_blocking) [!_GLIBCXX_HAVE_FCNTL_H]: Report
896         an error.
897         (__basic_socket_impl::open, __basic_socket_impl::local_endpoint)
898         (__basic_socket_impl::bind) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
899         (__basic_socket_impl::io_control) [!_GLIBCXX_HAVE_SYS_IOCTL_H]:
900         Likewise.
901         (basic_socket::at_mark, basic_socket::shutdown)
902         (basic_socket::remote_endpoint, basic_socket::connect)
903         (basic_socket::async_connect) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
904         (basic_socket::available) [_GLIBCXX_HAVE_SYS_IOCTL_H]: Check macro
905         for <sys/ioctl.h> availability.
906         (basic_socket::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
907         (basic_datagram_socket::receive, basic_datagram_socket::async_receive)
908         (basic_datagram_socket::receive_from)
909         (basic_datagram_socket::async_receive_from)
910         (basic_datagram_socket::send, basic_datagram_socket::async_send)
911         (basic_datagram_socket::send_to, basic_datagram_socket::async_send_to)
912         [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
913         (basic_stream_socket::receive, basic_stream_socket::async_receive)
914         (basic_stream_socket::send, basic_stream_socket::async_send)
915         [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
916         (basic_socket_acceptor::listen, basic_socket_acceptor::accept)
917         (basic_socket_acceptor::async_accept) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
918         Likewise.
919         (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
921         * testsuite/experimental/net/headers.cc: Remove dg-options.
922         * testsuite/experimental/net/buffer/arithmetic.cc: Replace dg-options
923         with dg-do using effective target.
924         * testsuite/experimental/net/buffer/const.cc: Likewise.
925         * testsuite/experimental/net/buffer/creation.cc: Likewise.
926         * testsuite/experimental/net/buffer/mutable.cc: Likewise.
927         * testsuite/experimental/net/buffer/size.cc: Likewise.
928         * testsuite/experimental/net/buffer/traits.cc: Likewise.
929         * testsuite/experimental/net/execution_context/use_service.cc:
930         Likewise.
931         * testsuite/experimental/net/internet/address/v4/comparisons.cc:
932         Likewise.
933         * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
934         * testsuite/experimental/net/internet/address/v4/creation.cc:
935         Likewise.
936         * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
937         * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
938         * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
939         Likewise.
940         * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
941         Likewise.
942         * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
943         * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
944         * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
946         * include/experimental/socket (basic_socket::at_mark): Add missing
947         return.
949         * acinclude.m4 (GLIBCXX_CHECK_RANDOM_TR1): Replace with ...
950         (GLIBCXX_CHECK_DEV_RANDOM): New macro with more descriptive name.
951         Define _GLIBCXX_USE_DEV_RANDOM as well as _GLIBCXX_USE_RANDOM_TR1.
952         * config.h.in: Regenerate.
953         * configure: Regenerate.
954         * configure.ac: Use GLIBCXX_CHECK_DEV_RANDOM instead of
955         GLIBCXX_CHECK_RANDOM_TR1.
956         crossconfig.m4: Likewise.
957         * include/bits/random.h (random_device): Use _GLIBCXX_USE_DEV_RANDOM
958         instead of _GLIBCXX_USE_RANDOM_TR1.
959         * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
961 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
963         * testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
964         * testsuite/experimental/net/internet/address/v4/comparisons.cc:
965         Add dg-add-options net_ts.
966         * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
967         * testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
968         * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
969         * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
970         * testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
971         * testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.
973 2018-10-16  Jonathan Wakely  <jwakely@redhat.com>
975         * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
976         diagnostic to account for quotes around 'constexpr'.
977         * testsuite/23_containers/deque/capacity/max_size.cc: Define static
978         variable.
979         * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
981         PR libstdc++/87618
982         * config/abi/pre/gnu.ver: Fix typos in patterns for basic_stringbuf.
983         * testsuite/27_io/basic_stringbuf/cons/char/default.cc: Disable
984         optimisation to check constructor definition can be linked to.
985         * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: Likewise.
987 2018-10-15  Jonathan Wakely  <jwakely@redhat.com>
989         * testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
990         account for change to glibc it_IT localedata (glibc bz#10797).
992         PR libstdc++/87587
993         * src/c++11/cxx11-shim_facets.cc: Suppress -Wabi warnings.
995 2018-10-15  François Dumont  <fdumont@gcc.gnu.org>
997         * include/debug/vector (vector<>::cbegin()): Use C++11 direct
998         initialization.
999         (vector<>::cend()): Likewise.
1000         (vector<>::emplace(const_iterator, _Args&&...)): Likewise and use
1001         consistent iterator comparison.
1002         (vector<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
1003         (vector<>::insert(const_iterator, _InputIterator, _InputIterator)):
1004         Likewise.
1005         (vector<>::erase(const_iterator)): Likewise.
1006         (vector<>::erase(const_iterator, const_iterator)): Likewise.
1008 2018-10-12  Jonathan Wakely  <jwakely@redhat.com>
1010         Initial commit of Networking TS implementation.
1011         * include/Makefile.am: Add new headers.
1012         * include/Makefile.in: Regenerate.
1013         * include/experimental/bits/net.h: New header for common
1014         implementation details of Networking TS.
1015         * include/experimental/buffer: New header.
1016         * include/experimental/executor: New header.
1017         * include/experimental/internet: New header.
1018         * include/experimental/io_context: New header.
1019         * include/experimental/net: New header.
1020         * include/experimental/netfwd: New header.
1021         * include/experimental/socket: New header.
1022         * include/experimental/timer: New header.
1023         * testsuite/experimental/net/buffer/arithmetic.cc: New test.
1024         * testsuite/experimental/net/buffer/const.cc: New test.
1025         * testsuite/experimental/net/buffer/creation.cc: New test.
1026         * testsuite/experimental/net/buffer/mutable.cc: New test.
1027         * testsuite/experimental/net/buffer/size.cc: New test.
1028         * testsuite/experimental/net/buffer/traits.cc: New test.
1029         * testsuite/experimental/net/execution_context/use_service.cc: New
1030         test.
1031         * testsuite/experimental/net/headers.cc: New test.
1032         * testsuite/experimental/net/internet/address/v4/comparisons.cc: New
1033         test.
1034         * testsuite/experimental/net/internet/address/v4/cons.cc: New test.
1035         * testsuite/experimental/net/internet/address/v4/creation.cc: New
1036         test.
1037         * testsuite/experimental/net/internet/address/v4/members.cc: New
1038         test.
1039         * testsuite/experimental/net/internet/resolver/base.cc: New test.
1040         * testsuite/experimental/net/internet/resolver/ops/lookup.cc: New
1041         test.
1042         * testsuite/experimental/net/internet/resolver/ops/reverse.cc: New
1043         test.
1044         * testsuite/experimental/net/timer/waitable/cons.cc: New test.
1045         * testsuite/experimental/net/timer/waitable/dest.cc: New test.
1046         * testsuite/experimental/net/timer/waitable/ops.cc: New test.
1048         PR libstdc++/77691
1049         * include/experimental/memory_resource (__resource_adaptor_imp): Do
1050         not allocate sizes smaller than alignment when relying on guaranteed
1051         alignment.
1052         * testsuite/experimental/memory_resource/new_delete_resource.cc:
1053         Adjust expected number of bytes allocated for alignof(max_align_t).
1055 2018-10-11  François Dumont  <fdumont@gcc.gnu.org>
1057         * include/debug/forward_list
1058         (forward_list<>::before_begin()): Use C++11 direct initialization.
1059         (forward_list<>::begin()): Likewise.
1060         (forward_list<>::end()): Likewise.
1061         (forward_list<>::cbefore_begin()): Likewise.
1062         (forward_list<>::cbegin()): Likewise.
1063         (forward_list<>::cend()): Likewise.
1064         (forward_list<>::emplace_after<>(const_iterator, _Args&&...)): Likewise.
1065         (forward_list<>::insert_after(const_iterator, const _Tp&)): Likewise.
1066         (forward_list<>::insert_after(const_iterator, _Tp&&)): Likewise.
1067         (forward_list<>::insert_after(const_iterator, size_type, const _Tp&)):
1068         Likewise.
1069         (forward_list<>::insert_after(const_iterator, initializer_list<>)):
1070         Likewise.
1071         (forward_list<>::erase_after(const_iterator)): Likewise.
1072         (forward_list<>::erase_after(const_iterator, const_iterator)): Likewise
1073         and ensure consistent iterator comparison.
1075         * include/bits/forward_list.h
1076         (_Fwd_list_iterator<>::operator==): Replace member function with inline
1077         friend.
1078         (_Fwd_list_iterator<>::operator!=): Likewise.
1079         (_Fwd_list_const_iterator<>::operator==): Likewise.
1080         (_Fwd_list_const_iterator<>::operator!=): Likewise.
1081         (operator==(const _Fwd_list_iterator<>&,
1082         const _Fwd_list_const_iterator<>&)): Remove.
1083         (operator!=(const _Fwd_list_iterator<>&,
1084         const _Fwd_list_const_iterator<>&)): Remove.
1085         (forward_list<>::_Node): Take typedef from base type.
1086         (forward_list<>::iterator): Likewise.
1087         (forward_list<>::const_iterator): Likewise.
1089 2018-10-11  Jonathan Wakely  <jwakely@redhat.com>
1091         PR libstdc++/80538
1092         * src/c++11/thread.cc (this_thread::__sleep_for)
1093         [_GLIBCXX_HAVE_SLEEP]: Only call sleep for non-zero values.
1094         Loop while sleep call is interrupted and until steady_clock
1095         shows requested duration has elapsed.
1096         (!_GLIBCXX_HAVE_USLEEP]: Use the _GLIBCXX_HAVE_SLEEP code path, but
1097         avoiding the usleep call.
1098         * testsuite/30_threads/this_thread/60421.cc: Test repeated
1099         signal interruptions.
1101         * include/bits/allocator.h
1102         (operator==(const allocator<_Tp>&, const allocator<_Tp>))
1103         (operator!=(const allocator<_Tp>&, const allocator<_Tp>)): Replace
1104         with inline friends.
1105         * include/ext/debug_allocator.h (operator==, operator!=): Replace
1106         with inline friend functions that compare to rebound allocators.
1107         * include/ext/malloc_allocator.h (operator==, operator!=): Likewise.
1108         * include/ext/new_allocator.h (operator==, operator!=): Likewise.
1109         * testsuite/ext/debug_allocator/eq.cc: New test.
1110         * testsuite/ext/ext_pointer/alloc_eq.cc: New test.
1111         * testsuite/ext/malloc_allocator/eq.cc: New test.
1112         * testsuite/ext/new_allocator/eq.cc: New test.
1114 2018-10-10  Jonathan Wakely  <jwakely@redhat.com>
1116         PR libstdc++/87544
1117         * include/bits/stl_vector.h (vector::_S_max_size): Limit size to
1118         PTRDIFF_MAX / sizeof(value_type).
1119         * include/ext/malloc_allocator.h (malloc_allocator::max_size):
1120         Likewise.
1121         * include/ext/new_allocator.h (new_allocator::max_size): Likewise.
1122         * testsuite/23_containers/vector/allocator/minimal.cc: Adjust
1123         expected value for max_size().
1124         * testsuite/23_containers/vector/capacity/87544.cc: New test.
1126 2018-10-09  François Dumont  <fdumont@gcc.gnu.org>
1128         * include/bits/stl_list.h
1129         (_List_operator<>::operator==): Replace member function with inline
1130         friend.
1131         (_List_operator<>::operator!=): Likewise.
1132         (_List_const_operator<>::operator==): Likewise.
1133         (_List_const_operator<>::operator!=): Likewise.
1134         (operator==(const _List_iterator<>&, const _List_const_iterator<>&)):
1135         Remove.
1136         (operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
1137         Remove.
1139 2018-10-09  Jonathan Wakely  <jwakely@redhat.com>
1141         * include/bits/stringfwd.h (string, wstring, u16string, u32string):
1142         Define typedefs outside of __cxx11 inline namespace.
1143         * python/libstdcxx/v6/printers.py (register_type_printers): Also
1144         register printers for typedefs in new location.
1146 2018-10-08  Jonathan Wakely  <jwakely@redhat.com>
1148         PR libstdc++/87538
1149         * testsuite/experimental/functional/87538.cc: New test.
1151         PR libstdc++/87538
1152         * include/std/functional (_Not_fn::operator()): Check value of
1153         __is_nothrow_invocable as well.
1154         * testsuite/20_util/function_objects/not_fn/87538.cc: New test.
1156 2018-10-08  François Dumont  <fdumont@gcc.gnu.org>
1158         * include/debug/list (list<>::cbegin()): Use C++11 direct
1159         initialization.
1160         (list<>::cend()): Likewise.
1161         (list<>::emplace<>(const_iterator, _Args&&...)): Likewise.
1162         (list<>::insert(const_iterator, initializer_list<>)): Likewise.
1163         (list<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
1164         (list<>::erase(const_iterator, const_iterator)): Ensure consistent
1165         iterator comparisons.
1166         (list<>::splice(const_iterator, list&&, const_iterator,
1167         const_iterator)): Likewise.
1169 2018-10-05  François Dumont  <fdumont@gcc.gnu.org>
1171         * include/bits/stl_tree.h
1172         (_Rb_tree_iterator<>::operator==): Make inline friend.
1173         (_Rb_tree_iterator<>::operator!=): Likewise.
1174         (_Rb_tree_const_iterator<>::operator==): Likewise.
1175         (_Rb_tree_const_iterator<>::operator!=): Likewise.
1176         (operator==(const _Rb_tree_iterator<>&,
1177         const _Rb_tree_const_iterator&)): Remove.
1178         (operator!=(const _Rb_tree_iterator<>&,
1179         const _Rb_tree_const_iterator&)): Remove.
1180         (operator==(const _Rb_tree<>&, const _Rb_tree<>&)): Make inline friend.
1181         (operator<(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
1182         (operator!=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise and
1183         deprecate.
1184         (operator>(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
1185         (operator<=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
1186         (operator>=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
1187         * include/debug/map.h (map<>::erase(const_iterator, const_iterator)):
1188         Compare __victim with _Base::cend().
1189         * include/debug/multimap.h
1190         (multimap<>::erase(const_iterator, const_iterator)): Likewise.
1191         * include/debug/set.h (set<>::erase(const_iterator, const_iterator)):
1192         Compare __victim with _Base::cend().
1193         * include/debug/multiset.h
1194         (multiset<>::erase(const_iterator, const_iterator)): Likewise.
1196 2018-10-03  Jonathan Wakely  <jwakely@redhat.com>
1198         PR libstdc++/59439
1199         * src/c++98/locale.cc (locale::locale(const locale&)): Bypass
1200         reference count updates for the classic locale.
1201         (locale::~locale()): Likewise.
1202         (locale::operator=(const locale&)): Likewise.
1203         * src/c++98/locale_init.cc (locale::locale()): Likewise.
1204         (locale::global(const locale&)): Likewise.
1206 2018-10-03  François Dumont  <fdumont@gcc.gnu.org>
1208         * include/debug/map.h
1209         (map<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
1210         (map<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
1211         (map<>::insert(value_type&&)): Likewise.
1212         (map<>::insert<>(_Pair&&)): Likewise.
1213         (map<>::insert<>(const_iterator, _Pair&&)): Likewise.
1214         (map<>::try_emplace): Likewise.
1215         (map<>::insert_or_assign): Likewise.
1216         (map<>::insert(node_type&&)): Likewise.
1217         (map<>::insert(const_iterator, node_type&&)): Likewise.
1218         (map<>::erase(const_iterator)): Likewise.
1219         (map<>::erase(const_iterator, const_iterator)): Likewise.
1220         * include/debug/multimap.h
1221         (multimap<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
1222         (multimap<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
1223         (multimap<>::insert<>(_Pair&&)): Likewise.
1224         (multimap<>::insert<>(const_iterator, _Pair&&)): Likewise.
1225         (multimap<>::insert(node_type&&)): Likewise.
1226         (multimap<>::insert(const_iterator, node_type&&)): Likewise.
1227         (multimap<>::erase(const_iterator)): Likewise.
1228         (multimap<>::erase(const_iterator, const_iterator)): Likewise.
1229         * include/debug/set.h
1230         (set<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
1231         (set<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
1232         (set<>::insert(value_type&&)): Likewise.
1233         (set<>::insert<>(const_iterator, value_type&&)): Likewise.
1234         (set<>::insert(const_iterator, node_type&&)): Likewise.
1235         (set<>::erase(const_iterator)): Likewise.
1236         (set<>::erase(const_iterator, const_iterator)): Likewise.
1237         * include/debug/multiset.h
1238         (multiset<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
1239         (multiset<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
1240         (multiset<>::insert<>(value_type&&)): Likewise.
1241         (multiset<>::insert<>(const_iterator, value_type&&)): Likewise.
1242         (multiset<>::insert(node_type&&)): Likewise.
1243         (multiset<>::insert(const_iterator, node_type&&)): Likewise.
1244         (multiset<>::erase(const_iterator)): Likewise.
1245         (multiset<>::erase(const_iterator, const_iterator)): Likewise.
1247 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
1249         PR libstdc++/87258
1250         * include/bits/stl_bvector.h (vector::begin(), vector::cbegin()):
1251         Rebuild _M_start with an explicit 0 offset.
1253 2018-10-02  Jonathan Wakely  <jwakely@redhat.com>
1255         * include/std/variant (__gen_vtable_impl::__visit_invoke): Call __get
1256         directly instead of get, as caller ensures correct index is used.
1257         (holds_alternative, get, get_if): Remove redundant inline specifiers.
1258         (_VARIANT_RELATION_FUNCTION_TEMPLATE): Likewise.
1260 2018-10-02  Joseph Myers  <joseph@codesourcery.com>
1262         * testsuite/lib/libstdc++.exp (libstdc++_init): Use
1263         -fno-show-column in default cxxflags.
1265 2018-10-01  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
1267         * config/os/uclibc/os_defines.h (__NO_STRING_INLINES): Delete.
1269 2018-10-01  Gerald Pfeifer  <gerald@pfeifer.com>
1271         * doc/xml/manual/allocator.xml: Adjust link to "Reconsidering
1272         Custom Memory Allocation".
1274 2018-10-01  Jonathan Wakely  <jwakely@redhat.com>
1276         * doc/html/*: Regenerate.
1278 2018-09-30  Gerald Pfeifer  <gerald@pfeifer.com>
1280         * doc/xml/manual/messages.xml: Switch link to www.oracle.com
1281         to https.
1283 2018-09-30  Gerald Pfeifer  <gerald@pfeifer.com>
1285         * doc/xml/manual/policy_data_structures_biblio.xml: Update
1286         link to Microsoft Component Model Object Technologies.
1288 2018-09-29  Gerald Pfeifer  <gerald@pfeifer.com>
1290         * doc/xml/gnu/fdl-1.3.xml: The Free Software Foundation web
1291         site now uses https. Also omit the unnecessary trailing slash.
1292         * doc/xml/gnu/gpl-3.0.xml: Ditto.
1294 2018-09-28  François Dumont  <fdumont@gcc.gnu.org>
1296         * include/debug/functions.h
1297         (__foreign_iterator_aux3(const _Safe_iterator<>&, const _InputeIter&,
1298         const _InputIter&, __true_type)): Use empty() rather than begin() ==
1299         end().
1301 2018-09-25  Mike Crowe  <mac@mcrowe.com>
1303         * include/std/condition_variable (condition_variable::wait_for): Use
1304         steady clock in overload that uses a predicate.
1306 2018-09-25  Jonathan Wakely  <jwakely@redhat.com>
1308         PR libstdc++/87431
1309         * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
1310         Avoid runtime test when all alternatives are scalars and so cannot
1311         throw during initialization.
1313 2018-09-25  Gerald Pfeifer  <gerald@pfeifer.com>
1315         * doc/xml/manual/codecvt.xml: Move link to "UTF-8 and Unicode FAQ"
1316         to https.
1318 2018-09-24  Gerald Pfeifer  <gerald@pfeifer.com>
1320         * doc/xml/manual/policy_data_structures_biblio.xml: Update link
1321         to "Priority Queues and the STL".
1323 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
1325         * doc/xml/manual/using_exceptions.xml: Move boost.orgs link to
1326         https.
1328 2018-09-21  François Dumont  <fdumont@gcc.gnu.org>
1330         PR libstdc++/87135
1331         * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1332         Use __builtin_floor to compute _M_next_resize.
1333         * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt.
1334         * testsuite/23_containers/unordered_set/hash_policy/prime_rehash.cc:
1335         Adapt.
1337 2018-09-21  Jonathan Wakely  <jwakely@redhat.com>
1339         * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove.
1340         * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for
1341         long double unconditionally, but use lower tolerance when
1342         sizeof(long double) == sizeof(double).
1344 2018-09-20  Christophe Lyon  <christophe.lyon@linaro.org>
1346         * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Skip
1347         on arm*.
1349 2018-09-19  Jonathan Wakely  <jwakely@redhat.com>
1351         * include/bits/regex_automaton.tcc (_StateSeq<_TraitsT>::_M_clone()):
1352         Remove __glibcxx_assert statements and use map::find instead of
1353         map::operator[].
1355 2018-09-18  François Dumont  <fdumont@gcc.gnu.org>
1357         PR libstdc++/87135
1358         * src/c++11/hashtable_c++0x.cc:
1359         (_Prime_rehash_policy::_M_next_bkt): Return a prime no smaller than
1360         requested size, but not necessarily greater.
1361         (_Prime_rehash_policy::_M_need_rehash): Rehash only if target size is
1362         strictly greater than next resize threshold.
1363         * testsuite/23_containers/unordered_map/modifiers/reserve.cc: Adapt test
1364         to validate that there is no rehash as long as number of insertion is
1365         lower or equal to the reserved number of elements.
1367 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
1369         * include/bits/unique_ptr.h (__uniq_ptr_impl): Remove static assertion
1370         checking invocable condition.
1371         (unique_ptr::~unique_ptr, unique_ptr::reset): Restore static assertion
1372         here, where types must be complete. Pass pointer to deleter as an
1373         rvalue.
1374         * testsuite/20_util/unique_ptr/requirements/incomplete.cc: New test.
1376 2018-09-13  Jonathan Wakely  <jwakely@redhat.com>
1378         * include/std/variant (variant) [__clang__]: Limit workaround to
1379         Clang 7 and older.
1381 2018-09-11  Jonathan Wakely  <jwakely@redhat.com>
1383         PR libstdc++/87278
1384         * include/bits/shared_ptr.h (make_shared): Use remove_cv instead of
1385         remove_const.
1386         * testsuite/20_util/shared_ptr/creation/87278.cc: New test.
1388         Implement LWG 2905 changes to constrain unique_ptr constructors
1389         * include/bits/unique_ptr.h (__uniq_ptr_impl): Add assertions to
1390         check deleter type.
1391         (unique_ptr::unique_ptr(pointer, const deleter_type&)): Add copy
1392         constructible constraint.
1393         (unique_ptr::unique_ptr(pointer, deleter_type&&)): Disable for
1394         deleters of reference type and add move constructible constraint.
1395         (unique_ptr::unique_ptr(pointer, remove_reference_t<deleter_type>&&)):
1396         Disable for deleters of non-reference type. Define as deleted.
1397         (unique_ptr<T[], D>): Likewise.
1398         * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Replace dg-error
1399         directives with unstable line numbers with dg-prune-output.
1400         * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
1401         * testsuite/20_util/unique_ptr/cons/lwg2905.cc: New test.
1402         * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
1403         Make deleter types invocable.
1405 2018-09-05  Jonathan Wakely  <jwakely@redhat.com>
1407         * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment.
1409 2018-09-03  Jonathan Wakely  <jwakely@redhat.com>
1411         PR libstdc++/78179
1412         * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
1413         that runs the long double part of hypot.cc.
1414         * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
1415         tests unless TEST_HYPOT_LONG_DOUBLE is defined.
1417         * include/bits/stl_vector.h (vector::_Temporary_value::_M_ptr):
1418         Return raw pointer not allocator's pointer type.
1419         (vector::_Temporary_value::_M_val): Use _M_ptr.
1421         PR libstdc++/87194
1422         * include/bits/stl_map.h
1423         (map::map(initializer_list<value_type>, const Compare&, const Alloc&))
1424         (map::map(initializer_list<value_type>, const Alloc&))
1425         (map::map(InputIterator, InputIterator, const Alloc&))
1426         (map::map(InputIterator, InputIterator))
1427         (map::map(InputIterator, InputIterator, const Compare&, const Alloc&))
1428         (map::insert(InputIterator, InputIterator)):
1429         Call _M_insert_range_unique instead of _M_insert_unique.
1430         * include/bits/stl_multimap.h
1431         (multimap::multimap(initializer_list<value_type>, const C&, const A&))
1432         (multimap::multimap(initializer_list<value_type>, const A&))
1433         (multimap::multimap(InputIterator, InputIterator, const A&))
1434         (multimap::multimap(InputIterator, InputIterator))
1435         (multimap::multimap(InputIterator, InputIterator, const C&, const A&))
1436         (multimap::insert(InputIterator, InputIterator)): Call
1437         _M_insert_range_equal instead of _M_insert_equal.
1438         * include/bits/stl_multiset.h
1439         (multiset::multiset(InputIterator, InputIterator))
1440         (multiset::multiset(InputIterator, InputIterator, const C&, const A&))
1441         (multiset::multiset(initializer_list<value_type>, const C&, const A&))
1442         (multiset::multiset(initializer_list<value_type>, const A&))
1443         (multiset::multiset(InputIterator, InputIterator, const A&))
1444         (multiset::insert(InputIterator, InputIterator)): Call
1445         _M_insert_range_equal instead of _M_insert_equal.
1446         * include/bits/stl_set.h
1447         (set::set(InputIterator, InputIterator))
1448         (set::set(InputIterator, InputIterator, const Compare&, const Alloc&))
1449         (set::set(initializer_list<value_type>, const Compare&, const Alloc&))
1450         (set::set(initializer_list<value_type>, const Alloc&))
1451         (set::set(InputIterator, InputIterator, const Alloc&))
1452         (set::insert(InputIterator, InputIterator)):
1453         Call _M_insert_range_unique instead of _M_insert_unique.
1454         * include/bits/stl_tree.h
1455         [__cplusplus >= 201103L] (_Rb_tree::__same_value_type): New alias
1456         template for SFINAE constraints.
1457         [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_unique): Pair of
1458         constrained overloads that either insert or emplace, depending on
1459         iterator's value_type.
1460         [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_equal): Likewise.
1461         [__cplusplus < 201103L] (_Rb_tree::_M_insert_range_unique)
1462         (_Rb_tree::_M_insert_range_equal): New functions replacing range
1463         versions of _M_insert_unique and _M_insert_equal.
1464         (_Rb_tree::_M_insert_unique(_InputIterator, _InputIterator))
1465         (_Rb_tree::_M_insert_equal(_InputIterator, _InputIterator)): Remove.
1466         * testsuite/23_containers/map/modifiers/insert/87194.cc: New test.
1467         * testsuite/23_containers/multimap/modifiers/insert/87194.cc: New test.
1468         * testsuite/23_containers/multiset/modifiers/insert/87194.cc: New test.
1469         * testsuite/23_containers/set/modifiers/insert/87194.cc: New test.
1471         PR libstdc++/78595
1472         * include/bits/stl_map.h (map::insert(_Pair&&))
1473         (map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
1474         * include/bits/stl_multimap.h (multimap::insert(_Pair&&))
1475         (multimap::insert(const_iterator, _Pair&&)): Likewise.
1476         * include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
1477         (unordered_map::insert(const_iterator, _Pair&&))
1478         (unordered_multimap::insert(_Pair&&))
1479         (unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
1480         * testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
1481         * testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
1482         * testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
1483         * testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
1484         test.
1486 2018-09-02  François Dumont  <fdumont@gcc.gnu.org>
1488         * include/debug/safe_iterator.h
1489         (_Safe_iterator<_It, _Seq, _Cat>::_Self): New.
1490         (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>::_Self):
1491         New.
1492         (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1493         ::_OtherSelf): New.
1494         (_GLIBCXX_DEBUG_VERIFY_OPERANDS, _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS)
1495         (_GLIBCXX_DEBUG_VERIFY_REL_OPERANDS)
1496         (_GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS): Define macros.
1497         (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1498         ::operator+(difference_type)): Use latters, inline as friend.
1499         (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1500         ::operator-(difference_type)): Likewise.
1501         (operator==(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1502         Likewise.
1503         (operator!=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1504         Likewise.
1505         (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1506         (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1507         Likewise.
1508         (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1509         (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1510         Likewise.
1511         (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1512         (operator+(difference_type, const _Safe_iterator<>&)): Likewise.
1513         (operator-(const _Safe_iterator<>&, difference_type)): Likewise.
1514         * include/debug/safe_iterator.tcc
1515         (_Safe_iterator<>::_M_can_advance(difference_type)): Take parameter by
1516         copy.
1517         * include/debug/safe_local_iterator.h
1518         (_Safe_local_iterator<_It, _Seq>::_Self): New.
1519         (_Safe_local_iterator<_It, _Seq>::_OtherSelf): New.
1520         (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Define macro.
1521         (operator==(const _Safe_local_iterator<>&,
1522         const _Safe_local_iterator<>&)): Use latter, inline as friend.
1523         (operator!=(const _Safe_local_iterator<>&,
1524         const _Safe_local_iterator<>&)): Likewise.
1525         * testsuite/util/testsuite_containers.h: Include utility.
1526         (struct forward_members_unordered<_Tp, bool>): Remove 2nd template
1527         parameter.
1528         (forward_members_unordered<>::forward_members_unordered(value_type&)):
1529         Add using namespace std::rel_ops.
1530         Add iterator_concept_checks on local_iterator and const_local_iterator.
1531         Add asserts on comparison between const_local_iterator and
1532         local_iterator.
1533         (struct forward_members_unordered<_Tp, false>): Remove partial
1534         specialization.
1535         * testsuite/23_containers/forward_list/types/1.cc: New.
1536         * testsuite/23_containers/list/types/1.cc: New.
1538 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
1540         * doc/xml/manual/profile_mode.xml: Update three ieeexplore.ieee.org
1541         references.
1543 2018-08-31  Sandra Loosemore  <sandra@codesourcery.com>
1545         * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
1546         Add dg-require-fileio.
1547         * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
1548         Likewise.
1549         * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
1550         Likewise.
1551         * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
1552         Likewise.
1553         * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc:
1554         Likewise.
1555         * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc:
1556         Likewise.
1557         * testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc: Likewise.
1558         * testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc: Likewise.
1559         * testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc: Likewise.
1560         * testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc: Likewise.
1561         * testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: Likewise.
1562         * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc:
1563         Likewise.
1564         * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc:
1565         Likewise.
1566         * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc:
1567         Likewise.
1568         * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc:
1569         Likewise.
1570         * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc:
1571         Likewise.
1572         * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc:
1573         Likewise.
1574         * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc:
1575         Likewise.
1576         * testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc: Likewise.
1577         * testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc: Likewise.
1578         * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: Likewise.
1579         * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: Likewise.
1580         * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
1581         Likewise.
1582         * testsuite/27_io/basic_istream/extractors_other/wchar_t/2.cc:
1583         Likewise.
1584         * testsuite/27_io/basic_istream/get/wchar_t/2.cc: Likewise.
1585         * testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Likewise.
1586         * testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
1587         * testsuite/27_io/basic_istream/ignore/wchar_t/3.cc: Likewise.
1588         * testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc: Likewise.
1589         * testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc: Likewise.
1590         * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: Likewise.
1591         * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: Likewise.
1592         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc:
1593         Likewise.
1594         * testsuite/27_io/objects/wchar_t/10.cc: Likewise.
1595         * testsuite/27_io/objects/wchar_t/12048-1.cc: Likewise.
1596         * testsuite/27_io/objects/wchar_t/12048-2.cc: Likewise.
1597         * testsuite/27_io/objects/wchar_t/12048-3.cc: Likewise.
1598         * testsuite/27_io/objects/wchar_t/12048-4.cc: Likewise.
1599         * testsuite/27_io/objects/wchar_t/12048-5.cc: Likewise.
1600         * testsuite/experimental/string_view/inserters/wchar_t/2.cc:
1601         Likewise.
1602         * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
1604 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
1606         * testsuite/experimental/propagate_const/observers/1.cc: Make
1607         dependence on -fdelete-null-pointer-checks explicit.
1609 2018-08-30  Jonathan Wakely  <jwakely@redhat.com>
1611         * include/bits/hashtable_policy.h (__clp2): Fix calculation for LLP64
1612         targets where sizeof(size_t) > sizeof(long). Avoid undefined shifts
1613         of the number of bits in the type.
1614         * include/std/bit (__ceil2): Avoid undefined shifts.
1615         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Test values with
1616         the most signifiant bit set.
1618         * config/abi/pre/gnu.ver: Add missing exports for mingw.
1620         * include/ext/pointer.h (_Pointer_adapter): Define operators for
1621         pointer arithmetic using long long offsets.
1622         * testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using
1623         long long values.
1625 2018-08-29  Jonathan Wakely  <jwakely@redhat.com>
1627         PR libstdc++/31413
1628         * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Check D_FMT
1629         string for alternative format.
1631 2018-08-28  Jonathan Wakely  <jwakely@redhat.com>
1633         PR libstdc++/87116
1634         * src/filesystem/std-path.cc (path::lexically_normal): When handling
1635         a dot-dot filename, preserve an empty final component in the iteration
1636         sequence.
1637         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
1638         root-directory.
1639         * testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
1640         for more than two adjacent dot-dot filenames.
1641         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
1642         preferred-separator in expected normalized strings.
1644 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
1646         PR libstdc++/70694
1647         * configure.host (OPT_LDFLAGS): Don't append
1648         -fvisibility-inlines-hidden for newer Darwin.
1650 2018-08-24  Marc Glisse  <marc.glisse@inria.fr>
1652         PR libstdc++/86822
1653         * libsupc++/new (operator new(size_t, nothrow_t), operator
1654         new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t),
1655         operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute.
1657 2018-08-24  Jonathan Wakely  <jwakely@redhat.com>
1659         * include/debug/deque (std::__debug::deque): Declare.
1660         * include/debug/forward_list (std::__debug::forward_list): Declare.
1661         * include/debug/list (std::__debug::list): Declare.
1662         * include/debug/map (std::__debug::map): Declare.
1663         * include/debug/set (std::__debug::set): Declare.
1664         * include/debug/unordered_map (std::__debug::unordered_map): Declare.
1665         * include/debug/unordered_set (std::__debug::unordered_set): Declare.
1666         * include/debug/vector (std::__debug::vector): Declare.
1667         * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: New test.
1668         * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: New
1669         test.
1670         * testsuite/23_containers/list/pmr_typedefs_debug.cc: New test.
1671         * testsuite/23_containers/map/pmr_typedefs_debug.cc: New test.
1672         * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: New test.
1673         * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: New test.
1674         * testsuite/23_containers/set/pmr_typedefs_debug.cc: New test.
1675         * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc: New
1676         test.
1677         * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
1678         New test.
1679         * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
1680         New test.
1681         * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: New
1682         test.
1683         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
1684         Adjust dg-error lineno.
1685         * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: New
1686         test.
1688 2018-08-23  Jonathan Wakely  <jwakely@redhat.com>
1690         * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
1691         Only define when RTTI is enabled.
1693         * include/debug/vector (__niter_base): Define for C++98.
1695         * testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
1696         Fix C++98 test to not use C++11 features.
1697         * testsuite/25_algorithms/fill_n/2.cc: Likewise.
1699         * scripts/check_compile: Fix comments.
1701         * include/debug/string (insert(__const_iterator, _InIter, _InIter)):
1702         [!_GLIBCXX_USE_CXX11_ABI]: Replace use of C++11-only cbegin() with
1703         begin(), for C++98 compatibility.
1705         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
1706         (basic_string::__const_iterator): Change access to protected.
1707         [!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define
1708         as typedef for iterator.
1709         * include/debug/string (__const_iterator): Use typedef from base.
1710         (insert(const_iterator, _CharT))
1711         (replace(const_iterator, const_iterator, const basic_string&))
1712         (replace(const_iterator, const_iterator, const _CharT*, size_type))
1713         (replace(const_iterator, const_iterator, const CharT*))
1714         (replace(const_iterator, const_iterator, size_type, _CharT))
1715         (replace(const_iterator, const_iterator, _InputIter, _InputIter))
1716         (replace(const_iterator, const_iterator, initializer_list<_CharT>)):
1717         Change const_iterator parameters to __const_iterator.
1718         (insert(iterator, size_type, _CharT)): Add C++98 overload.
1719         (insert(const_iterator, _InputIterator, _InputIterator)): Change
1720         const_iterator parameter to __const_iterator.
1721         [!_GLIBCXX_USE_CXX11_ABI]: Add workaround for incorrect return type
1722         of base's member function.
1723         (insert(const_iterator, size_type, _CharT)) [!_GLIBCXX_USE_CXX11_ABI]:
1724         Likewise.
1725         (insert(const_iterator, initializer_list<_CharT>))
1726         [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1727         * testsuite/21_strings/basic_string/init-list.cc: Remove effective
1728         target directive.
1730         * testsuite/20_util/reference_wrapper/lwg2993.cc: Fix C++11 test to
1731         not use C++14 feature.
1732         * testsuite/23_containers/list/68222_neg.cc: Likewise.
1734         * testsuite/21_strings/basic_string/init-list.cc:
1735         Require cxx11-abi.
1736         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
1737         Likewise.
1738         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1739         Likewise.
1741         * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for
1742         C++98 mode.
1743         * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise.
1744         * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise.
1745         * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise.
1746         * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
1747         * testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise.
1749 2018-08-22  Jonathan Wakely  <jwakely@redhat.com>
1751         PR libstdc++/87061
1752         * include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
1753         (experimental::pmr::match_results, experimental::pmr::cmatch)
1754         (experimental::pmr::smatch, experimental::pmr::wcmatch)
1755         (experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
1756         because COW strings don't support C++11 allocator model.
1757         * include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
1758         (experimental::pmr::basic_string, experimental::pmr::string)
1759         (experimental::pmr::u16string, experimental::pmr::u32string)
1760         (experimental::pmr::wstring): Likewise.
1761         * include/std/regex [!_GLIBCXX_USE_CXX11_ABI] (pmr::match_results)
1762         (pmr::cmatch, pmr::smatch, pmr::wcmatch, pmr::wsmatch): Likewise.
1763         * include/std/string [!_GLIBCXX_USE_CXX11_ABI] (pmr::basic_string)
1764         (pmr::string, pmr::u16string, pmr::u32string, pmr::wstring): Likewise.
1765         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Require
1766         cxx11-abi.
1767         * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
1769         PR libstdc++/78448
1770         * include/bits/deque.tcc (deque::_M_range_initialize): Use
1771         _S_check_init_len to check size.
1772         (deque::_M_push_back_aux, deque::_M_push_front_aux): Throw length
1773         error if size would exceed max_size().
1774         * include/bits/stl_deque.h (_Deque_base::size_type): Remove typedef.
1775         (_Deque_base(_Deque_base&&, const allocator_type&, size_t)): Use
1776         size_t instead of size_type.
1777         (deq(size_type, const allocator_type&)
1778         (deq(size_type, const value_type&, const allocator_type&)
1779         (deque::_M_initialize_dispatch): Use _S_check_init_len to check size.
1780         (deque::max_size): Call _S_max_size.
1781         (deque::_S_check_init_len, deque::_S_max_size): New functions.
1782         * include/bits/stl_vector.h (vector(size_type, const allocator_type&))
1783         (vector(size_type, const value_type&, const allocator_type&))
1784         (vector::_M_initialize_dispatch, vector::_M_range_initialize): Use
1785         _S_check_init_len to check size.
1786         (vector::max_size): Call _S_max_size.
1787         (vector::_M_check_len): Prevent max from being expanded as a
1788         function-like macro.
1789         (vector::_S_check_init_len, vector::_S_max_size): New functions.
1790         * include/bits/vector.tcc (vector::_M_assign_aux): Use
1791         _S_check_init_len to check size.
1792         * testsuite/23_containers/deque/capacity/max_size.cc: New test.
1793         * testsuite/23_containers/vector/capacity/max_size.cc: New test.
1795 2018-08-22  François Dumont  <fdumont@gcc.gnu.org>
1797         PR libstdc++/68222
1798         * include/debug/safe_iterator.h
1799         (_Safe_iterator<_It, _Sq, _Cat>): Add category template parameter.
1800         (_Safe_iterator<>::_Const_iterator): Remove.
1801         (_Safe_iterator<>::_IsConstant): New.
1802         (_Safe_iterator<>::_OtherIterator): New.
1803         (_Safe_iterator<_It, _Sq, _Cat>::_Safe_iterator<_MutIte>(
1804         const _Safe_iterator<_MutIte, _Sq, _Cat>&)): Add _IsConstant::__value in
1805         __gnu_cxx::__enable_if condition.
1806         (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to): New.
1807         (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_from_begin): New.
1808         (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to_end): New.
1809         (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>): New.
1810         (_Safe_iterator<_It, _Sq, _Cat>::operator--()): Move...
1811         (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1812         ::operator--()): ...here.
1813         (_Safe_iterator<_It, _Sq, _Cat>::operator--(int)): Move...
1814         (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1815         ::operator--(int)): ...here.
1816         (_Safe_iterator<_It, _Sq, _Cat>::_M_decrementable()): Move...
1817         (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1818         ::_M_decrementable()): ...here.
1819         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>): New.
1820         (_Safe_iterator<_It, _Sq, _Cat>::operator[](const difference_type&)):
1821         Move...
1822         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1823         ::operator[](const difference_type&)): ...here.
1824         (_Safe_iterator<_It, _Sq, _Cat>::operator+=(const difference_type&)):
1825         Move...
1826         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1827         ::operator+=(const difference_type&)): ...here.
1828         (_Safe_iterator<_It, _Sq, _Cat>::operator+(const difference_type&)):
1829         Move...
1830         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1831         ::operator+(const difference_type&)): ...here.
1832         (_Safe_iterator<_It, _Sq, _Cat>::operator-=(const difference_type&)):
1833         Move...
1834         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1835         ::operator-=(const difference_type&)): ...here.
1836         (_Safe_iterator<_It, _Sq, _Cat>::operator-(const difference_type&)):
1837         Move...
1838         (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1839         ::operator-(const difference_type&)): ...here.
1840         (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1841         Constraint to random access iterators.
1842         (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1843         Likewise.
1844         (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1845         (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1846         Likewise.
1847         (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1848         (operator+(const difference_type&, const _Safe_iterator<>&)): Likewise.
1849         (__check_dereferenceable(const _Safe_iterator<>&)): Remove.
1850         (__get_distance): Remove.
1851         (__get_distance_from_begin): Remove.
1852         (__get_distance_to_end): Remove.
1853         (struct __is_safe_random_iterator<_Safe_iterator<>>): Remove partial
1854         specialization.
1855         (__base(const _Safe_iterator<>&, std::input_iterator_tag)): Remove.
1856         (__base(const _Safe_iterator<>&, std::random_access_iterator_tag)): Remove.
1857         (__base(const _Safe_iterator<>&)): Constraint to random access iterator.
1858         * include/debug/safe_iterator.tcc
1859         (_Safe_iterator<>::_M_get_distance_from_begin()): New.
1860         (_Safe_iterator<>::_M_get_distance_to_end()): New.
1861         (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator<>&)): New.
1862         (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1863         ::_M_valid_range): New.
1864         * include/debug/safe_local_iterator.h
1865         (_Safe_local_iterator<>::_Const_local_iterator): Remove.
1866         (_Safe_local_iterator<>::_IsConstant): New.
1867         (_Safe_local_iterator<>::_OtherIterator): New.
1868         (_Safe_local_iterator<_It, _Cont>::_Safe_local_iterator<_MutIte, _Cont>(
1869         const _Safe_local_iterator<_MutIte, _Seq>&)): Add _IsConstant::__value
1870         in __gnu_cxx::__enable_if condition. If singular compare base iterator
1871         with _MutIte rather than _It.
1872         (_Safe_local_iterator<>::_S_constant): Make constexpr.
1873         (_Safe_local_iterator<>::_M_get_distance_to): New.
1874         (__check_dereferenceable(const _Safe_local_iterator<>&)): Remove.
1875         (__get_distance(const _Safe_local_iterator<>&,
1876         const _Safe_local_iterator<>&, std::input_iterator_tag)): Remove.
1877         (__valid_range(const _Safe_local_iterator<>&,
1878         const _Safe_local_iterator<>&)): New.
1879         * include/debug/safe_local_iterator.tcc
1880         (_Safe_local_iterator<>::_M_get_distance_to): New.
1881         * include/debug/deque (std::__debug::deque<>): Add
1882         ::__gnu_debug::_Safe_iterator<> friend declaration.
1883         * include/debug/forward_list (std::__debug::forward_list<>): Likewise.
1884         * include/debug/list (std::__debug::list<>): Likewise.
1885         * include/debug/map.h (std::__debug::map<>): Likewise.
1886         * include/debug/multimap.h (std::__debug::multimap<>): Likewise.
1887         * include/debug/set.h (std::__debug::set<>): Likewise.
1888         * include/debug/multiset.h (std::__debug::multiset<>): Likewise.
1889         * include/debug/string (std::__debug::basic_string<>): Likewise.
1890         * include/debug/unordered_map (std::__debug::unordered_map<>): Likewise
1891         and add ::__gnu_debug::_Safe_local_iterator<> friend declaration.
1892         (std::__debug::unordered_multimap<>): Likewise.
1893         * include/debug/unordered_set (std::__debug::unordered_set<>): Likewise.
1894         (std::__debug::unordered_multiset<>): Likewise.
1895         * include/debug/formatter.h: Adapt.
1896         * include/debug/helper_functions.h
1897         (__gnu_debug::_Safe_local_iterator<>): Add declaration.
1898         (__get_distance<_Ite>(_Ite, _Ite, std::random_access_iterator_tag):
1899         Pass parameter by copy.
1900         (__get_distance<_Ite>(_Ite, _Ite, std::input_iterator_tag): Likewise.
1901         (__get_distance<_Ite>(_Ite, _Ite): Likewise.
1902         (__valid_range_aux<_Integral>): Pass _Integral by copy.
1903         (__valid_range<_InputIterator>): Pass _InputIterator by copy.
1904         (__valid_range<>(const _Safe_iterator<>&,
1905         const _Safe_iterator<>&, typename _Distance_traits<>::__type&)):
1906         Declare.
1907         (__valid_range(const _Safe_local_iterator<>&,
1908         const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
1909         Declare.
1910         (__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1911         Declare.
1912         (__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
1913         Declare.
1914         (__can_advance): Adapt.
1915         (struct __is_safe_random_iterator<>): Remove.
1916         (struct _SIter_base<>): Remove.
1917         * include/debug/functions.h: Include <bits/stl_iterator.h>.
1918         (__check_dereferenceable): Remove.
1919         (__foreign_iterator_aux4, __foreign_iterator_aux3): Adapt.
1920         (__foreign_iterator_aux2, __foreign_iterator_aux): Adapt.
1921         (__foreign_iterator): Adapt.
1922         * include/debug/stl_iterator.h
1923         (__is_safe_random_iterator<std::reverse_iterator<>>): Remove.
1924         (__base(const std::reverse_iterator<_Safe_iterator<_It, _Sq>)):
1925         Constraint for random access iterators.
1926         (__niter_base): Adapt.
1927         * testsuite/util/testsuite_containers.h:
1928         Include <bits/boost_concept_check.h>.
1929         (iterator_concept_checks<_It, _Mutable, _Category>): New.
1930         (citerator<_Cont>::forward_members::forward_members()): Instantiate
1931         latter for container iterator and const_iterator.
1932         * testsuite/23_containers/list/68222_neg.cc: New.
1933         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: Adapt
1934         line number.
1935         * testsuite/23_containers/unordered_set/debug/debug_functions.cc:
1936         (test01): Remove.
1937         * testsuite/23_containers/vector/debug/debug_functions.cc (test01):
1938         Remove.
1940 2018-08-22  Jonathan Wakely  <jwakely@redhat.com>
1942         PR libstdc++/77854
1943         * doc/xml/manual/status_cxx1998.xml: Document size_type and
1944         difference_type for containers.
1945         * doc/html/*: Regenerate.
1947 2018-08-21  François Dumont  <fdumont@gcc.gnu.org>
1949         P0646R1 Improving the Return Value of Erase-Like Algorithms I
1950         * include/debug/forward_list (forward_list::__remove_return_type):
1951         Define typedef as size_type or void, according to __cplusplus value.
1952         (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1953         empty, according to __cplusplus value.
1954         (_GLIBCXX20_ONLY): Define macro.
1955         (forward_list::remove, forward_list::unique): Use typedef and macro
1956         to change return type and add abi-tag for C++2a. Return number of
1957         removed elements for C++2a.
1958         (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
1959         typedef to change return type for C++2a. Return number of removed
1960         elements for C++2a.
1961         * include/debug/list (list::__remove_return_type): Define typedef as
1962         size_type or void, according to __cplusplus value.
1963         (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1964         empty, according to __cplusplus value.
1965         (_GLIBCXX20_ONLY): Define macro.
1966         (list::remove, list::unique): Use typedef and macro to change return
1967         type and add abi-tag for C++2a. Return number of removed elements for
1968         C++2a.
1969         (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef
1970         to change return type for C++2a. Return number of removed elements for
1971         C++2a.
1973 2018-08-21  David Edelsohn  <dje.gcc@gmail.com>
1975         * testsuite/18_support/new_nothrow.cc: XFAIL on AIX.
1977 2018-08-21  Jonathan Wakely  <jwakely@redhat.com>
1979         * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Remove
1980         redundant dg-do directive.
1981         * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1982         * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1983         * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1984         * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1986 2018-08-20  Jonathan Wakely  <jwakely@redhat.com>
1988         PR libstdc++/86963
1989         * include/std/tuple (_Tuple_impl::operator=): Define as deleted.
1990         (_Tuple_impl::_M_assign): New functions to perform assignment instead
1991         of assignment operators.
1992         (_Tuple_impl::_M_swap): Remove exception specification.
1993         (_Tuple_impl<_Idx, _Head>): Likewise.
1994         (_TC::_NonNestedTuple, _TC::_NotSameTuple): Use __remove_cvref_t.
1995         (__tuple_base): Remove.
1996         (tuple, tuple<_T1, _T2>): Remove inheritance from __tuple_base.
1997         (tuple::operator=, tuple<_T1, _T2>::operator=): Call _M_assign.
1998         (tuple::swap, tuple<_T1, _T2>::swap): Define exception specification
1999         using __is_nothrow_swappable.
2000         (tuple<_T1, _T2>::tuple(_U1&&, _U2&&)): Use __remove_cvref_t.
2002         * include/std/optional (_Optional_payload): Use variable templates
2003         for conditions in default template arguments and exception
2004         specifications.
2005         (optional): Likewise. Adjust indentation.
2006         (optional::__not_self, optional::__not_tag, optional::_Requires): New
2007         SFINAE helpers.
2008         (optional::optional): Use new helpers in constructor constraints.
2009         * include/std/type_traits (__or_v, __and_v): New variable templates.
2010         * testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
2011         dg-prune-output. Remove unused header.
2013 2018-08-18  François Dumont  <fdumont@gcc.gnu.org>
2015         * testsuite/25_algorithms/copy/86658.cc: Use dg-options to define
2016         _GLIBCXX_DEBUG.
2018 2018-08-17  Jonathan Wakely  <jwakely@redhat.com>
2020         PR libstdc++/86963
2021         * include/std/tuple (__tuple_base): New class template with deleted
2022         copy assignment operator.
2023         (tuple, tuple<_T1, _T2>): Derive from __tuple_base<tuple> so that
2024         implicit copy/move assignment operator will be deleted/suppressed.
2025         (tuple::__assignable, tuple<_T1, _T2>::__assignable): New helper
2026         functions for SFINAE constraints on assignment operators.
2027         (tuple::__nothrow_assignable, tuple<_T1, _T2>::__nothrow_assignable):
2028         New helper functions for exception specifications.
2029         (tuple::operator=(const tuple&), tuple::operator=(tuple&&))
2030         (tuple<_T1, _T2>::operator=(const tuple&))
2031         (tuple<_T1, _T2>::operator=(tuple&&)): Change parameter types to
2032         __nonesuch_no_braces when the operator should be defined implicitly.
2033         Use __nothrow_assignable for exception specifications.
2034         (tuple::operator=(const tuple<_UElements...>&))
2035         (tuple::operator=(tuple<_UElements...>&&))
2036         (tuple<_T1, _T2>::operator=(const tuple<_U1, _U2>&))
2037         (tuple<_T1, _T2>::operator=(tuple<_U1, _U2>&&))
2038         (tuple<_T1, _T2>::operator=(const pair<_U1, _U2>&))
2039         (tuple<_T1, _T2>::operator=(pair<_U1, _U2>&&)): Constrain using
2040         __assignable and use __nothrow_assignable for exception
2041         specifications.
2042         * python/libstdcxx/v6/printers.py (is_specialization_of): Accept
2043         gdb.Type as first argument, instead of a string.
2044         (StdTuplePrinter._iterator._is_nonempty_tuple): New method to check
2045         tuple for expected structure.
2046         (StdTuplePrinter._iterator.__init__): Use _is_nonempty_tuple.
2047         * testsuite/20_util/tuple/dr2729.cc: New test.
2048         * testsuite/20_util/tuple/element_access/get_neg.cc: Change dg-error
2049         to dg-prune-output.
2051 2018-08-16  Jonathan Wakely  <jwakely@redhat.com>
2053         * include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning
2054         about signed/unsigned comparison.
2056         * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
2057         deprecation warnings for using uncaught_exception().
2059         PR libstdc++/86447
2060         * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
2061         (logic_error::logic_error(logic_error&&))
2062         (logic_error::operator=(logic_error&&))
2063         (runtime_error::runtime_error(runtime_error&&))
2064         (runtime_error::operator=(runtime_error&&)): Copy strings instead of
2065         moving, to avoid allocating empty reps for moved-from strings.
2067 2018-08-15  Jonathan Wakely  <jwakely@redhat.com>
2069         * include/experimental/regex: Remove begin/end macros for namespace.
2070         * include/experimental/string: Likewise.
2071         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
2072         New test.
2073         * testsuite/experimental/polymorphic_allocator/
2074         pmr_typedefs_forward_list.cc: New test.
2075         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
2076         New test.
2077         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
2078         New test.
2079         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
2080         New test.
2081         * testsuite/experimental/polymorphic_allocator/
2082         pmr_typedefs_multimap.cc: New test.
2083         * testsuite/experimental/polymorphic_allocator/
2084         pmr_typedefs_multiset.cc: New test.
2085         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
2086         New test.
2087         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
2088         New test.
2089         * testsuite/experimental/polymorphic_allocator/
2090         pmr_typedefs_unordered_map.cc: New test.
2091         * testsuite/experimental/polymorphic_allocator/
2092         pmr_typedefs_unordered_multimap.cc: New test.
2093         * testsuite/experimental/polymorphic_allocator/
2094         pmr_typedefs_unordered_multiset.cc: New test.
2095         * testsuite/experimental/polymorphic_allocator/
2096         pmr_typedefs_unordered_set.cc: New test.
2097         * testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
2098         New test.
2100         * include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
2101         calls to __uses_allocator_construct_impl and __use_alloc.
2102         * include/experimental/memory_resource
2103         (polymorphic_allocator::_M_construct): Remove.
2104         (polymorphic_allocator::construct): Call __uses_allocator_construct.
2105         Qualify calls to __use_alloc.
2106         * include/std/memory_resource (polymorphic_allocator::construct): Fix
2107         type in SFINAE constraint. Use constexpr if instead of tag dispatching
2108         to _S_construct overloads.
2109         (polymorphic_allocator::construct(pair<T1, T2>*, ...)): Fix order of
2110         arguments to _S_construct_p.
2111         (polymorphic_allocator::_S_construct): Remove.
2112         (polymorphic_allocator::_S_construct_p): Return allocators by value
2113         not by reference.
2114         * include/std/scoped_allocator (scoped_allocator_adaptor::construct):
2115         Qualify calls to __use_alloc.
2116         * testsuite/20_util/polymorphic_allocator/construct_pair.cc: New test,
2117         copied from testsuite/20_util/scoped_allocator/construct_pair.cc.
2118         * testsuite/experimental/polymorphic_allocator/1.cc: New test.
2119         * testsuite/experimental/polymorphic_allocator/construct_pair.cc:
2120         New test.
2122         * src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
2123         (atomic_mem_res): Add unsynchronized definition for single-threaded.
2125 2018-08-14  Jonathan Wakely  <jwakely@redhat.com>
2127         PR libstdc++/86954
2128         * include/bits/stl_tempbuf.h (return_temporary_buffer): Use
2129         non-placement delete.
2131         * include/std/chrono (__check_overflow): Simplify definition.
2132         (_Checked_integral_constant): Remove.
2134         PR libstdc++/86846
2135         * src/c++17/default_resource.h: New file, defining default_res.
2136         * src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
2137         (atomic_mem_res): Define alternative for atomic<memory_resource*>
2138         using a mutex instead of atomics.
2140         PR libstdc++/85343
2141         * config/abi/pre/gnu.ver: Export new symbol.
2142         * doc/xml/manual/abi.xml: Document new versions.
2143         * include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
2144         (basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
2145         * include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
2146         Declare new overload.
2147         * src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
2148         and static member function.
2149         (__throw_ios_failure(const char*, int)): Define.
2150         * src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
2151         (__throw_ios_failure(const char*, int)): Define.
2153 2018-08-14  Jeremy Sawicki  <jeremy-gcc@sawicki.us>
2155         * include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&))
2156         (_Rope_const_iterator::operator=(const _Rope_const_iterator&))
2157         (_Rope_iterator::operator=(const _Rope_iterator&)): Ensure
2158         copied/assigned rope iterators don't retain pointers to the iterator
2159         they were copied/assigned from.
2160         * testsuite/ext/rope/7.cc: New.
2162 2018-08-13  Jonathan Wakely  <jwakely@redhat.com>
2164         PR libstdc++/45093
2165         * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
2166         Combine definitions to avoid --detect-odr-violations warning.
2168         * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
2169         __is_pow2 to check for valid alignment. Avoid branching when rounding
2170         size to multiple of alignment.
2172         * include/Makefile.am: Install <bit> and <version> for freestanding.
2173         * include/Makefile.in: Regenerate.
2174         * testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.
2176         Revert
2177         2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2179         PR target/85904
2180         * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
2181         Newlib.
2182         * configure: Regenerate.
2184 2018-08-10  Jonathan Wakely  <jwakely@redhat.com>
2186         PR libstdc++/68210
2187         * doc/xml/manual/intro.xml: Document LWG 206 change.
2188         * libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
2189         * libsupc++/del_opa.cc: Likewise.
2190         * libsupc++/del_opant.cc: Likewise.
2191         * libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
2192         of free(ptr).
2193         * libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
2194         * libsupc++/del_opsa.cc: Likewise.
2195         * libsupc++/del_opva.cc: Likewise.
2196         * libsupc++/del_opvant.cc: Likewise.
2197         * libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
2198         instead of operator delete(ptr).
2199         * libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
2200         * libsupc++/del_opvsa.cc: Likewise.
2201         * libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
2202         * libsupc++/new_opa.cc: Use nullptr instead of literal 0.
2203         * libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
2204         with noexcept.
2205         * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
2206         malloc(sz).
2207         * libsupc++/new_opvant.cc: Use nullptr and noexcept.
2208         * libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
2209         operator new(sz, nothrow).
2210         * testsuite/18_support/new_nothrow.cc: New test.
2212 2018-08-10  Martin Liska  <mliska@suse.cz>
2214         * libsupc++/new_op.cc (new): Remove __builtin_expect as malloc
2215         predictor can handle that.
2216         * libsupc++/new_opa.cc: Likewise.
2217         * libsupc++/new_opnt.cc (new): Likewise.
2219 2018-08-10  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2221         PR target/85904
2222         * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
2223         Newlib.
2224         * configure: Regenerate.
2226 2018-08-10  Jonathan Wakely  <jwakely@redhat.com>
2228         * include/std/deque (std::pmr::deque): Declare alias.
2229         * include/std/forward_list (std::pmr::forward_list): Likewise.
2230         * include/std/list (std::pmr::list): Likewise.
2231         * include/std/map (std::pmr::map, std::pmr::multimap): Likewise.
2232         * include/std/regex (std::pmr::match_results, std::pmr::cmatch)
2233         (std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise.
2234         * include/std/set (std::pmr::set, std::pmr::multiset): Likewise.
2235         * include/std/string (std::pmr::basic_string, std::pmr::string)
2236         (std::pmr::u16string, std::pmr::u32string, std::pmr::wstring):
2237         Likewise.
2238         * include/std/unordered_map (std::pmr::unordered_map)
2239         (std::pmr::unordered_multimap): Likewise.
2240         * include/std/unordered_set (std::pmr::unordered_set)
2241         (std::pmr::unordered_multiset): Likewise.
2242         * include/std/vector (std::pmr::vector): Likewise.
2243         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test.
2244         * testsuite/23_containers/deque/types/pmr_typedefs.cc: New test.
2245         * testsuite/23_containers/forward_list/pmr_typedefs.cc: New test.
2246         * testsuite/23_containers/list/pmr_typedefs.cc: New test.
2247         * testsuite/23_containers/map/pmr_typedefs.cc: New test.
2248         * testsuite/23_containers/multimap/pmr_typedefs.cc: New test.
2249         * testsuite/23_containers/multiset/pmr_typedefs.cc: New test.
2250         * testsuite/23_containers/set/pmr_typedefs.cc: New test.
2251         * testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test.
2252         * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New
2253         test.
2254         * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
2255         test.
2256         * testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test.
2257         * testsuite/23_containers/vector/pmr_typedefs.cc: New test.
2258         * testsuite/28_regex/match_results/pmr_typedefs.cc: New test.
2260 2018-08-08  François Dumont  <fdumont@gcc.gnu.org>
2262         * include/bits/stl_algo.h
2263         (__rotate(_Ite, _Ite, _Ite, forward_iterator_tag))
2264         (__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag))
2265         (__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move code
2266         duplication...
2267         (rotate(_Ite, _Ite, _Ite)): ...here.
2268         (__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, _Dist)):
2269         Simplify rotate call.
2270         (__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)):
2271         Likewise.
2272         (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
2273         Likewise.
2275 2018-08-08  Jonathan Wakely  <jwakely@redhat.com>
2277         * libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
2278         avoid clashing with an ::aligned_alloc function that was not detected
2279         by configure.
2281         * doc/xml/manual/using.xml: Fix markup for empty table entry.
2282         * doc/html/*: Regenerate.
2284         * doc/xml/manual/using.xml: Add missing header to table and fix typo.
2285         * doc/html/*: Regenerate.
2287         PR libstdc++/86597
2288         * include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
2289         Clear error_code when cached type is used.
2290         * testsuite/27_io/filesystem/directory_entry/86597.cc: New test.
2292 2018-08-07  Jonathan Wakely  <jwakely@redhat.com>
2294         PR libstdc++/86874
2295         * include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
2296         here instead of in _Move_assign_base.
2297         (_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
2298         (_Copy_assign_base::operator=): Use _M_destructive_move when changing
2299         the contained value to another alternative.
2300         (_Move_assign_base::operator=): Likewise.
2301         (_Move_assign_base::_M_destructive_move): Remove.
2302         * testsuite/20_util/variant/86874.cc: New test.
2304         PR libstdc++/86861
2305         * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
2306         Replace macro with inline function.
2307         [__sun]: Increase alignment to meet memalign precondition.
2308         [!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
2309         (aligned_alloc): Move check for valid alignment to operator new.
2310         Remove redundant check for non-zero size, it's enforced by the caller.
2311         (operator new): Move check for valid alignment here. Use
2312         __builtin_expect on check for zero size.
2314         * config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
2315         * include/std/memory_resource (monotonic_buffer_resource::release):
2316         Call _M_release_buffers to free buffers.
2317         (monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
2318         allocate a new buffer from upstream.
2319         (monotonic_buffer_resource::_M_new_buffer): Declare.
2320         (monotonic_buffer_resource::_M_release_buffers): Declare.
2321         (monotonic_buffer_resource::_Chunk): Replace definition with
2322         declaration as opaque type.
2323         * src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
2324         Define.
2325         (monotonic_buffer_resource::_M_new_buffer): Define.
2326         (monotonic_buffer_resource::_M_release_buffers): Define.
2328 2018-08-05  François Dumont  <fdumont@gcc.gnu.org>
2330         * include/bits/stl_iterator.h: Fix comment.
2332 2018-08-03  Jonathan Wakely  <jwakely@redhat.com>
2334         * src/c++11/system_error.cc
2335         (system_error_category::default_error_condition): Add workaround for
2336         ENOTEMPTY and EEXIST having the same value on AIX.
2337         * testsuite/19_diagnostics/error_category/system_category.cc: Add
2338         extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
2340 2018-08-01  Jonathan Wakely  <jwakely@redhat.com>
2342         * configure: Regenerate.
2343         * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS.
2344         * src/c++11/futex.cc: Use __glibcxx_assert instead of
2345         _GLIBCXX_DEBUG_ASSERT.
2347 2018-08-01  Mike Crowe  <mac@mcrowe.com>
2349         * include/std/condition_variable (wait_for): Use steady_clock.
2351 2018-08-01  Mike Crowe  <mac@mcrowe.com>
2353         * include/std/condition_variable (wait_until): Only report timeout
2354         if we really have timed out when measured against the
2355         caller-supplied clock.
2356         * testsuite/30_threads/condition_variable/members/2.cc: Add test
2357         case to confirm above behaviour.
2359 2018-08-01  Jonathan Wakely  <jwakely@redhat.com>
2361         PR libstdc++/60555
2362         * src/c++11/system_error.cc
2363         (system_error_category::default_error_condition): New override to
2364         check for POSIX errno values.
2365         * testsuite/19_diagnostics/error_category/generic_category.cc: New
2366         * testsuite/19_diagnostics/error_category/system_category.cc: New
2367         test.
2369 2018-07-31  Jonathan Wakely  <jwakely@redhat.com>
2371         PR libstdc++/86751
2372         * include/bits/stl_pair.h (__pair_base): New class with deleted copy
2373         assignment operator.
2374         (pair): Derive from __pair_base.
2375         (pair::operator=): Remove deleted overload.
2376         * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
2377         so that new base class isn't shown in GDB.
2378         * testsuite/20_util/pair/86751.cc: New test.
2379         * testsuite/20_util/pair/ref_assign.cc: New test.
2381         * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
2382         (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
2383         (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
2384         instead of __has_builtin.
2385         * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
2386         (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
2387         * include/std/version [!_GLIBCXX_HAS_GTHREADS]
2388         (__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
2389         (__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
2390         [!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
2391         (__cpp_lib_has_unique_object_representations): Don't define when
2392         builtin not available.
2393         [!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
2394         Likewise.
2395         [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
2396         * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
2397         from here.
2399         * doc/xml/manual/test.xml: Improve documentation on writing tests for
2400         newer standards.
2401         * doc/xml/manual/using.xml: Document all headers for C++11 and later.
2402         * doc/html/*: Regenerate.
2404         * include/ext/pointer.h [__cplusplus >= 201103L]
2405         (_Pointer_adapter::operator bool): Add explicit conversion operator
2406         to replace safe bool idiom.
2408 2018-07-30  Jonathan Wakely  <jwakely@redhat.com>
2410         PR libstdc++/86734
2411         * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
2412         _S_to_pointer (LWG 1052, LWG 2118).
2413         (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
2414         * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
2415         * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.
2417         * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
2418         workaround for aligned_alloc bug on AIX.
2419         * testsuite/18_support/new_aligned.cc: New test.
2421 2018-07-26  Marek Polacek  <polacek@redhat.com>
2423         * testsuite/30_threads/condition_variable_any/cond.cc: New.
2425 2018-07-26  Marek Polacek  <polacek@redhat.com>
2427         * src/c++98/locale_init.cc: Fix #ifdef condition.
2429 2018-07-26  Jonathan Wakely  <jwakely@redhat.com>
2431         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Add
2432         dg-require-cstdint directive.
2433         * testsuite/20_util/allocator/overaligned.cc: Likewise.
2434         * testsuite/20_util/any/cons/aligned.cc: Likewise.
2435         * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Likewise.
2436         * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: Likewise.
2437         * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
2438         Likewise.
2439         * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2440         * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise.
2441         * testsuite/23_containers/set/allocator/move_assign.cc: Likewise.
2442         * testsuite/25_algorithms/make_heap/complexity.cc: Likewise.
2443         * testsuite/25_algorithms/pop_heap/complexity.cc: Require cstdint and
2444         random_device effective-target.
2445         * testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
2446         * testsuite/25_algorithms/sample/1.cc: Require cstdint.
2447         * testsuite/25_algorithms/sample/2.cc: Likewise.
2448         * testsuite/25_algorithms/sort_heap/complexity.cc: Require cstdint
2449         and random_device.
2450         * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
2451         cstdint.
2452         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2453         Likewise.
2454         * testsuite/26_numerics/random/discard_block_engine/requirements/
2455         constexpr_data.cc: Likewise.
2456         * testsuite/26_numerics/random/discard_block_engine/requirements/
2457         constexpr_functions.cc: Likewise.
2458         * testsuite/26_numerics/random/independent_bits_engine/requirements/
2459         constexpr_functions.cc: Likewise.
2460         * testsuite/26_numerics/random/linear_congruential_engine/requirements/
2461         constexpr_data.cc: Likewise.
2462         * testsuite/26_numerics/random/linear_congruential_engine/requirements/
2463         constexpr_functions.cc: Likewise.
2464         * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
2465         constexpr_data.cc: Likewise.
2466         * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
2467         constexpr_functions.cc: Likewise.
2468         * testsuite/26_numerics/random/pr60037-neg.cc: Likewise.
2469         * testsuite/26_numerics/random/seed_seq/cons/65631.cc: Likewise.
2470         * testsuite/26_numerics/random/shuffle_order_engine/requirements/
2471         constexpr_data.cc: Add dg-require-cstdint directive.
2472         * testsuite/26_numerics/random/shuffle_order_engine/requirements/
2473         constexpr_functions.cc: Likewise.
2474         * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
2475         constexpr_data.cc: Likewise.
2476         * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
2477         constexpr_functions.cc: Likewise.
2478         * testsuite/26_numerics/random/uniform_real_distribution/operators/
2479         64351.cc: Likewise.
2480         * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Likewise.
2481         * testsuite/experimental/algorithm/sample-2.cc: Likewise.
2482         * testsuite/experimental/algorithm/sample.cc: Likewise.
2483         * testsuite/experimental/algorithm/search.cc: Likewise.
2484         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
2485         * testsuite/experimental/any/cons/aligned.cc: Likewise.
2486         * testsuite/experimental/memory_resource/new_delete_resource.cc:
2487         Likewise.
2488         * testsuite/experimental/memory_resource/resource_adaptor.cc: Likewise.
2489         * testsuite/experimental/random/randint.cc: Likewise.
2490         * testsuite/experimental/source_location/1.cc: Likewise.
2491         * testsuite/ext/bitmap_allocator/overaligned.cc: Likewise.
2492         * testsuite/ext/malloc_allocator/overaligned.cc: Likewise.
2493         * testsuite/ext/mt_allocator/overaligned.cc: Likewise.
2494         * testsuite/ext/new_allocator/overaligned.cc: Likewise.
2495         * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise.
2496         * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
2497         * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
2498         * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
2499         * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
2500         * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
2501         * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2502         * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
2503         * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
2504         * testsuite/ext/pool_allocator/overaligned.cc: Likewise.
2505         * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Likewise.
2506         * testsuite/ext/throw_allocator/check_deallocate_null.cc: Likewise.
2507         * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
2508         * testsuite/ext/throw_allocator/check_new.cc: Likewise.
2509         * testsuite/ext/throw_allocator/deallocate_global.cc: Likewise.
2510         * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2511         * testsuite/ext/throw_allocator/explicit_instantiation.cc: Likewise.
2512         * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
2513         * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
2515         * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
2516         * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
2517         * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
2518         * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
2519         Likewise.
2520         * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
2521         * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
2522         * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
2523         Likewise.
2524         * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
2525         Likewise.
2526         * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
2527         Likewise.
2528         * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
2529         * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
2530         * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
2531         * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
2532         * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
2533         * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
2534         Likewise.
2535         * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
2536         Likewise.
2537         * testsuite/30_threads/recursive_timed_mutex/dest/
2538         destructor_locked.cc: Likewise.
2539         * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
2540         * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
2541         * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
2542         Likewise.
2543         * testsuite/30_threads/recursive_timed_mutex/native_handle/
2544         typesizes.cc: Likewise.
2545         * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
2546         Likewise.
2547         * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
2548         Likewise.
2549         * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
2550         Likewise.
2551         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
2552         Likewise.
2553         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2554         Likewise.
2555         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2556         Likewise.
2557         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2558         Likewise.
2559         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
2560         Likewise.
2561         * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
2562         * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
2563         * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
2564         * testsuite/30_threads/scoped_lock/requirements/
2565         explicit_instantiation.cc: Likewise.
2566         * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise.
2567         * testsuite/30_threads/shared_future/cons/assign.cc: Likewise.
2568         * testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.
2569         * testsuite/30_threads/shared_future/cons/copy.cc: Likewise.
2570         * testsuite/30_threads/shared_future/cons/default.cc: Likewise.
2571         * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
2572         * testsuite/30_threads/shared_future/cons/move_assign.cc: Likewise.
2573         * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
2574         * testsuite/30_threads/shared_future/members/get.cc: Likewise.
2575         * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
2576         * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
2577         * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
2578         * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
2579         * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
2580         * testsuite/30_threads/shared_future/requirements/
2581         explicit_instantiation.cc: Likewise.
2582         * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
2583         * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
2584         * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
2585         * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
2586         * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
2587         * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
2588         * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
2589         * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
2590         * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
2591         * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
2592         * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
2593         * testsuite/30_threads/shared_lock/requirements/
2594         explicit_instantiation.cc: Likewise.
2595         * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Likewise.
2596         * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2597         * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Likewise.
2598         * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
2599         * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
2600         Likewise.
2601         * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2602         * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2603         * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2604         * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
2605         * testsuite/30_threads/shared_timed_mutex/cons/assign_neg.cc: Likewise.
2606         * testsuite/30_threads/shared_timed_mutex/cons/copy_neg.cc: Likewise.
2607         * testsuite/30_threads/shared_timed_mutex/requirements/
2608         standard_layout.cc: Likewise.
2609         * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
2610         * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
2611         * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
2612         * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
2613         * testsuite/30_threads/this_thread/1.cc: Likewise.
2614         * testsuite/30_threads/this_thread/2.cc: Likewise.
2615         * testsuite/30_threads/this_thread/3.cc: Likewise.
2616         * testsuite/30_threads/this_thread/4.cc: Likewise.
2617         * testsuite/30_threads/this_thread/58038.cc: Likewise.
2618         * testsuite/30_threads/thread/70503.cc: Likewise.
2619         * testsuite/30_threads/thread/84532.cc: Likewise.
2620         * testsuite/30_threads/thread/adl.cc: Likewise.
2621         * testsuite/30_threads/thread/cons/1.cc: Likewise.
2622         * testsuite/30_threads/thread/cons/2.cc: Likewise.
2623         * testsuite/30_threads/thread/cons/3.cc: Likewise.
2624         * testsuite/30_threads/thread/cons/4.cc: Likewise.
2625         * testsuite/30_threads/thread/cons/49668.cc: Likewise.
2626         * testsuite/30_threads/thread/cons/5.cc: Likewise.
2627         * testsuite/30_threads/thread/cons/6.cc: Likewise.
2628         * testsuite/30_threads/thread/cons/7.cc: Likewise.
2629         * testsuite/30_threads/thread/cons/8.cc: Likewise.
2630         * testsuite/30_threads/thread/cons/84535.cc: Likewise.
2631         * testsuite/30_threads/thread/cons/9.cc: Likewise.
2632         * testsuite/30_threads/thread/cons/assign_neg.cc: Likewise.
2633         * testsuite/30_threads/thread/cons/copy_neg.cc: Likewise.
2634         * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2635         * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
2636         * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
2637         * testsuite/30_threads/thread/id/operators.cc: Likewise.
2638         * testsuite/30_threads/thread/members/1.cc: Likewise.
2639         * testsuite/30_threads/thread/members/2.cc: Likewise.
2640         * testsuite/30_threads/thread/members/3.cc: Likewise.
2641         * testsuite/30_threads/thread/members/4.cc: Likewise.
2642         * testsuite/30_threads/thread/members/5.cc: Likewise.
2643         * testsuite/30_threads/thread/members/hardware_concurrency.cc:
2644         Likewise.
2645         * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
2646         * testsuite/30_threads/thread/swap/1.cc: Likewise.
2647         * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
2648         * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
2649         * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
2650         * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
2651         * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
2652         * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
2653         * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
2654         Likewise.
2655         * testsuite/30_threads/timed_mutex/requirements/
2656         standard_layout.cc: Likewise.
2657         * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
2658         * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
2659         * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
2660         * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
2661         * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
2662         * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
2663         * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
2664         * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
2665         * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
2666         * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
2667         * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
2668         * testsuite/30_threads/try_lock/1.cc: Likewise.
2669         * testsuite/30_threads/try_lock/2.cc: Likewise.
2670         * testsuite/30_threads/try_lock/3.cc: Likewise.
2671         * testsuite/30_threads/try_lock/4.cc: Likewise.
2672         * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
2673         * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
2674         * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
2675         * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
2676         * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
2677         * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
2678         * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
2679         * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
2680         * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
2681         * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
2682         * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
2683         * testsuite/30_threads/unique_lock/requirements/
2684         explicit_instantiation.cc: Likewise.
2685         * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
2687         * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
2688         directive.
2689         * testsuite/30_threads/async/49668.cc: Likewise.
2690         * testsuite/30_threads/async/54297.cc: Likewise.
2691         * testsuite/30_threads/async/84532.cc: Likewise.
2692         * testsuite/30_threads/async/any.cc: Likewise.
2693         * testsuite/30_threads/async/async.cc: Likewise.
2694         * testsuite/30_threads/async/except.cc: Likewise.
2695         * testsuite/30_threads/async/forced_unwind.cc: Likewise.
2696         * testsuite/30_threads/async/launch.cc: Likewise.
2697         * testsuite/30_threads/async/lwg2021.cc: Likewise.
2698         * testsuite/30_threads/async/sync.cc: Likewise.
2699         * testsuite/30_threads/call_once/39909.cc: Likewise.
2700         * testsuite/30_threads/call_once/49668.cc: Likewise.
2701         * testsuite/30_threads/call_once/60497.cc: Likewise.
2702         * testsuite/30_threads/call_once/call_once1.cc: Likewise.
2703         * testsuite/30_threads/call_once/constexpr.cc: Likewise.
2704         * testsuite/30_threads/call_once/dr2442.cc: Likewise.
2705         * testsuite/30_threads/call_once/once_flag.cc: Likewise.
2706         * testsuite/30_threads/condition_variable/54185.cc: Likewise.
2707         * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
2708         * testsuite/30_threads/condition_variable/cons/assign_neg.cc:
2709         Likewise.
2710         * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise.
2711         * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
2712         * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
2713         * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
2714         * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
2715         * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
2716         * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
2717         Likewise.
2718         * testsuite/30_threads/condition_variable/requirements/
2719         standard_layout.cc: Likewise.
2720         * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
2721         * Likewise.
2722         * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
2723         * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
2724         * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
2725         * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
2726         Likewise.
2727         * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
2728         Likewise.
2729         * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
2730         * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2731         * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
2732         * testsuite/30_threads/future/cons/constexpr.cc: Likewise.
2733         * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
2734         * testsuite/30_threads/future/cons/default.cc: Likewise.
2735         * testsuite/30_threads/future/cons/move.cc: Likewise.
2736         * testsuite/30_threads/future/cons/move_assign.cc: Likewise.
2737         * testsuite/30_threads/future/members/45133.cc: Likewise.
2738         * testsuite/30_threads/future/members/get.cc: Likewise.
2739         * testsuite/30_threads/future/members/get2.cc: Likewise.
2740         * testsuite/30_threads/future/members/share.cc: Likewise.
2741         * testsuite/30_threads/future/members/valid.cc: Likewise.
2742         * testsuite/30_threads/future/members/wait.cc: Likewise.
2743         * testsuite/30_threads/future/members/wait_for.cc: Likewise.
2744         * testsuite/30_threads/future/members/wait_until.cc: Likewise.
2745         * testsuite/30_threads/future/requirements/explicit_instantiation.cc:
2746         Likewise.
2747         * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
2748         Likewise.
2749         * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
2750         * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Likewise.
2751         * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
2752         * testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
2753         * testsuite/30_threads/lock/1.cc: Likewise.
2754         * testsuite/30_threads/lock/2.cc: Likewise.
2755         * testsuite/30_threads/lock/3.cc: Likewise.
2756         * testsuite/30_threads/lock/4.cc: Likewise.
2757         * testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
2758         * testsuite/30_threads/lock_guard/requirements/
2759         explicit_instantiation.cc: Likewise.
2760         * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Likewise.
2761         * testsuite/30_threads/mutex/cons/1.cc: Likewise.
2762         * testsuite/30_threads/mutex/cons/assign_neg.cc: Likewise.
2763         * testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
2764         * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
2765         * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
2766         * testsuite/30_threads/mutex/lock/1.cc: Likewise.
2767         * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
2768         * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
2769         * testsuite/30_threads/mutex/requirements/standard_layout.cc::
2770         Likewise.
2771         * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
2772         * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
2773         * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
2774         * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
2775         * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
2776         * testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
2777         * testsuite/30_threads/packaged_task/49668.cc: Likewise.
2778         * testsuite/30_threads/packaged_task/60564.cc: Likewise.
2779         * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
2780         * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
2781         * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
2782         * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
2783         * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
2784         * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2785         * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2786         * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Likewise.
2787         * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
2788         * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
2789         * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
2790         * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2791         Likewise.
2792         * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2793         * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2794         * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2795         * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2796         * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2797         * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2798         * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2799         * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2800         * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2801         * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2802         * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2803         * testsuite/30_threads/packaged_task/requirements/
2804         explicit_instantiation.cc: Likewise.
2805         * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2806         * testsuite/30_threads/promise/60966.cc: Likewise.
2807         * testsuite/30_threads/promise/69106.cc: Likewise.
2808         * testsuite/30_threads/promise/cons/1.cc: Likewise.
2809         * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2810         * testsuite/30_threads/promise/cons/alloc2.cc: Likewise.
2811         * testsuite/30_threads/promise/cons/alloc_min.cc: Likewise.
2812         * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
2813         * testsuite/30_threads/promise/cons/copy_neg.cc: Likewise.
2814         * testsuite/30_threads/promise/cons/move.cc: Likewise.
2815         * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2816         * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2817         * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2818         * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2819         * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2820         * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2821         * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2822         * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2823         * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2824         * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2825         * testsuite/30_threads/promise/members/swap.cc: Likewise.
2826         * testsuite/30_threads/promise/requirements/explicit_instantiation.cc:
2827         * Likewise.
2828         * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
2830         * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
2831         from namespace std.
2832         * testsuite/20_util/align/2.cc: Remove dg-require-cstdint directive.
2833         * testsuite/20_util/duration/arithmetic/1.cc: Likewise.
2834         * testsuite/20_util/duration/arithmetic/2.cc: Likewise.
2835         * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
2836         * testsuite/20_util/duration/arithmetic/dr934-1.cc: Likewise.
2837         * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
2838         * testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
2839         * testsuite/20_util/duration/cons/1.cc: Likewise.
2840         * testsuite/20_util/duration/cons/1_neg.cc: Likewise.
2841         * testsuite/20_util/duration/cons/2.cc: Likewise.
2842         * testsuite/20_util/duration/cons/54025.cc: Likewise.
2843         * testsuite/20_util/duration/cons/dr974_neg.cc: Likewise.
2844         * testsuite/20_util/duration/requirements/explicit_instantiation/
2845         explicit_instantiation.cc: Likewise.
2846         * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2847         * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2848         * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2849         * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Likewise.
2850         * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
2851         * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
2852         * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
2853         * testsuite/20_util/ratio/cons/cons1.cc: Likewise.
2854         * testsuite/20_util/ratio/operations/45866.cc: Likewise.
2855         * testsuite/20_util/ratio/operations/47913.cc: Likewise.
2856         * testsuite/20_util/ratio/operations/53840.cc: Likewise.
2857         * testsuite/20_util/ratio/operations/ops1.cc: Likewise.
2858         * testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
2859         * testsuite/20_util/system_clock/1.cc: Likewise.
2860         * testsuite/20_util/time_point/1.cc: Likewise.
2861         * testsuite/20_util/time_point/2.cc: Likewise.
2862         * testsuite/20_util/time_point/3.cc: Likewise.
2863         * testsuite/20_util/time_point/requirements/explicit_instantiation/
2864         explicit_instantiation.cc: Likewise.
2865         * testsuite/21_strings/basic_string/requirements/
2866         explicit_instantiation/char16_t/1.cc: Likewise.
2867         * testsuite/21_strings/basic_string/requirements/
2868         explicit_instantiation/char32_t/1.cc: Likewise.
2869         * testsuite/21_strings/basic_string_view/requirements/
2870         explicit_instantiation/char16_t/1.cc: Likewise.
2871         * testsuite/21_strings/basic_string_view/requirements/
2872         explicit_instantiation/char32_t/1.cc: Likewise.
2873         * testsuite/21_strings/char_traits/requirements/
2874         explicit_instantiation/char16_t/1.cc: Likewise.
2875         * testsuite/21_strings/char_traits/requirements/
2876         explicit_instantiation/char32_t/1.cc: Likewise.
2877         * testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
2878         * testsuite/22_locale/codecvt/char16_t.cc: Likewise.
2879         * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2880         * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
2881         Likewise.
2882         * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
2883         Likewise.
2884         * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
2885         Likewise.
2886         * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2887         * testsuite/23_containers/vector/bool/72847.cc: Likewise.
2888         * testsuite/23_containers/vector/debug/multithreaded_swap.cc:
2889         Likewise.
2890         * testsuite/experimental/string_view/requirements/
2891         explicit_instantiation/char16_t/1.cc: Likewise.
2892         * testsuite/experimental/string_view/requirements/
2893         explicit_instantiation/char32_t/1.cc: Likewise.
2894         * testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/
2895         1.cc: Likewise.
2896         * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
2897         1.cc: Likewise.
2899         * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2900         (random_condition, throw_value_random, throw_allocator_random)
2901         (std::hash<throw_value_random>): Do not define when <tr1/random> is
2902         not usable.
2903         * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
2904         define transactional memory support when <stdint.h> is not usable.
2906         * include/bits/hashtable_policy.h (__detail::__clp2): Use faster
2907         implementation that doesn't depend on <stdint.h> types.
2908         * include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
2909         std::size_t when std::uintptr_t is not usable.
2910         [!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
2911         (undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
2912         Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
2914         * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2915         (hash<u16string>, hash<u32string>): Remove dependency on
2916         _GLIBCXX_USE_C99_STDINT_TR1.
2917         * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2918         (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
2919         _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
2920         __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
2921         * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2922         (codecvt<char16_t, char, mbstate_t>)
2923         (codecvt<char32_t, char, mbstate_t>)
2924         (codecvt_byname<char16_t, char, mbstate_t>)
2925         (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
2926         on _GLIBCXX_USE_C99_STDINT_TR1.
2927         * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2928         (_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
2929         * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2930         (char_traits<char16_t>, char_traits<char32_t>)
2931         (basic_string<char16_t>, basic_string<char32_t>): Remove dependency
2932         on _GLIBCXX_USE_C99_STDINT_TR1.
2933         * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2934         (u16string_view, u32string_view, hash<u16string_view>)
2935         (hash<u32string_view>, operator""sv(const char16_t, size_t))
2936         (operator""sv(const char32_t, size_t)): Likewise.
2937         * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2938         (hash<__u16vstring>, hash<__u32vstring>): Likewise.
2939         * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2940         (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
2941         (__u32sso_string, __u32rc_string): Likewise.
2942         * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
2943         (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
2944         * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2945         (u16string_view, u32string_view, hash<u16string_view>)
2946         (hash<u32string_view>, operator""sv(const char16_t, size_t))
2947         (operator""sv(const char32_t, size_t)): Likewise.
2948         * src/c++11/codecvt.cc: Likewise.
2949         * src/c++98/locale_init.cc: Likewise.
2950         * src/c++98/localename.cc: Likewise.
2952         * include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2953         (__atomic_futex_unsigned_base): Remove dependency on
2954         _GLIBCXX_USE_C99_STDINT_TR1 macro.
2955         * include/bits/unique_lock.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2956         (unique_lock): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1.
2957         * include/c_global/cstdint [!_GLIBCXX_USE_C99_STDINT_TR1] (intmax_t)
2958         (uintmax_t): Define using predefined macros.
2959         * include/std/chrono [!_GLIBCXX_USE_C99_STDINT_TR1] (duration)
2960         (time_point, system_clock, high_resolution_clock, steady_clock): Remove
2961         dependency on _GLIBCXX_USE_C99_STDINT_TR1 macro.
2962         (nanoseconds, microseconds, milliseconds, seconds, minutes, hours):
2963         [!_GLIBCXX_USE_C99_STDINT_TR1]: Define using __INT64_TYPE__ or
2964         long long when <stdint.h> is not usable.
2965         * include/std/condition_variable [!_GLIBCXX_USE_C99_STDINT_TR1]
2966         (condition_variable, condition_variable_any): Remove dependency on
2967         _GLIBCXX_USE_C99_STDINT_TR1.
2968         * include/std/future [!_GLIBCXX_USE_C99_STDINT_TR1] (future, promise)
2969         (packaged_task, async): Likewise.
2970         * include/std/mutex [!_GLIBCXX_USE_C99_STDINT_TR1] (recursive_mutex)
2971         (timed_mutex, recursive_timed_mutex, try_lock, lock, scoped_lock)
2972         (once_flag, call_once): Likewise.
2973         * include/std/ratio [!_GLIBCXX_USE_C99_STDINT_TR1] (ratio): Likewise.
2974         * include/std/shared_mutex [!_GLIBCXX_USE_C99_STDINT_TR1]
2975         (shared_mutex, shared_timed_mutex, shared_lock): Likewise.
2976         * include/std/thread [!_GLIBCXX_USE_C99_STDINT_TR1] (thread)
2977         (this_thread::get_id, this_thread::yield, this_thread::sleep_for)
2978         (this_thread::sleep_until): Likewise.
2979         * src/c++11/chrono.cc: Remove dependency on
2980         _GLIBCXX_USE_C99_STDINT_TR1 macro.
2981         * src/c++11/condition_variable.cc: Likewise.
2982         * src/c++11/futex.cc: Likewise.
2983         * src/c++11/future.cc: Likewise.
2984         * src/c++11/mutex.cc: Likewise.
2985         * src/c++11/thread.cc: Likewise.
2986         * testsuite/20_util/duration/literals/range_neg.cc: Adjust dg-error.
2987         * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2988         * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2989         * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2990         * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
2991         * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2993 2018-07-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2995         PR libstdc++/77691
2996         * testsuite/experimental/memory_resource/new_delete_resource.cc:
2997         xfail execution on 32-bit Solaris/x86.
2999 2018-07-26  Marc Glisse  <marc.glisse@inria.fr>
3001         * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
3002         (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
3003         (vector::_M_move_assign): Reorder the swaps.
3005 2018-07-26  Jonathan Wakely  <jwakely@redhat.com>
3007         PR libstdc++/86676
3008         * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
3009         same alignment for post-release allocation.
3011 2018-07-25  Jonathan Wakely  <jwakely@redhat.com>
3013         PR libstdc++/86676
3014         * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
3015         buffer being misaligned and so returned pointer not being at start.
3017         * include/experimental/memory_resource: Include <cstddef> header.
3019         * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
3020         * src/Makefile.am: Add comment.
3021         * src/c++17/Makefile.in: Regenerate.
3023         * include/Makefile.am: Add new <bits/unique_lock.h> header.
3024         * include/Makefile.in: Regenerate.
3025         * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
3026         (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
3027         (unique_lock): Move definition to ...
3028         * include/bits/unique_lock.h: New header.
3029         [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
3030         [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
3031         (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
3032         (unique_lock::try_lock_for): Define only when <chrono> is usable.
3033         * include/std/condition_variable: Include <bits/unique_lock.h>.
3034         * include/std/mutex: Likewise.
3036 2018-07-24  Jonathan Wakely  <jwakely@redhat.com>
3038         * config/abi/pre/gnu.ver: Export new symbols.
3039         * configure: Regenerate.
3040         * include/Makefile.am: Add new <memory_resource> header.
3041         * include/Makefile.in: Regenerate.
3042         * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
3043         * include/std/memory_resource: New header.
3044         (memory_resource, polymorphic_allocator, new_delete_resource)
3045         (null_memory_resource, set_default_resource, get_default_resource)
3046         (pool_options, monotonic_buffer_resource): Define.
3047         * src/Makefile.am: Add c++17 directory.
3048         * src/Makefile.in: Regenerate.
3049         * src/c++11/Makefile.am: Fix comment.
3050         * src/c++17/Makefile.am: Add makefile for new sub-directory.
3051         * src/c++17/Makefile.in: Generate.
3052         * src/c++17/memory_resource.cc: New.
3053         (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
3054         (default_res, new_delete_resource, null_memory_resource)
3055         (set_default_resource, get_default_resource): Define.
3056         * testsuite/20_util/memory_resource/1.cc: New test.
3057         * testsuite/20_util/memory_resource/2.cc: New test.
3058         * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
3059         * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
3060         * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
3061         * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
3062         * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
3063         New test.
3064         * testsuite/20_util/polymorphic_allocator/1.cc: New test.
3065         * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
3066         * testsuite/20_util/polymorphic_allocator/select.cc: New test.
3067         * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
3068         Define concrete memory resource for testing.
3069         (__gnu_test::default_resource_mgr): Define RAII helper for changing
3070         default resource.
3072         PR libstdc++/86658
3073         * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
3074         parameter by reference, to avoid copying invalid iterators.
3075         * testsuite/25_algorithms/copy/86658.cc: New test.
3077         * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
3078         local variables for number of digits instead of type aliases.
3079         (__log2p1): Remove redundant branch also checked in __countl_zero.
3081         * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
3082         conditions. Add comments.
3083         * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
3084         * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
3085         * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
3087         * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
3088         (__uses_allocator_helper): Check conditions directly instead of
3089         using __is_erased_or_convertible.
3091         * include/experimental/memory_resource: Adjust comments and
3092         whitespace.
3093         (__resource_adaptor_imp): Add second template parameter for type of
3094         memory resource base class.
3095         (memory_resource): Define default constructor, destructor, copy
3096         constructor and copy assignment operator as defaulted.
3098         PR libstdc++/70966
3099         * include/experimental/memory_resource (__get_default_resource): Use
3100         placement new to create an object with dynamic storage duration.
3102 2018-07-23  Jonathan Wakely  <jwakely@redhat.com>
3104         PR libstdc++/70940
3105         * include/experimental/memory_resource
3106         (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
3107         (__resource_adaptor_common::__guaranteed_alignment): New helper to
3108         give maximum alignment an allocator guarantees. Specialize for known
3109         allocators using new and malloc.
3110         (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
3111         (__resource_adaptor_imp::do_deallocate): Likewise.
3112         * testsuite/experimental/memory_resource/new_delete_resource.cc:
3113         Check that new and delete are called with expected sizes.
3115 2018-07-20  Jonathan Wakely  <jwakely@redhat.com>
3117         PR libstdc++/86595
3118         * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
3119         noexcept.
3121 2018-07-20  Fangrui Song  <maskray@google.com>
3123         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
3124         _GLIBCXX_VISIBILITY(default).
3126 2018-07-20  Jonathan Wakely  <jwakely@redhat.com>
3128         PR libstdc++/86603
3129         * include/std/version: Move __cpp_lib_list_remove_return_type macro.
3131 2018-07-19  Jonathan Wakely  <jwakely@redhat.com>
3133         * include/std/type_traits (__is_member_object_pointer_helper): Use
3134         __not_<is_function<_Tp>>::type instead of integral_constant.
3135         (__is_member_function_pointer_helper): Likewise for
3136         is_function<_Tp>::type.
3137         (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
3138         (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
3139         (is_trivially_constructible): Remove redundant use of
3140         is_constructible.
3141         (__is_trivially_copy_assignable_impl): Remove redundant use of
3142         is_copy_assignable.
3143         (__is_trivially_move_assignable_impl): Remove redundant use of
3144         is_move_assignable.
3145         (is_trivially_destructible): Use __bool_constant.
3146         * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
3147         tests for scalar types.
3149 2018-07-19  Glen Joseph Fernandes  <glenjofe@gmail.com>
3151         * include/bits/stl_algobase.h (__copy_move_a): Used
3152         __is_trivially_copyable.
3153         (__copy_move_backward_a): Likewise.
3154         * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
3155         New test.
3157 2018-07-17  Jonathan Wakely  <jwakely@redhat.com>
3159         PR libstdc++/86450
3160         * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
3161         (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
3162         * configure: Regenerate.
3163         * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
3164         * doc/Makefile.in: Regenerate.
3165         * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
3166         * include/Makefile.in: Regenerate.
3167         * libsupc++/Makefile.in: Regenerate.
3168         * po/Makefile.in: Regenerate.
3169         * python/Makefile.in: Regenerate.
3170         * src/Makefile.in: Regenerate.
3171         * src/c++11/Makefile.in: Regenerate.
3172         * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
3173         from -Wabi=2 that don't affect exported symbols.
3174         * src/c++98/Makefile.in: Regenerate.
3175         * src/filesystem/Makefile.in: Regenerate.
3176         * testsuite/Makefile.in: Regenerate.
3178         * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
3179         (_Async_state_common::_M_join): Simplify use of std::call_once and
3180         corresponding explicit instantiation.
3181         (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
3182         (__bind_simple): Remove definitions and explicit instantiation that
3183         are not required by exported symbols.
3185 2018-07-16  Jonathan Wakely  <jwakely@redhat.com>
3187         * scripts/create_testsuite_files: Fix typo in comment.
3189         PR libstdc++/86537
3190         * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
3191         non-standard partial specialization.
3192         * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
3193         (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
3194         * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
3196 2018-07-16  Andreas Krebbel  <krebbel@linux.ibm.com>
3198         * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
3199         * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
3200         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3202 2018-07-06  François Dumont  <fdumont@gcc.gnu.org>
3204         * include/debug/functions.h (__gnu_debug::__check_string): Move...
3205         * include/debug/string (__gnu_debug::__check_string): ... here.
3206         (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
3207         (__glibcxx_check_string_n_constructor): New.
3208         (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
3209         Use latter.
3210         (__glibcxx_check_string_constructor): New.
3211         (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
3212         Use latter.
3213         * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
3214         * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
3216 2018-07-06  Jonathan Wakely  <jwakely@redhat.com>
3218         PR libstdc++/84928 use std::move in <numeric> algorithms
3219         * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
3220         conditionally move, according to __cplusplus value.
3221         (accumulate, inner_product, partial_sum, adjacent_difference): Use
3222         _GLIBCXX_MOVE_IF_20.
3223         * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
3224         * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
3225         * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
3226         * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
3228         * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
3230         P0935R0 Eradicating unnecessarily explicit default constructors
3231         * config/abi/pre/gnu.ver: Tighten existing patterns and export new
3232         default constructor symbols.
3233         * include/std/sstream (basic_stringbuf, basic_istringstream)
3234         (basic_ostringstream, basic_stringstream): Remove default arguments
3235         from explicit constructors taking ios_base::openmode and add separate
3236         non-explicit default constructors.
3237         * testsuite/27_io/basic_istringstream/cons/default.cc: New.
3238         * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
3239         * testsuite/27_io/basic_stringstream/cons/default.cc: New.
3240         * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
3241         * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
3243         * include/std/variant (__accepted_index): Use void_t.
3245 2018-07-05  Jonathan Wakely  <jwakely@redhat.com>
3247         PR libstdc++/85831
3248         * config/abi/pre/gnu.ver: Export move constructors and move
3249         assignment operators for std::logic_error and std::runtime_error.
3250         * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
3251         _GLIBCXX_USE_NOEXCEPT.
3252         (logic_error, runtime_error): Declare move constructors and move
3253         assignment operators. When not declared already, define copy
3254         constructors and copy assignment operators as explicit-defaulted.
3255         (domain_error, invalid_argument, length_error, out_of_range)
3256         (overflow_error, underflow_error): Define move constructors and move
3257         assignment operators as explicitly-defaulted.
3258         * libsupc++/exception.h (exception): Likewise.
3259         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
3260         move constructors and move assignment operators as defaulted.
3261         * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
3262         assignment operators are defined.
3264         * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
3265         COW strings.
3266         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3267         Likewise.
3268         * testsuite/21_strings/basic_string/requirements/
3269         explicit_instantiation/debug.cc: Likewise.
3271         PR libstdc++/58265
3272         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3273         (basic_string::assign(basic_string&&)): Add conditional noexcept
3274         depending on the allocator's is_always_equal property (LWG 2063).
3275         * testsuite/21_strings/basic_string/modifiers/assign/char/
3276         move_assign.cc: Check for non-throwing exception specification.
3277         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
3278         move_assign.cc: Likewise.
3280         PR libstdc++/58265
3281         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3282         [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
3283         Add GLIBCXX_NOEXCEPT.
3284         (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
3285         to depend on the allocator's is_always_equal property (LWG 2063).
3286         (basic_string::swap(basic_string&)): Likewise.
3287         * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
3288         (basic_string::swap(basic_string&)): Likewise.
3289         * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
3290         Check is_nothrow_move_assignable.
3291         * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
3292         Check is_nothrow_move_assignable.
3293         * testsuite/21_strings/basic_string/cons/char/
3294         noexcept_move_construct.cc: Likewise.
3295         * testsuite/21_strings/basic_string/cons/wchar_t/
3296         noexcept_move_construct.cc: Likewise.
3298 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
3300         P0646R1 Improving the Return Value of Erase-Like Algorithms I
3301         * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
3302         Define.
3303         (forward_list::__remove_return_type): Define typedef as size_type or
3304         void, according to __cplusplus value.
3305         (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
3306         empty, according to __cplusplus value.
3307         (forward_list::remove, forward_list::unique): Use typedef and macro
3308         to change return type and add abi-tag for C++2a.
3309         (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
3310         typedef to change return type for C++2a.
3311         * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
3312         (forward_list::remove, forward_list::remove_if<Pred>)
3313         (forward_list::unique<BinPred>): Return number of removed elements
3314         for C++2a.
3315         * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
3316         (list::remove, list::unique, list::remove_if<Predicate>)
3317         (list::unique<BinaryPredicate>): Return number of removed elements
3318         for C++2a.
3319         * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
3320         (list::__remove_return_type): Define typedef as size_type or
3321         void, according to __cplusplus value.
3322         (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
3323         empty, according to __cplusplus value.
3324         (list::remove, list::unique): Use typedef and macro to change return
3325         type and add abi-tag for C++2a.
3326         (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
3327         typedef to change return type for C++2a.
3328         * include/std/version (__cpp_lib_list_remove_return_type): Define.
3329         * testsuite/23_containers/forward_list/operations/
3330         remove_cxx20_return.cc: New.
3331         * testsuite/23_containers/forward_list/operations/
3332         unique_cxx20_return.cc: New.
3334         P0458R2 Checking for Existence of an Element in Associative Containers
3335         * include/bits/stl_map.h (map::contains): Add for C++2a.
3336         * include/bits/stl_multimap.h (multimap::contains): Likewise.
3337         * include/bits/stl_multiset.h (multiset::contains): Likewise.
3338         * include/bits/stl_set.h (set::contains): Likewise.
3339         * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
3340         (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
3341         (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
3342         (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
3343         * include/bits/unordered_map.h (unordered_map::contains)
3344         (unordered_multimap::contains): Add for C++2a.
3345         * include/bits/unordered_set.h (unordered_set::contains)
3346         (unordered_multiset::contains): Likewise.
3347         * testsuite/23_containers/map/operations/contains.cc: New.
3348         * testsuite/23_containers/multimap/operations/contains.cc: New.
3349         * testsuite/23_containers/multiset/operations/contains.cc: New.
3350         * testsuite/23_containers/set/operations/contains.cc: New.
3351         * testsuite/23_containers/unordered_map/operations/contains.cc: New.
3352         * testsuite/23_containers/unordered_multimap/operations/contains.cc:
3353         New.
3354         * testsuite/23_containers/unordered_multiset/operations/contains.cc:
3355         New.
3356         * testsuite/23_containers/unordered_set/operations/contains.cc: New.
3358 2018-07-04  François Dumont  <fdumont@gcc.gnu.org>
3360         PR libstdc++/86272
3361         * include/debug/string
3362         (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
3363         Use __glibcxx_check_insert_range.
3364         * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
3365         __gnu_debug::string when _GLIBCXX_DEBUG.
3366         * 21_strings/basic_string/init-list.cc: Likewise.
3367         * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
3368         * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
3369         * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
3370         * 21_strings/basic_string/types/1.cc: Likewise.
3372 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
3374         * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
3375         target for std::random_device.
3376         * testsuite/26_numerics/random/random_device/cons/default.cc:
3377         Likewise.
3378         * testsuite/experimental/algorithm/sample-2.cc: Likewise.
3379         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
3380         * testsuite/experimental/random/randint.cc: Likewise.
3381         * testsuite/lib/libstdc++.exp
3382         (check_effective_target_random_device): New proc.
3384 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
3385             Jakub Jelinek  <jakub@redhat.com>
3387         * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
3389 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
3391         PR libstdc++/86398
3392         * include/std/type_traits (is_trivially_constructible): Check
3393         is_constructible before __is_trivially_constructible.
3394         * testsuite/20_util/is_trivially_constructible/value.cc: Add more
3395         tests, including negative cases.
3396         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
3397         zero for dg-error lineno.
3398         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
3399         Likewise.
3401         * include/std/bit (__rotl, __rotr): Avoid branch.
3402         (_If_is_unsigned_integer): Use remove_cv_t.
3403         * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
3405 2018-07-03  Jonathan Wakely  <jwakely@redhat.com>
3407         P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
3408         * include/Makefile.am: Add new header.
3409         * include/Makefile.in: Regenerate.
3410         * include/precompiled/stdc++.h: Include new header.
3411         * include/std/bit: New header.
3412         (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
3413         (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
3414         Define for C++14.
3415         [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
3416         (countr_one, popcount): Define for C++2a. Also overload for std::byte.
3417         (ispow2, ceil2, floor2, log2p1): Define for C++2a.
3418         [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
3419         std::byte.
3420         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
3421         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
3422         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
3423         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
3424         * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
3425         * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
3426         * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
3427         * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
3428         * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
3429         * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
3431         * include/bits/alloc_traits.h: Remove redundant preprocessor
3432         condition.
3434 2018-07-03  François Dumont  <fdumont@gcc.gnu.org>
3436         * include/bits/stl_algobase.h (__niter_wrap): New.
3437         (__copy_move_a2(_II, _II, _OI)): Use latter.
3438         (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
3439         (fill_n(_OI, _Size, const _Tp&)): Likewise.
3440         (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
3441         * include/debug/stl_iterator.h
3442         (std::__niter_base(const __gnu_cxx::_Safe_iterator<
3443         __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
3444         * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
3445         __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
3447 2018-07-02  Jonathan Wakely  <jwakely@redhat.com>
3449         P0758R1 Implicit conversion traits
3450         * include/std/type_traits [__cplusplus > 201703]
3451         (__is_convertible_helper::__is_nothrow_type): Define new member.
3452         (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
3453         noexcept.
3454         (__is_convertible_helper<_From, _To, false>::__test_nothrow)
3455         (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
3456         new members.
3457         (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
3458         * testsuite/20_util/is_nothrow_convertible/value.cc: New.
3459         * testsuite/20_util/is_nothrow_convertible/requirements/
3460         explicit_instantiation.cc: New.
3461         * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
3462         New.
3464         P0887R1 The identity metafunction
3465         * include/std/type_traits (type_identity, type_identity_t): Define
3466         for C++2a.
3467         * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
3468         * testsuite/20_util/type_identity/requirements/
3469         explicit_instantiation.cc:New.
3470         * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
3472         * include/bits/regex.h (sub_match::operator string_type): Call str().
3473         (sub_match::compare): Use _M_str() instead of str().
3474         (sub_match::_M_compare): New public function.
3475         (sub_match::__string_view): New helper type.
3476         (sub_match::_M_str): New overloaded functions to avoid creating a
3477         string_type object when not needed.
3478         (operator==, operator!=, operator<, operator>, operator<=, operator>=):
3479         Use sub_match::_M_compare instead of creating string_type objects.
3480         Fix Doxygen comments.
3481         * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
3482         (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
3483         simplify.
3484         (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
3485         __enable_if_t.
3486         * include/std/type_traits (__enable_if_t): Define for C++11.
3487         * testsuite/28_regex/sub_match/compare.cc: New.
3488         * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
3489         trait.
3490         (input_iterator_wrapper): Use remove_cv for value_type argument of
3491         std::iterator base class.
3493 2018-06-29  Jonathan Wakely  <jwakely@redhat.com>
3495         * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
3496         Add whitespace to dejagnu directive.
3497         * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
3499 2018-06-27  François Dumont  <fdumont@gcc.gnu.org>
3501         * include/bits/stl_vector.h
3502         (struct _Vector_base<>::_Vector_impl_data): New.
3503         (struct _Vector_base<>::_Vector_impl): Inherit from latter.
3504         (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
3505         (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
3506         (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
3507         (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
3508         (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
3509         (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
3510         (_Vector_base()): Default.
3511         (_Vector_base(_Vector_base&&)): Default.
3512         (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
3513         (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
3514         (_Vector_base::_M_create_storage(size_t)): Make protected.
3515         (vector()): Default.
3516         (vector(vector&&)): Default.
3517         (vector(vector&&, const allocator_type&, true_type)): New.
3518         (vector(vector&&, const allocator_type&, false_type)): New.
3519         (vector(vector&&, const allocator_type&)): Use latters.
3520         (vector(_InputIte, _InputIte, const allocator_type&)): Call
3521         _M_range_initialize directly.
3522         * include/debug/vector
3523         (vector(vector&&, const allocator_type&)): Add noexcept qualification.
3524         * testsuite/23_containers/vector/allocator/default_init.cc: New.
3525         * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
3526         static assertions.
3528 2018-06-27  Jonathan Wakely  <jwakely@redhat.com>
3530         * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
3531         (__is_byte<byte>): Define specialization for std::byte.
3533         PR libstdc++/86138
3534         * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
3535         Declare explicit instantiations of COW empty reps and I/O functions.
3537 2018-06-26  David Edelsohn  <dje.gcc@gmail.com>
3539         * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
3540         directives.
3541         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
3543 2018-06-26  Jonathan Wakely  <jwakely@redhat.com>
3545         * include/bits/regex.tcc (regex_iterator::operator==): Add missing
3546         noexcept.
3548 2018-06-25  Jonathan Wakely  <jwakely@redhat.com>
3550         PR libstdc++/86112
3551         * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3552         Replace dict comprehension.
3554         PR libstdc++/81092
3555         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3557         PR libstdc++/86292
3558         * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
3559         Add try-catch block.
3560         * testsuite/23_containers/vector/cons/86292.cc: New.
3562         * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
3564         * include/experimental/algorithm (sample, shuffle): Add new overloads
3565         using per-thread random number engine.
3566         * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
3567         dependencies by using __gnu_test::test_container.
3568         * testsuite/experimental/algorithm/sample-2.cc: New.
3569         * testsuite/experimental/algorithm/shuffle.cc: New.
3571 2018-06-22  Jonathan Wakely  <jwakely@redhat.com>
3573         * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
3574         different size_t mangling on 32-bit targets.
3576         PR libstdc++/86280
3577         * include/experimental/memory_resource
3578         (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
3579         enough for result of left shift.
3581         PR libstdc++/86138
3582         * include/bits/basic_string.tcc:
3583         [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
3584         (basic_string<char>::_Rep::_S_empty_rep_storage)
3585         (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
3586         instantiation declarations.
3587         [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
3588         explicit instantiation declarations.
3589         * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
3590         * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
3592 2018-06-21  Jonathan Wakely  <jwakely@redhat.com>
3594         PR libstdc++/83328
3595         * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
3596         * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
3597         * configure: Regenerate.
3598         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
3599         (basic_string::insert(const_iterator, initializer_list<C>)): Add.
3600         [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
3601         (basic_string::insert(iterator, initializer_list<C>)): Suppress
3602         definition.
3603         * include/debug/string (basic_string::insert(iterator, C)): Change
3604         first parameter to const_iterator.
3605         (basic_string::insert(iterator, size_type, C)): Likewise. Change
3606         return type to iterator.
3607         (basic_string::insert(iterator, InputIterator, InputIterator)):
3608         Likewise.
3609         (basic_string::insert(iterator, initializer_list<C>)): Change first
3610         parameter to const_iterator and return type to iterator.
3611         * src/c++11/string-inst.cc: Extend comment.
3612         * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
3613         New.
3614         * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
3615         New.
3616         * testsuite/util/testsuite_abi.cc: Add new symbol version.
3618         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3620         PR libstdc++/70940
3621         * include/experimental/memory_resource
3622         (__resource_adaptor_imp::do_deallocate): Add missing return.
3623         * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
3624         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
3625         resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
3626         __gnu_cxx::malloc_allocator.
3628         PR libstdc++/70940
3629         * include/experimental/memory_resource (__resource_adaptor_common):
3630         New base class.
3631         (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
3632         pointer from unaligned, and vice versa.
3633         (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
3634         allocated pointer to meet alignment request.
3635         (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
3636         original pointer for deallocation.
3637         (__resource_adaptor_imp::do_is_equal): Reformat.
3638         (__resource_adaptor_imp::_S_aligned_size): Remove.
3639         (__resource_adaptor_imp::_S_supported): Remove.
3640         (new_delete_resource): Use __gnu_cxx::new_allocator.
3641         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
3642         extended alignments and use debug_allocator to check for matching
3643         allocate/deallocate pairs.
3645 2018-06-21  François Dumont  <fdumont@gcc.gnu.org>
3647         * include/debug/safe_iterator.h
3648         (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
3649         Compare __x base iterator with a value-initialized iterator of the
3650         same type.
3652 2018-06-20  Jonathan Wakely  <jwakely@redhat.com>
3654         PR libstdc++/70966
3655         * include/experimental/memory_resource (__resource_adaptor_imp): Add
3656         static assertions to enforce requirements on pointer types.
3657         (__resource_adaptor_imp::get_allocator()): Add noexcept.
3658         (new_delete_resource, null_memory_resource): Return address of an
3659         object with dynamic storage duration.
3660         (__null_memory_resource): Remove.
3661         * testsuite/experimental/memory_resource/70966.cc: New.
3663         * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
3664         missed from recent commit.
3666 2018-06-19  Jonathan Wakely  <jwakely@redhat.com>
3668         * include/std/utility: Remove unused <exception> header.
3670 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
3672         LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
3673         * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
3674         (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
3675         a specialization of std::pair.
3676         * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
3677         pair elements are constructed correctly.
3679         LWG 2989 hide path iostream operators from normal lookup
3680         * include/bits/fs_path.h (operator<<, operator>>): Define inline as
3681         friends.
3682         * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
3684         LWG 3050 Fix cv-qualification of convertibility constraints
3685         * include/std/chrono (duration, operator*, operator/, operator%): Use
3686         const-qualified type as source type in is_convertible constraints.
3687         * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
3688         * testsuite/20_util/duration/cons/dr3050.cc: New.
3689         * testsuite/20_util/duration/literals/range.cc: Rename to...
3690         * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
3691         dg-error lineno.
3693 2018-06-18  Maya Rashish  <coypu@sdf.org>
3695         * crossconfig.m4: Handle OpenBSD just like NetBSD.
3696         * configure: Rebuilt.
3698 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
3700         P0754R2 <version> header
3701         * include/Makefile.am: Add new header.
3702         * include/Makefile.in: Regenerate.
3703         * include/bits/c++config: Change doxygen comment to suggest <version>
3704         instead of <iosfwd>.
3705         * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
3706         unconditionally.  Add C++17 and C++20 headers.
3707         * include/std/version: New header.
3708         * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
3709         * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
3710         * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
3711         * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
3712         * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
3713         * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
3714         * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
3715         New.
3716         * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
3717         * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
3718         * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
3719         * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
3720         * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
3721         * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
3722         * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
3723         New.
3724         * testsuite/18_support/headers/version/macros.cc: New.
3725         * testsuite/18_support/headers/version/macros.cc: New.
3727         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
3728         enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
3729         symlink.
3730         * config.h.in: Regenerate.
3731         * configure: Regenerate.
3732         * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
3734         LWG 3035. std::allocator's constructors should be constexpr
3735         * include/bits/allocator.h (allocator): Add constexpr to constructors
3736         for C++2a. Replace dynamic exception specifications with NOTHROW
3737         macro.
3738         (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
3739         NOTHROW.
3740         * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
3741         * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
3742         to constructors for C++2a.
3743         * include/ext/new_allocator.h (new_allocator): Likewise.
3745 2018-06-16  Jonathan Wakely  <jwakely@redhat.com>
3747         LWG 3076 basic_string CTAD ambiguity
3748         * doc/xml/manual/intro.xml: Document LWG 3076 change.
3749         * include/bits/basic_string.h
3750         [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
3751         (basic_string(const _CharT*, const _Alloc&)): Turn into a function
3752         template constrained by _RequireAllocator.
3753         (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
3754         * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
3755         Define.
3756         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
3757         deduction
3758         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3759         Likewise.
3761 2018-06-15  Jonathan Wakely  <jwakely@redhat.com>
3763         PR libstdc++/86169
3764         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3765         (basic_string::data()): Unshare string.
3766         * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
3767         New.
3769         * include/std/string_view (basic_string_view(const CharT*)): Remove
3770         check for null pointer and add nonnull attribute.
3771         (compare(const CharT*), compare(size_type, size_type, const CharT*))
3772         (find(const CharT*, size_type), rfind(const CharT*, size_type))
3773         (find_first_of(const CharT*, size_type))
3774         (find_last_of(const CharT*, size_type))
3775         (find_first_not_of(const CharT*, size_type))
3776         (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
3777         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
3778         * testsuite/21_strings/basic_string_view/operations/compare/char/
3779         nonnull.cc: New.
3780         * testsuite/21_strings/basic_string_view/operations/find/char/
3781         nonnull.cc: New.
3782         * testsuite/21_strings/basic_string_view/operations/rfind/char/
3783         nonnull.cc: New.
3785         PR libstdc++/86168
3786         * include/bits/random.h (random_device(const string&)): Remove
3787         default argument.
3789         * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
3790         define for C++17 and above.
3792         LWG 2993 reference_wrapper<T> conversion from T&&
3793         * doc/xml/manual/intro.xml: Document LWG 2993 change.
3794         * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
3795         (reference_wrapper(_Tp&&)): Remove.
3796         (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
3797         template.
3798         (reference_wrapper): Add deduction guide.
3799         * testsuite/20_util/reference_wrapper/deduction.cc: New.
3800         * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
3802         LWG 3039 Unnecessary decay in thread and packaged_task
3803         * include/std/future (__constrain_pkgdtask): Replace with ...
3804         (packaged_task::__not_same): New alias template, using
3805         __remove_cvref_t instead of decay.
3806         * include/std/thread (thread::__not_same): Add comment.
3808 2018-06-14  Jonathan Wakely  <jwakely@redhat.com>
3810         LWG 3075 basic_string needs deduction guides from basic_string_view
3811         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
3812         deduction from string views.
3813         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3814         Likewise.
3816         LWG 3074 make scalar types non-deduced in valarray non-member functions
3817         * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
3818         scalar parameters to be a non-deduced context.
3819         * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
3820         whitespace.
3821         * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
3822         * testsuite/26_numerics/valarray/transcend.cc: New.
3824         * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
3825         Move back to <utility>.
3826         * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
3827         Restore to here.
3829         P0935R0 Eradicating unnecessarily explicit default constructors
3830         * include/backward/strstream (strstreambuf): Add non-explicit default
3831         constructor.
3832         * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
3833         Likewise.
3834         * include/bits/regex.h (match_results): Likewise.
3835         * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
3836         default constructor.
3837         * testsuite/22_locale/conversions/string/1.cc: Likewise.
3838         * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
3839         * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
3841         * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
3842         macro from <utility> and change type to long.
3843         * include/std/utility (__cpp_lib_tuple_element_t): Remove.
3844         * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
3845         macro.
3847         P0935R0 Eradicating unnecessarily explicit default constructors
3848         * include/bits/random.h (uniform_real_distribution::param_type)
3849         (normal_distribution::param_type, lognormal_distribution::param_type)
3850         (gamma_distribution::param_type, chi_squared_distribution::param_type)
3851         (cauchy_distribution::param_type, fisher_f_distribution::param_type)
3852         (student_t_distribution::param_type)
3853         (bernoulli_distribution::param_type)
3854         (binomial_distribution::param_type)
3855         (geometric_distribution::param_type)
3856         (negative_binomial_distribution::param_type)
3857         (poisson_distribution::param_type)
3858         (exponential_distribution::param_type)
3859         (weibull_distribution::param_type)
3860         (extreme_value_distribution::param_type): Add non-explicit default
3861         constructors. Remove default argument for first parameter of explicit
3862         constructors.
3863         * include/bits/uniform_int_dist.h
3864         (uniform_int_distribution::param_type): Likewise.
3865         * include/ext/random
3866         (beta_distribution::param_type, rice_distribution::param_type)
3867         (nakagami_distribution::param_type, pareto_distribution::param_type)
3868         (k_distribution::param_type, arcsine_distribution::param_type)
3869         (hoyt_distribution::param_type, triangular_distribution::param_type)
3870         (von_mises_distribution::param_type)
3871         (hypergeometric_distribution::param_type)
3872         (logistic_distribution::param_type)
3873         (uniform_inside_sphere_distribution::param_type): Likewise.
3874         (uniform_on_sphere_distribution::param_type): Make default constructor
3875         non-explicit.
3876         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
3877         Test param_type for non-explicit default constructor.
3878         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
3879         Likewise.
3880         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3881         Likewise.
3882         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3883         Likewise.
3884         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3885         Likewise.
3886         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3887         Likewise.
3888         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3889         Likewise.
3890         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3891         Likewise.
3892         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3893         Likewise.
3894         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3895         Likewise.
3896         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3897         Likewise.
3898         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3899         Likewise.
3900         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3901         Likewise.
3902         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3903         Likewise.
3904         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3905         Likewise.
3906         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3907         Likewise.
3908         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3909         Likewise.
3910         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3911         Likewise.
3912         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3913         Likewise.
3914         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3915         Likewise.
3916         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
3917         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
3918         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
3919         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
3920         Likewise.
3921         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
3922         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
3923         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
3924         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
3925         Likewise.
3926         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
3927         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
3928         * testsuite/ext/random/triangular_distribution/cons/default.cc:
3929         Likewise.
3930         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3931         Likewise.
3932         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3933         Likewise.
3934         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3935         Likewise.
3937 2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
3938             Jonathan Wakely  <jwakely@redhat.com>
3940         PR libstdc++/83982
3941         * include/bits/vector.tcc (vector::_M_default_append(size_type)):
3942         Default-construct new elements before moving existing ones.
3943         * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
3944         New.
3946 2018-06-13  Jonathan Wakely  <jwakely@redhat.com>
3948         PR libstdc++/86127
3949         * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
3950         unused typedef.
3951         (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
3952         Use node allocator to create and destroy elements.
3953         (forward_list::_Tp_alloc_type): Remove unused typedef.
3954         (forward_list::_Alloc_traits): Use allocator_traits instead of
3955         __gnu_cxx::__alloc_traits.
3957 2018-06-13  François Dumont  <fdumont@gcc.gnu.org>
3959         * include/debug/helper_functions.h
3960         (__gnu_debug::_Safe_iterator<>): Add declaration.
3961         (__can_advance(_Ite, _Size)): New.
3962         (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
3963         * include/debug/functions.h
3964         (__gnu_debug::_Safe_iterator<>): Remove declaration.
3965         * include/debug/stl_iterator.h
3966         (__can_advance(const _Safe_iterator<>&)): New definition.
3967         * include/debug/stl_iterator.h
3968         (__can_advance(const std::reverse_iterator<>&, _Size)): New.
3969         (__can_advance(const std::move_iterator<>&, _Size)): New.
3970         * include/debug/macros.h (__glibcxx_check_can_increment): New.
3971         * include/debug/debug.h (__glibcxx_requires_can_increment): New.
3972         * include/bits/stl_algobase.h (fill_n): Use latter.
3973         * testsuite/25_algorithms/fill_n/2.cc: New.
3974         * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
3975         * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
3976         * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
3977         * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
3979         * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
3980         (__glibcxx_requires_can_decrement_range): New.
3982 2018-06-12  François Dumont  <fdumont@gcc.gnu.org>
3984         * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
3985         (__glibcxx_check_can_decrement_range): New.
3986         * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
3987         __glibcxx_requires_can_increment_range.
3988         (std::move(_II, _II, _OI)): Likewise.
3989         (std::copy_backward(_BI, _BI, _BI2)): Use
3990         __glibcxx_requires_can_decrement_range.
3991         (std::move_backward(_BI, _BI, _BI2)): Likewise.
3992         * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
3993         * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
3994         * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
3995         * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
3996         * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
3997         * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
3999 2018-06-12  Jonathan Wakely  <jwakely@redhat.com>
4001         P0935R0 Eradicating unnecessarily explicit default constructors
4002         * include/bits/random.h (linear_congruential_engine)
4003         (mersenne_twister_engine, subtract_with_carry_engine, random_device)
4004         (uniform_real_distribution, normal_distribution)
4005         (lognormal_distribution, gamma_distribution, chi_squared_distribution)
4006         (cauchy_distribution, fisher_f_distribution, student_t_distribution)
4007         (bernoulli_distribution, binomial_distribution,geometric_distribution)
4008         (negative_binomial_distribution, exponential_distribution)
4009         (weibull_distribution, extreme_value_distribution): Add non-explicit
4010         default constructors. Remove default argument for first parameter of
4011         explicit constructors.
4012         (piecewise_constant_distribution, piecewise_linear_distribution):
4013         Make default constructor non-explicit.
4014         * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
4015         non-explicit default constructors. Remove default argument for first
4016         parameter of explicit constructor.
4017         * include/ext/random
4018         (simd_fast_mersenne_twister_engine, beta_distribution)
4019         (rice_distribution, nakagami_distribution, pareto_distribution)
4020         (k_distribution, arcsine_distribution, hoyt_distribution)
4021         (triangular_distribution, von_mises_distribution)
4022         (hypergeometric_distribution, logistic_distribution)
4023         (uniform_inside_sphere_distribution): Likewise.
4024         (uniform_on_sphere_distribution): Make default constructor
4025         non-explicit.
4026         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
4027         Test for non-explicit default constructor. Fix references to standard.
4028         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
4029         Likewise.
4030         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
4031         Likewise.
4032         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
4033         Likewise.
4034         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
4035         Likewise.
4036         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
4037         Likewise.
4038         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
4039         Likewise.
4040         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
4041         Likewise.
4042         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
4043         Likewise.
4044         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
4045         Likewise.
4046         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
4047         Likewise.
4048         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
4049         Likewise.
4050         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
4051         Likewise.
4052         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
4053         Likewise.
4054         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
4055         Likewise.
4056         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
4057         Likewise.
4058         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
4059         Likewise.
4060         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
4061         Likewise.
4062         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
4063         Likewise.
4064         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
4065         Likewise.
4066         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
4067         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
4068         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
4069         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
4070         Likewise.
4071         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
4072         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
4073         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
4074         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
4075         Likewise.
4076         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
4077         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
4078         * testsuite/ext/random/triangular_distribution/cons/default.cc:
4079         Likewise.
4080         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
4081         Likewise.
4082         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
4083         Likewise.
4084         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
4085         Likewise.
4086         * testsuite/util/testsuite_common_types.h
4087         (implicitly_default_constructible): New helper.
4089 2018-06-08  Jonathan Wakely  <jwakely@redhat.com>
4091         * include/bits/ios_base.h (ios::Init::Init(const Init&))
4092         (ios::Init::operator=): Define as defaulted.
4093         * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
4094         Likewise.
4095         * include/bits/stream_iterator.h (istream_iterator::operator=)
4096         (ostream_iterator::operator=): Likewise.
4097         * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
4098         Likewise.
4099         * include/std/bitset (bitset::reference::reference(const reference&)):
4100         Likewise.
4101         * include/std/complex (complex<float>::complex(const complex&))
4102         (complex<double>::complex(const complex&))
4103         (complex<long double>::complex(const complex&)): Likewise.
4105 2018-06-07  Jonathan Wakely  <jwakely@redhat.com>
4107         * include/bits/regex.h (sub_match): Add noexcept to default
4108         constructor and length observer.
4109         (match_results): Add noexcept to default constructor and observers
4110         with no preconditions. Define destructor as defaulted.
4111         (operator==, operator!=, swap): Add noexcept.
4112         (regex_iterator): Add default member initializers and define default
4113         constructor and destructor as defaulted. Add noexcept to equality
4114         and dereference operators.
4116 2018-06-07  François Dumont  <fdumont@gcc.gnu.org>
4118         * src/c++11/debug.cc
4119         (_Safe_iterator_base::_M_detach()): Reset state only if needed.
4120         (_Safe_iterator_base::_M_detach_single()): Likewise.
4121         (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
4122         (_Safe_local_iterator_base::_M_detach_single()): Likewise.
4124 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
4126         * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
4127         move of const value.
4129 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
4131         PR c++/86068
4132         * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
4133         rather than __cpp_transactional_memory >= 201505L.
4135 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
4137         PR libstdc++/86008
4138         * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
4139         Define new partial specialization.
4140         * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
4141         new overload.
4142         (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
4143         value not reference for iteration.
4144         * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
4145         comment.
4146         * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
4147         * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
4148         comment.
4150 2018-06-05  Jonathan Wakely  <jwakely@redhat.com>
4152         * include/std/type_traits: Fix comment typos.
4154         * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
4155         mingw* targets.
4156         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
4157         * testsuite/experimental/filesystem/operations/read_symlink.cc:
4158         Likewise.
4160 2018-06-05  François Dumont  <fdumont@gcc.gnu.org>
4162         * include/bits/stl_tempbuf.h
4163         (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
4164         (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
4165         * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
4166         * include/bits/stl_algo.h (__stable_partition): Adapt.
4167         (__inplace_merge): Adapt.
4168         (__stable_sort): Adapt.
4170 2018-06-04  Jonathan Wakely  <jwakely@redhat.com>
4172         PR libstdc++/85930
4173         * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
4174         unconditionally. Remove redundant declaration.
4175         [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
4176         alignment-specifier.
4178         * include/bits/postypes.h (fpos): Define special members as defaulted.
4180         PR libstdc++/85930
4181         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
4182         the static variable correctly.
4184 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
4186         PR libstdc++/78870 support std::filesystem on Windows
4187         * config.h.in: Regenerate.
4188         * configure: Regenerate.
4189         * configure.ac: Check for link, readlink and symlink.
4190         * include/bits/fs_path.h (path::operator/=(const path&)): Move
4191         definition out of class body.
4192         (path::is_absolute(), path::_M_append(path)): Likewise.
4193         (operator<<(basic_ostream, const path&)): Use std::quoted directly.
4194         (operator>>(basic_istream, path&)): Likewise.
4195         (u8path): Reorder definitions and fix Windows implementation.
4196         (path::is_absolute()): Define inline and fix for Windows.
4197         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
4198         Define POSIX version inline.
4199         (path::_M_append(path)): Define inline.
4200         * include/experimental/bits/fs_path.h (path::is_absolute()): Move
4201         definition out of class body.
4202         (operator<<(basic_ostream, const path&)): Fix type of delimiter and
4203         escape characters.
4204         (operator>>(basic_istream, path&)): Likewise.
4205         (path::is_absolute()): Define inline and fix for Windows.
4206         * src/filesystem/dir-common.h (__gnu_posix): New namespace.
4207         (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
4208         (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
4209         Define as adaptors for Windows functions/types or as
4210         using-declarations for POSIX functions/types.
4211         (_Dir_base, get_file_type): Qualify names to use declarations from
4212         __gnu_posix namespace.
4213         (_Dir_base::is_dor_or_dotdot): New helper functions.
4214         * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
4215         names to use declarations from __gnu_posix namespace.
4216         * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
4217         (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
4218         (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
4219         (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
4220         (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
4221         (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
4222         Define as adaptors for Windows functions/types or as
4223         using-declarations for POSIX functions/types.
4224         (stat_type, do_copy_file): Qualify names to use declarations from
4225         __gnu_posix namespace.
4226         (do_space): Declare new function.
4227         (make_file_type): Only use S_ISLNK if defined.
4228         * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
4229         path::value_type not char.
4230         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
4231         names to use declarations from __gnu_posix namespace.
4232         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
4233         add implementation for Windows.
4234         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
4235         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
4236         [!_PC_PATH_MAX]: Don't use pathconf.
4237         [PATH_MAX]: Use if defined.
4238         (filesystem::current_path(const path&, error_code&))
4239         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
4240         (filesystem::last_write_time, filesystem::permissions): Use names
4241         from __gnu_posix.
4242         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
4243         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
4244         implementation for Windows.
4245         (filesystem::rename, filesystem::resize_file): Use names from
4246         __gnu_posix.
4247         (filesystem::space): Use do_space.
4248         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
4249         (filesystem::status, filesystem::symlink_status): Use names from
4250         __gnu_posix.
4251         (filesystem::temp_directory_path): Add implementation for Windows.
4252         * src/filesystem/path.cc (dot): Define constant.
4253         (path::replace_extension): Use dot.
4254         (path::_M_find_extension): Likewise. Use path::string_type not
4255         std::string.
4256         (path::_M_split_cmpts): Use dot.
4257         (filesystem_error::_M_get_what): Use u8string() not native().
4258         * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
4259         Qualify names to use declarations from __gnu_posix namespace.
4260         * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
4261         correct error_code.
4262         (filesystem::absolute(const path&, error_code&)): Add implementation
4263         for Windows.
4264         (char_ptr, filesystem::canonical): Use path::value_type not char.
4265         (do_copy_file): Use names from __gnu_posix.
4266         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
4267         sendfile.
4268         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
4269         names to use declarations from __gnu_posix namespace.
4270         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
4271         add implementation for Windows.
4272         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
4273         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
4274         [!_PC_PATH_MAX]: Don't use pathconf.
4275         [PATH_MAX]: Use if defined.
4276         (filesystem::current_path(const path&, error_code&))
4277         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
4278         (filesystem::last_write_time, filesystem::permissions): Use names
4279         from __gnu_posix.
4280         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
4281         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
4282         implementation for Windows.
4283         (filesystem::rename, filesystem::resize_file): Use names from
4284         __gnu_posix.
4285         (do_space): Define.
4286         (filesystem::space): Use do_space.
4287         (filesystem::status, filesystem::symlink_status): Use names from
4288         __gnu_posix.
4289         (filesystem::temp_directory_path): Add implementation for Windows.
4290         * src/filesystem/std-path.cc
4291         [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
4292         Define for Windows.
4293         (dot): Define constant.
4294         (path::replace_extension, is_dot): Use dot.
4295         (path::lexically_normal): Check _M_type instead of calling
4296         non-existent function.
4297         (path::_M_find_extension): Use dot. Use path::string_type not
4298         std::string.
4299         (path::_M_split_cmpts): Use dot.
4300         (filesystem_error::_M_get_what): Use u8string() not native().
4301         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
4302         use symlinks.
4303         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
4304         Likewise.
4305         * testsuite/27_io/filesystem/operations/absolute.cc: Use
4306         __gnu_test::root_path() instead of "/" and add Windows-specific tests.
4307         * testsuite/27_io/filesystem/operations/canonical.cc: Use
4308         path::string() to get narrow string, not path::native().
4309         * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
4310         with std::filesystem::path not std::basic_string.
4311         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
4312         * testsuite/27_io/filesystem/operations/exists.cc: Use
4313         __gnu_test::root_path() instead of "/".
4314         * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
4315         fstreams with std::filesystem::path not std::basic_string.
4316         * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
4317         path::string() to get narrow string.
4318         * testsuite/27_io/filesystem/operations/space.cc: Check results for
4319         errors, expect sensible values otherwise.
4320         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
4321         helpers for adjusting the environment on Windows.
4322         * testsuite/27_io/filesystem/path/append/path.cc: Test
4323         Windows-specific behaviour.
4324         * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
4325         of path::string_type objects.
4326         * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
4327         string to wide string on Windows.
4328         * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
4329         for backslash as root-directory.
4330         * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
4331         path::string() to get narrow string.
4332         * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
4333         paths.
4334         * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
4335         not std::string.
4336         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
4337         different definintion of absolute paths on Windows.
4338         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4339         Do not use symlinks.
4340         * testsuite/experimental/filesystem/operations/absolute.cc: Test
4341         Windows behaviour.
4342         * testsuite/experimental/filesystem/operations/copy.cc: Construct
4343         fstreams with NTCTS not std::basic_string.
4344         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
4345         * testsuite/experimental/filesystem/operations/exists.cc: Use
4346         __gnu_test::root_path() instead of "/".
4347         * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
4348         fstreams with NTCTS not std::basic_string.
4349         * testsuite/experimental/filesystem/operations/last_write_time.cc:
4350         Use path::string() to get narrow string.
4351         * testsuite/experimental/filesystem/operations/space.cc: Use
4352         __gnu_test::root_path() instead of "/".
4353         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
4354         Add helpers for adjusting the environment on Windows.
4355         * testsuite/experimental/filesystem/path/append/path.cc: Use
4356         path::string() to get narrow strings for comparisons.
4357         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
4358         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
4359         Likewise.
4360         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
4361         * testsuite/experimental/filesystem/path/native/string.cc: Use
4362         string_type not std::string.
4363         * testsuite/experimental/filesystem/path/query/is_absolute.cc:
4364         Adjust for different definintion of absolute paths on Windows.
4365         * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
4366         function.
4367         (__gnu_test::scoped_file): Construct fstreams with NTCTS not
4368         std::basic_string.
4370 2018-05-31  Jonathan Wakely  <jwakely@redhat.com>
4372         PR libstdc++/85951
4373         * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
4374         uint_least16_t and uint_least32_t.
4375         (__make_unsigned<wchar_t>): Define unconditionally.
4376         (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
4377         typedefs.
4378         (__make_unsigned_selector_base): New type to provide helper templates.
4379         (__make_unsigned_selector<_Tp, false, true>): Reimplement using
4380         __make_unsigned_selector_base helpers.
4381         (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
4382         (__make_signed_selector<_Tp, true, false>): Remove intermediate
4383         typedefs.
4384         (__make_signed<wchar_t>, __make_signed<char16_t>)
4385         (__make_signed<char32_t>)): Define unconditionally.
4386         * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
4387         wchar_t, char16_t and char32_t are transformed correctly.
4388         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
4389         dg-error lineno.
4390         * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
4391         wchar_t, char16_t and char32_t are transformed correctly.
4392         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
4393         dg-error lineno.
4395 2018-05-29  Jonathan Wakely  <jwakely@redhat.com>
4397         * include/std/variant (__erased_dtor): Qualify call to __get.
4399 2018-05-27  François Dumont  <fdumont@gcc.gnu.org>
4401         * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
4402         (_Rb_tree(const allocator_type&)): Use latter.
4403         * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
4404         (map(initializer_list<value_type>, const allocator_type&)): Likewise.
4405         (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
4406         * include/bits/stl_multimap.h
4407         (multimap(const allocator_type&)): Likewise.
4408         (multimap(initializer_list<value_type>, const allocator_type&)):
4409         Likewise.
4410         (multimap(_InputIterator, _InputIterator, const allocator_type&)):
4411         Likewise.
4412         * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
4413         (set(initializer_list<value_type>, const allocator_type&)): Likewise.
4414         (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
4415         * include/bits/stl_multiset.h
4416         (multiset(const allocator_type&)): Likewise.
4417         (multiset(initializer_list<value_type>, const allocator_type&)):
4418         Likewise.
4419         (multiset(_InputIterator, _InputIterator, const allocator_type&)):
4420         Likewise.
4422 2018-05-25  François Dumont  <fdumont@gcc.gnu.org>
4424         PR libstdc++/85768
4425         * src/c++11/debug.cc: Remove backtrace usage.
4427 2018-05-24  Maya Rashish  <coypu@sdf.org>
4429         PR target/85904
4430         * crossconfig.m4: Test for aligned_alloc on netbsd.
4431         * configure: Regenerate.
4433 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
4435         PR libstdc++/69769
4436         PR libstdc++/85886
4437         * include/bits/atomic_base.h (__atomic_base::value_type)
4438         (__atomic_base::difference_type): Add new typedefs.
4439         * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
4440         (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
4441         (atomic<T*>::operator++, atomic<T*>::operator--)
4442         (atomic<T*>::operator+=, atomic<T*>::operator-=)
4443         (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
4444         to enforce C++17 requirement on pointer arithmetic.
4445         (__atomic_val_t, __atomic_diff_t): New alias templates.
4446         (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
4447         (atomic_compare_exchange_weak_explicit)
4448         (atomic_compare_exchange_strong_explicit, atomic_store)
4449         (atomic_exchange, atomic_compare_exchange_weak)
4450         (atomic_compare_exchange_strong): Use __atomic_val_t to make
4451         scalar parameters be non-deduced contexts.
4452         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
4453         (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
4454         atomic instead of __atomic_base, and use __atomic_diff_t for scalar
4455         parameters.
4456         (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
4457         (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
4458         (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
4459         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
4460         (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
4461         address types.
4462         * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
4463         * testsuite/29_atomics/atomic/69769.cc: New test.
4464         * testsuite/29_atomics/atomic/nonmembers.cc: New test.
4465         * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
4466         Disable test for C++17 and later.
4467         * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
4468         * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
4469         * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
4470         test.
4472 2018-05-23  Jonathan Wakely  <jwakely@redhat.com>
4474         * include/bits/fs_path.h (path::__is_encoded_char): Change from class
4475         template to alias template.
4476         (path::__value_type_is_char): Use remove_const_t.
4477         (path:_S_string_from_iter): New helper function.
4478         (path::_S_convert(InputIter, __null_terminated))
4479         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
4480         Use _S_string_from_iter.
4481         (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
4482         rep for COW strings.
4483         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4484         Change from class template to alias template.
4485         (path::__value_type_is_char): Use remove_const.
4486         (path:_S_string_from_iter): New helper function.
4487         (path::_S_convert(InputIter, __null_terminated))
4488         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
4489         Use _S_string_from_iter.
4490         * testsuite/27_io/filesystem/path/append/source.cc: Test appending
4491         wide strings.
4492         * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
4493         string equality, not path equivalence.
4494         * testsuite/27_io/filesystem/path/construct/format.cc: Check
4495         construction from std::string and std::wstring and input iterators.
4496         * testsuite/27_io/filesystem/path/construct/locale.cc: Check
4497         construction from iterators.
4498         * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
4499         exact string equality, not path equivalence.
4500         * testsuite/experimental/filesystem/path/construct/locale.cc: Check
4501         construction from iterators.
4503         * include/bits/fs_path.h (path::_M_type): Change default member
4504         initializer to _Filename.
4505         (path::begin): Create past-the-end iterator for empty path.
4506         * src/filesystem/std-path.cc (path::remove_filename()): Remove
4507         debugging check.
4508         (path::has_relative_path()): Return false for empty filenames.
4509         (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
4510         Fix offset of empty final component.
4511         * testsuite/27_io/filesystem/path/itr/components.cc: New.
4512         * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
4514 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
4516         Add support for opening file streams from wide character strings.
4517         * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
4518         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
4519         Define new overload.
4520         * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
4521         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
4522         Declare new overload.
4523         * configure.ac: Check for _wfopen.
4524         * crossconfig.m4: Likewise.
4525         * configure: Regenerate.
4526         * config.h.in: Regenerate.
4527         * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
4528         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
4529         Define new overload.
4530         * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
4531         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
4532         Declare new overload.
4533         [_GLIBCXX_HAVE__WFOPEN]
4534         (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4535         (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
4536         (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4537         (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
4538         (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4539         (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
4540         new overloads.
4541         * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
4542         * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
4543         * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
4544         * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
4545         * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
4546         * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
4547         * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
4549 2018-05-21  François Dumont  <fdumont@gcc.gnu.org>
4551         PR libstdc++/85845
4552         * include/bits/stl_tree.h
4553         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
4554         qualification.
4556 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
4558         * src/filesystem/std-ops.cc (absolute): Report an error for empty
4559         paths.
4560         (weakly_canonical(const path&)): Do not call canonical on empty path.
4561         (weakly_canonical(const path&, error_code&)): Likewise.
4562         * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
4564         PR libstdc++/85818
4565         * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
4566         dg-require-filesystem-ts.
4568         PR libstdc++/85843
4569         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
4570         initialize base class to avoid warnings.
4572 2018-05-19  Jonathan Wakely  <jwakely@redhat.com>
4574         * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
4575         [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
4576         little_endian element in bitmask.
4577         * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
4578         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
4580 2018-05-18  François Dumont  <fdumont@gcc.gnu.org>
4582         * include/bits/stl_tree.h
4583         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
4584         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
4585         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
4586         (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
4587         * include/debug/map.h
4588         (map(map&&, const_allocator_type&)): Add noexcept qualitication.
4589         * include/debug/multimap.h
4590         (multimap(multimap&&, const_allocator_type&)): Likewise.
4591         * include/debug/set.h
4592         (set(set&&, const_allocator_type&)): Likewise.
4593         * include/debug/multiset.h
4594         (multiset(multiset&&, const_allocator_type&)): Likewise.
4595         * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
4596         Add checks.
4597         * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
4598         Add checks.
4599         * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
4600         Add checks.
4601         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
4602         Add checks.
4603         * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
4604         Add checks.
4605         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
4606         Add checks.
4607         * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
4608         Add checks.
4609         * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
4610         Add checks.
4612 2018-05-18  Jason Merrill  <jason@redhat.com>
4614         * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
4615         for conversion to const_iterator.  Add defaulted copy ops.
4616         * libsupc++/new (bad_alloc): Add defaulted copy ops.
4617         * libsupc++/exception.h (exception): Add defaulted copy ops.
4618         * include/std/system_error (system_error): Add defaulted copy ops.
4619         * include/std/stdexcept (domain_error, invalid_argument)
4620         (length_error, out_of_range, range_error, overflow_error)
4621         (underflow_error): Add defaulted copy ops.
4622         * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
4623         copy assignment.
4624         * include/bits/allocator.h (allocator): Add defaulted copy assignment.
4625         * include/ext/throw_allocator.h (condition_base): Add defaulted
4626         default and copy ctor and copy assignment.
4628 2018-05-18  Jonathan Wakely  <jwakely@redhat.com>
4630         PR libstdc++/85098
4631         * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
4632         (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
4633         (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
4634         (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
4635         definitions.
4636         * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
4637         whitespace.
4638         * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
4639         braces around body of do-while.
4640         * testsuite/28_regex/basic_regex/85098.cc: New
4642 2018-05-17  Jonathan Wakely  <jwakely@redhat.com>
4644         PR libstdc++/85818
4645         * src/filesystem/path.cc (path::preferred_separator): Add used
4646         attribute.
4647         * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
4649         PR libstdc++/85812
4650         * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
4651         * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
4652         Refactor to separate non-throwing and throwing implementations.
4653         [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
4654         if constructing the object throws.
4656 2018-05-15  Jonathan Wakely  <jwakely@redhat.com>
4658         PR libstdc++/85749
4659         * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
4660         (linear_congruential_engine, mersenne_twister_engine)
4661         (subtract_with_carry_engine, discard_block_engine)
4662         (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
4663         constrain function templates taking seed sequences.
4664         * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
4665         (mersenne_twister_engine::seed(_Sseq&))
4666         (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
4667         match declarations.
4668         * include/ext/random (simd_fast_mersenne_twister_engine): Use
4669         __is_seed_seq to constrain function templates taking seed sequences.
4670         * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
4671         Change return type to match declaration.
4672         * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
4673         New.
4674         * testsuite/26_numerics/random/independent_bits_engine/cons/
4675         seed_seq2.cc: New.
4676         * testsuite/26_numerics/random/linear_congruential_engine/cons/
4677         seed_seq2.cc: New.
4678         * testsuite/26_numerics/random/mersenne_twister_engine/cons/
4679         seed_seq2.cc: New.
4680         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4681         * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
4682         New.
4683         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
4684         seed_seq2.cc: New.
4685         * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
4686         seed_seq2.cc: New.
4688         PR libstdc++/83891
4689         * include/bits/fs_path.h (path::is_absolute()): Use same definition
4690         for all operating systems.
4691         * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
4692         * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
4693         * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
4694         * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
4696         * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
4697         unused <vector> header.
4698         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4699         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4700         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4701         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4702         * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
4703         Likewise.
4704         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4705         Likewise.
4706         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4707         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4708         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4709         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4710         * testsuite/experimental/filesystem/path/decompose/extension.cc:
4711         Likewise.
4712         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
4713         * testsuite/experimental/filesystem/path/query/has_extension.cc:
4714         Likewise.
4715         * testsuite/experimental/filesystem/path/query/has_filename.cc:
4716         Likewise.
4717         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
4718         Likewise.
4719         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
4720         Likewise.
4721         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
4722         Likewise.
4723         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
4724         Likewise.
4725         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
4726         Likewise.
4727         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
4728         * testsuite/experimental/filesystem/path/query/is_relative.cc:
4729         Likewise.
4731         PR libstdc++/84159
4732         * include/bits/fs_path.h (path::operator/=, path::append): Construct
4733         temporary path before calling _M_append.
4734         (path::_M_append): Change parameter to path and implement C++17
4735         semantics.
4736         * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
4737         and more examples from the standard.
4738         * testsuite/27_io/filesystem/path/append/source.cc: New.
4739         * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
4740         * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
4742         * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
4743         __invoke to prevent ADL.
4745 2018-05-14  Jonathan Wakely  <jwakely@redhat.com>
4747         PR libstdc++/81256
4748         * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
4749         exceptions from _M_terminate_output().
4750         * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
4751         exceptions from close().
4752         * testsuite/27_io/basic_filebuf/close/81256.cc: New.
4754         * include/bits/valarray_array.h (__valarray_get_memory): Remove.
4755         (__valarray_get_storage): Call operator new directly. Remove ignored
4756         top-level restrict qualifier and add malloc attribute instead.
4757         (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
4759         PR libstdc++/67554
4760         * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
4761         (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
4763         PR libstdc++/82966
4764         * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
4765         instead of type.
4766         * testsuite/23_containers/set/modifiers/node_swap.cc: New.
4768 2018-05-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
4770         PR libstdc++/80165
4771         * testsuite/20_util/variant/80165.cc: New.
4773 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
4775         * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
4776         * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
4777         of C++11 containers with Debug Mode support.
4778         * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
4779         * doc/html/*: Regenerate.
4781 2018-05-10  Jason Merrill  <jason@redhat.com>
4783         * include/bits/regex_compiler.h (_S_cache_size): Change from
4784         function to variable.
4786 2018-05-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
4788         PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
4789         * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
4790         argument defaulted to +1.  Doxy comments on same.
4791         * testsuite/special_functions/02_assoc_legendre/
4792         check_value.cc: Regen.
4793         * testsuite/tr1/5_numerical_facilities/special_functions/
4794         02_assoc_legendre/check_value.cc: Regen.
4796 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
4798         PR libstdc++/85729
4799         * include/bits/c++config.h (__replacement_assert): Add linkage
4800         specification.
4801         * include/bits/std_abs.h: Add comment to closing brace of block.
4802         * include/c_global/cstddef: Add linkage specification.
4803         * include/c_global/cstring: Likewise.
4804         * include/c_global/cwchar: Likewise.
4806 2018-05-09  François Dumont  <fdumont@gcc.gnu.org>
4808         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
4809         Rename in...
4810         (_Safe_iterator<>::_S_constant()): ...that.
4811         * include/debug/safe_local_iterator.h
4812         (_Safe_local_iterator<>::_M_constant()): Rename in...
4813         (_Safe_local_iterator<>::_S_constant()): ...that.
4814         * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
4815         (_Iterator_state::__rbegin): New.
4816         (_Iterator_state::__rmiddle): New.
4817         (_Iterator_state::__rend): New.
4818         (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
4819         _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
4820         iterator type.
4821         (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
4822         _Is_iterator)): Likewise.
4823         (_Parameter::_S_reverse_state(_Iterator_state)): New.
4824         (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
4825         _Is_iterator)): New.
4826         (_Parameter(std::reverse_iterator<> const&, const char*,
4827         _Is_iterator)): New.
4828         (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
4829         const char*, _Is_iterator)): New.
4830         (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
4831         New.
4832         (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
4833         _Is_iterator)): New.
4834         * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
4835         * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
4836         * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
4838 2018-05-09  Jonathan Wakely  <jwakely@redhat.com>
4840         * include/bits/std_function.h (_Base_manager::_M_get_pointer):
4841         Use constexpr if in C++17 mode.
4842         (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
4843         Copy from const object.
4844         * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
4846 2018-05-08  François Dumont  <fdumont@gcc.gnu.org>
4848         * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
4849         [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
4850         backtrace.
4852         * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
4853         * include/debug/functions.h (__check_valid_range): Use latter.
4854         * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
4855         use latter.
4856         * include/debug/deque
4857         (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4858         * include/debug/forward_list
4859         (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
4860         Likewise.
4861         * include/debug/list
4862         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4863         * include/debug/list
4864         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4865         * include/debug/map.h
4866         (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4867         (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4868         Likewise.
4869         * include/debug/multimap.h
4870         (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4871         (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
4872         const _Alloc&)): Likewise.
4873         * include/debug/set.h
4874         (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4875         (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4876         Likewise.
4877         * include/debug/multiset.h
4878         (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4879         (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
4880         const _Alloc&)): Likewise.
4881         * include/debug/string
4882         (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
4883         Likewise.
4884         * include/debug/unordered_map
4885         (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
4886         Likewise.
4887         (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
4888         const _Alloc&)): Likewise.
4889         * include/debug/unordered_set
4890         (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
4891         Likewise.
4892         (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
4893         const _Alloc&)): Likewise.
4894         * include/debug/vector
4895         (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4897         * include/debug/formatter.h (_Error_formatter::_M_function): New.
4898         (_Error_formatter(const char*, unsigned int)): Adapt.
4899         (_Error_formatter::_M_at): Rename in...
4900         (_Error_formatter::_S_at): ...that and adapt.
4901         * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
4902         (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
4903         * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
4904         when available.
4906 2018-05-08  Jonathan Wakely  <jwakely@redhat.com>
4908         * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
4909         Use normal std::vector even in Debug Mode.
4911         PR libstdc++/85672
4912         * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
4913         to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
4914         * include/Makefile.in: Regenerate.
4915         * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
4916         within conditional block.
4918 2018-05-07  Jonathan Wakely  <jwakely@redhat.com>
4920         * doc/xml/manual/using.xml (table.cmd_options): Document that the
4921         C++17 Filesystem implementation also needs -lstdc++fs.
4923         PR libstdc++/85671
4924         * include/bits/fs_path.h (operator/): Permit copy elision.
4925         * include/experimental/bits/fs_path.h (operator/): Likewise.
4927 2018-05-07  Edward Smith-Rowland  <3dw4rd@verizon.net>
4929         Moar PR libstdc++/80506
4930         * include/bits/random.tcc (gamma_distribution::__generate_impl()):
4931         Fix magic number used in loop condition.
4933 2018-05-04  Jonathan Wakely  <jwakely@redhat.com>
4935         PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
4936         * include/std/optional (_Optional_payload): Add noexcept to default
4937         constructor. Re-indent.
4938         (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
4939         constructor for copying disengaged payloads.
4940         (_Optional_payload<_Tp, true, false, true>): Likewise.
4941         (_Optional_payload<_Tp, true, true, false>): Likewise.
4942         (_Optional_payload<_Tp, true, false, false>): Likewise.
4943         * testsuite/20_util/optional/cons/85642.cc: New.
4944         * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
4946 2018-05-03  Jonathan Wakely  <jwakely@redhat.com>
4948         PR libstdc++/82644
4949         * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
4950         inline definitions instead of using-declarations.
4951         [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
4952         * testsuite/tr1/5_numerical_facilities/special_functions/
4953         07_conf_hyperg/compile_cxx17.cc: New.
4954         * testsuite/tr1/5_numerical_facilities/special_functions/
4955         17_hyperg/compile_cxx17.cc: New.
4957         PR libstdc++/84769
4958         * include/std/variant (visit): Qualify std::get call.
4960         PR libstdc++/85632 use uintmax_t for arithmetic
4961         * src/filesystem/ops.cc (experimental::filesystem::space): Perform
4962         arithmetic in result type.
4963         * src/filesystem/std-ops.cc (filesystem::space): Likewise.
4964         * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
4965         is greater than free space.
4966         * testsuite/experimental/filesystem/operations/space.cc: New.
4968         * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
4969         * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
4970         New.
4971         * testsuite/20_util/remove_cvref/value.cc: New.
4972         * testsuite/20_util/remove_cvref/value_ext.cc: New.
4974         PR libstdc++/84087 LWG DR 2268 basic_string default arguments
4975         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
4976         (append(const basic_string&, size_type, size_type)
4977         (assign(const basic_string&, size_type, size_type)
4978         (insert(size_type, const basic_string&, size_type, size_type)
4979         (replace(size_type,size_type,const basic_string&,size_type,size_type)
4980         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4981         Add default arguments (LWG 2268).
4982         [_GLIBCXX_USE_CXX11_ABI=0]
4983         (append(const basic_string&, size_type, size_type)
4984         (assign(const basic_string&, size_type, size_type)
4985         (insert(size_type, const basic_string&, size_type, size_type)
4986         (replace(size_type,size_type,const basic_string&,size_type,size_type)
4987         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4988         Likewise.
4989         * testsuite/21_strings/basic_string/dr2268.cc: New test.
4991         PR libstdc++/84535
4992         * include/std/thread (thread::__not_same): New SFINAE helper.
4993         (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
4994         first argument is not a std::thread. Add static assertion to check
4995         INVOKE expression is valid.
4996         (thread::thread(thread&), thread::thread(const thread&&)): Remove.
4997         (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
4998         __invoke_result for return types and remove exception specifications.
4999         * testsuite/30_threads/thread/cons/84535.cc: New.
5001         * include/std/future (__async_result_of): Use __invoke_result instead
5002         of result_of.
5004         * include/std/any (any_cast): Use __remove_cvref_t.
5005         * include/std/tuple (__make_tuple): Likewise.
5006         * include/std/type_traits (__remove_cvref_t): Define.
5007         (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
5008         [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
5009         * include/std/variant (__erased_hash): Use __remove_cvref_t.
5011 2018-05-02  François Dumont  <fdumont@gcc.gnu.org>
5013         * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
5014         ensure overloaded comma not used.
5015         * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
5016         * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
5017         * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
5018         * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
5019         * testsuite/23_containers/list/modifiers/assign/1.cc: New.
5020         * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
5021         * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
5023 2018-05-02  Jonathan Wakely  <jwakely@redhat.com>
5025         PR libstdc++/68197
5026         * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
5027         indices to unsigned.
5028         * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
5029         as failure. Refactor error handling.
5030         * testsuite/27_io/ios_base/storage/68197.cc: New.
5032         PR libstdc++/57997
5033         PR libstdc++/83860
5034         * include/bits/gslice_array.h (gslice_array): Define default
5035         constructor as deleted, as per C++11 standard.
5036         * include/bits/mask_array.h (mask_array): Likewise.
5037         * include/bits/slice_array.h (slice_array): Likewise.
5038         * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
5039         to namespace __detail.
5040         (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
5041         members.
5042         * include/bits/valarray_before.h (_ValArrayRef): New helper for type
5043         of data members in closure objects.
5044         (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
5045         (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
5046         __detail.
5047         (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
5048         (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
5049         (_SBase::_M_expr): Use _ValArrayRef for type of data members.
5050         * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
5051         (_ValFunClos, _RefFunClos): Move to namespace __detail and add
5052         using-declarations to namespace std.
5053         * testsuite/26_numerics/valarray/83860.cc: New.
5055         * testsuite/backward/strstream_move.cc: Remove duplicate function
5056         call.
5058         PR libstdc++/69608
5059         * include/backward/strstream (strstreambuf): Define move constructor
5060         and move assignment operator.
5061         (istrstream, ostrstream, strstream): Likewise.
5062         * testsuite/backward/strstream_move.cc: New.
5064 2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
5066         PR libstdc++/84654
5067         * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
5068         * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
5069         * configure: Regenerate.
5070         * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
5071         based on ENABLE_FLOAT128.
5072         * include/Makefile.in: Regenerate.
5073         * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
5074         [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
5075         _GLIBCXX_USE_FLOAT128.
5077 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
5079         * configure: Regenerated.
5081 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
5083         * configure: Regenerated.
5085 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
5086             Jakub Jelinek  <jakub@redhat.com>
5088         PR libstdc++/85442
5089         * src/c++11/Makefile.am: Don't generate debuginfo again for
5090         cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
5091         * src/c++11/Makefile.in: Regenerate.
5093 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
5095         PR libstdc++/84442
5096         * testsuite/30_threads/thread/cons/terminate.cc
5097         [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
5099 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
5101         PR jit/85384
5102         * configure: Regenerate.
5104 2018-04-16  Jonathan Wakely  <jwakely@redhat.com>
5106         * testsuite/experimental/filesystem/file_status/1.cc: Add
5107         -DUSE_FILESYSTEM_TS to dg-options.
5108         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
5109         Likewise.
5110         * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
5111         * testsuite/experimental/filesystem/iterators/
5112         recursive_directory_iterator.cc: Likewise.
5113         * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
5114         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
5115         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5116         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
5117         * testsuite/experimental/filesystem/operations/create_directories.cc:
5118         Likewise.
5119         * testsuite/experimental/filesystem/operations/create_directory.cc:
5120         Likewise.
5121         * testsuite/experimental/filesystem/operations/create_symlink.cc:
5122         Likewise.
5123         * testsuite/experimental/filesystem/operations/current_path.cc:
5124         Likewise.
5125         * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
5126         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
5127         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
5128         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
5129         * testsuite/experimental/filesystem/operations/last_write_time.cc:
5130         Likewise.
5131         * testsuite/experimental/filesystem/operations/permissions.cc:
5132         Likewise.
5133         * testsuite/experimental/filesystem/operations/read_symlink.cc:
5134         Likewise.
5135         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
5136         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
5137         * testsuite/experimental/filesystem/operations/status.cc: Likewise.
5138         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
5139         Likewise.
5140         * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
5141         * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
5142         * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
5143         * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
5144         * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
5145         * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
5146         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
5147         * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
5148         * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
5149         * testsuite/experimental/filesystem/path/construct/default.cc:
5150         Likewise.
5151         * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
5152         * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
5153         * testsuite/experimental/filesystem/path/construct/string_view.cc:
5154         Likewise.
5155         * testsuite/experimental/filesystem/path/decompose/extension.cc:
5156         Likewise.
5157         * testsuite/experimental/filesystem/path/decompose/filename.cc:
5158         Likewise.
5159         * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
5160         Likewise.
5161         * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
5162         Likewise.
5163         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
5164         Likewise.
5165         * testsuite/experimental/filesystem/path/decompose/root_name.cc:
5166         Likewise.
5167         * testsuite/experimental/filesystem/path/decompose/root_path.cc:
5168         Likewise.
5169         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
5170         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
5171         Likewise.
5172         * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
5173         * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
5174         * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
5175         Likewise.
5176         * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
5177         Likewise.
5178         * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
5179         Likewise.
5180         * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
5181         Likewise.
5182         * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
5183         * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
5184         * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
5185         Likewise.
5186         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
5187         * testsuite/experimental/filesystem/path/query/has_extension.cc:
5188         Likewise.
5189         * testsuite/experimental/filesystem/path/query/has_filename.cc:
5190         Likewise.
5191         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
5192         Likewise.
5193         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
5194         Likewise.
5195         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
5196         Likewise.
5197         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
5198         Likewise.
5199         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
5200         Likewise.
5201         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
5202         * testsuite/experimental/filesystem/path/query/is_relative.cc:
5203         Likewise.
5205 2018-04-13  Jonathan Wakely  <jwakely@redhat.com>
5207         * src/c++11/Makefile.am: Fix sed command.
5208         * src/c++11/Makefile.in: Regenerate.
5210         * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
5211         handle mangled names starting with double underscores on darwin.
5212         * src/c++11/Makefile.in: Regenerate.
5214 2018-04-12  Jonathan Wakely  <jwakely@redhat.com>
5216         * src/c++11/Makefile.am: Fix comment.
5217         * src/c++11/Makefile.in: Regenerate.
5218         * src/c++11/cxx11-ios_failure.cc: Fix comment.
5219         * src/c++98/ios_failure.cc: Likewise.
5221         * src/c++11/ios.cc: Remove redundant macro definition.
5223 2018-04-11  Jonathan Wakely  <jwakely@redhat.com>
5225         * doc/xml/manual/abi.xml: Document header locations in recent
5226         releases.
5227         * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
5228         * doc/xml/manual/spine.xml: Update copyright years.
5229         * doc/xml/manual/strings.xml: Adjust tolower example to avoid
5230         undefined behaviour.
5231         * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
5232         * doc/html/*: Regenerate.
5234 2018-04-10  Jonathan Wakely  <jwakely@redhat.com>
5236         * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
5237         * doc/xml/manual/backwards_compatibility.xml: Likewise.
5238         * doc/xml/manual/containers.xml: Likewise.
5239         * doc/xml/manual/debug_mode.xml: Likewise.
5240         * doc/xml/manual/extensions.xml: Likewise.
5241         * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
5242         * doc/xml/manual/using.xml: Likewise.
5243         * doc/xml/manual/utilities.xml: Likewise.
5245         PR libstdc++/85222
5246         * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
5247         cxx11-ios_failure.cc to rewrite type info for __ios_failure.
5248         * src/c++11/Makefile.in: Regenerate.
5249         * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
5250         New types.
5251         [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
5252         * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
5253         * src/c++98/ios_failure.cc (__construct_ios_failure)
5254         (__destroy_ios_failure, is_ios_failure_handler): New functions.
5255         [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
5256         * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
5257         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
5258         handler types, to always catch std::ios_base::failure.
5259         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
5260         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
5261         exceptions_failbit.cc: Likewise.
5262         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
5263         exceptions_failbit.cc: Likewise.
5264         * testsuite/27_io/basic_istream/extractors_other/char/
5265         exceptions_null.cc: Likewise.
5266         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
5267         exceptions_null.cc: Likewise.
5268         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
5269         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
5270         * testsuite/27_io/basic_ostream/inserters_other/char/
5271         exceptions_null.cc: Likewise.
5272         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
5273         exceptions_null.cc: Likewise.
5274         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
5276 2018-04-05  Jonathan Wakely  <jwakely@redhat.com>
5278         * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
5279         __get calls to avoid ADL and avoid ambiguity due to Clang bug.
5281 2018-04-03  Jonathan Wakely  <jwakely@redhat.com>
5283         PR libstdc++/85183
5284         * include/std/variant (_Move_assign_base::operator=): Fix incorrect
5285         value categories.
5286         * testsuite/20_util/variant/85183.cc: New.
5288 2018-03-26  Jonathan Wakely  <jwakely@redhat.com>
5290         * include/std/variant (__get): Qualify calls to avoid ADL.
5291         (__select_index): Adjust whitespace.
5292         (variant): Add using-declaration to workaround Clang bug.
5294 2018-03-22  Jonathan Wakely  <jwakely@redhat.com>
5296         PR libstdc++/85040
5297         * include/bits/stl_function.h (greater::__not_overloaded)
5298         (less::__not_overloaded, greater_equal::__not_overloaded)
5299         (less_equal::__not_overloaded): Fix ambiguous specializations.
5300         * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
5301         tests for type with overloaded operators.
5303 2018-03-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5305         PR libstdc++/77691
5306         * testsuite/experimental/memory_resource/resource_adaptor.cc:
5307         xfail execution on 32-bit Solaris/x86.
5309 2018-03-21  Jonathan Wakely  <jwakely@redhat.com>
5311         * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
5312         VERIFY instead of assert.
5313         * testsuite/20_util/hash/84998.cc: New test.
5314         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
5315         copy of test adjusted for Debug Mode.
5316         * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
5317         test in Debug Mode.
5319 2018-03-20  François Dumont  <fdumont@gcc.gnu.org>
5321         PR libstdc++/84998
5322         * include/bits/stl_bvector.h: Fix std::hash friend declaration.
5323         * include/std/bitset: Likewise.
5324         * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
5325         declaration.
5326         * include/bits/stl_multimap.h (std::multimap<>): Likewise.
5327         * include/bits/stl_multiset.h (std::multiset<>): Likewise.
5328         * include/bits/stl_set.h (std::set<>): Likewise.
5329         * include/bits/unordered_map.h (std::unordered_map<>): Fix
5330         _Hash_merge_helper friend declaration.
5331         (std::unordered_multimap<>): Likewise.
5332         * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
5333         (std::unordered_multiset<>): Likewise.
5335 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
5337         * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
5338         trailing slash for domain level link.
5339         * doc/xml/faq.xml: Ditto.
5340         * doc/xml/manual/appendix_free.xml (software): Ditto.
5341         * doc/xml/manual/intro.xml: Ditto.
5342         * doc/xml/manual/spine.xml: Ditto.
5343         * doc/xml/spine.xml: Ditto.
5345 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
5347         * doc/xml/manual/documentation_hacking.xml: Adjust link to
5348         docbook.org.
5350 2018-03-17  Jonathan Wakely  <jwakely@redhat.com>
5352         * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
5353         to compile as C++98.
5355 2018-03-14  Jonathan Wakely  <jwakely@redhat.com>
5357         PR libstdc++/78420
5358         * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
5359         (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
5360         to ensure total order for pointers.
5361         (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
5362         Add operator() overloads for pointer arguments and make generic
5363         overloads dispatch to new _S_cmp functions when comparisons would
5364         use built-in operators for pointers.
5365         * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
5367 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
5369         PR libstdc++/84773
5370         PR libstdc++/83662
5371         * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
5372         * configure: Regenerate.
5373         * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
5374         (aligned_alloc): Add using-declaration.
5375         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
5377 2018-03-09  François Dumont  <fdumont@gcc.gnu.org>
5379         * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
5380         Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
5381         registration.
5383 2018-03-09  Jonathan Wakely  <jwakely@redhat.com>
5385         PR libstdc++/84769
5386         * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
5387         Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
5389         src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
5390         src/filesystem/std-ops.cc (create_dir): Likewise.
5392 2018-03-08  François Dumont  <fdumont@gcc.gnu.org>
5394         * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
5395         (StdListIteratorPrinter): Inherit from latter.
5396         (StdFwdListIteratorPrinter): New, inherit from latter.
5397         (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
5398         when iterator has no associated container.
5399         (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
5400         __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
5401         registrations.
5402         * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
5403         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
5405 2018-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
5407         PR libstdc++/84601
5408         * include/std/optional (_Optional_payload): Split into multiple
5409         specializations that can handle different cases of trivial or
5410         non-trivial assignment operators.
5411         * testsuite/20_util/optional/84601.cc: New.
5412         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
5414 2018-03-02  Jonathan Wakely  <jwakely@redhat.com>
5416         PR libstdc++/84671
5417         * include/bits/parse_numbers.h (_Number_help): Add partial
5418         specialization to handle digit separators. Adjust partial
5419         specialization for recursion temrination to require _Pow == 1ULL.
5420         * testsuite/20_util/duration/literals/84671.cc: New
5422 2018-02-27  Ville Voutilainen  <ville.voutilainen@gmail.com>
5424         Implement the missing bits of LWG 2769
5425         * include/std/any (any_cast(const any&)): Add static_assert.
5426         (any_cast(any&)): Likewise.
5427         (any_cast(any&&)): Likewise, and remove the handling
5428         for copyable-but-not-movable type.
5429         * testsuite/20_util/any/misc/any_cast.cc: Adjust.
5430         * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
5431         add new tests.
5433 2018-02-23  Jonathan Wakely  <jwakely@redhat.com>
5435         PR libstdc++/84532
5436         * include/std/thread (thread::__make_invoker): Construct tuple
5437         directly instead of using make_tuple.
5438         * testsuite/30_threads/async/84532.cc: New.
5439         * testsuite/30_threads/thread/84532.cc: New.
5441 2018-02-20  François Dumont  <fdumont@gcc.gnu.org>
5443         * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
5444         (template<> __aligned_buffer): Define as __aligned_membuf alias.
5446 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5448         PR target/84148
5449         * configure: Regenerate.
5451 2018-02-15  Jonathan Wakely  <jwakely@redhat.com>
5453         PR libstdc++/81797
5454         * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
5455         * configure: Regenerate.
5456         * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
5457         defined.
5458         * include/Makefile.in: Regenerate.
5460 2018-01-29  Jonathan Wakely  <jwakely@redhat.com>
5462         PR libstdc++/83833
5463         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
5464         Add -ffloat-store to options for m68k and ia32.
5466         * doc/xml/faq.xml: Update copyright years.
5467         * doc/html/*: Regenerate.
5469         PR libstdc++/83658
5470         * include/std/any (any::__do_emplace): Only set _M_manager after
5471         constructing the contained object.
5472         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
5473         * testsuite/20_util/any/modifiers/83658.cc: New test.
5475 2018-01-25  Jonathan Wakely  <jwakely@redhat.com>
5477         PR libstdc++/81076
5478         * include/c_global/cstddef (__byte_operand): Define primary template.
5479         * testsuite/18_support/byte/81076.cc: New test.
5481 2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>
5483         * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
5484         dg-options and dg-add-options order.
5485         * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
5486         * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
5487         Likewise.
5488         * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
5489         * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
5490         Likewise.
5491         * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
5492         Likewise.
5493         * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
5494         * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
5495         Likewise.
5496         * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
5497         Likewise.
5498         * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
5499         Likewise.
5500         * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
5501         Likewise.
5502         * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
5503         Likewise.
5504         * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
5505         Likewise.
5506         * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
5507         Likewise.
5508         * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
5509         Likewise.
5510         * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
5511         * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
5512         * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
5513         * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
5514         * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
5515         * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
5516         * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
5517         * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
5518         * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
5519         Likewise.
5520         * testsuite/special_functions/19_sph_bessel/check_nan.cc:
5521         Likewise.
5522         * testsuite/special_functions/20_sph_legendre/check_nan.cc:
5523         Likewise.
5524         * testsuite/special_functions/21_sph_neumann/check_nan.cc:
5525         Likewise.
5527 2018-01-18  Uros Bizjak  <ubizjak@gmail.com>
5529         * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
5530         include linux/types.h when checking linux/random.h header.
5531         * config.h.in: Regenerate.
5532         * configure: Ditto.
5533         * src/c++11/random.cc: Conditionally include linux/types.h.
5535 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
5537         * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
5539 2018-01-16  Jonathan Wakely  <jwakely@redhat.com>
5541         PR libstdc++/83834
5542         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
5543         pattern with exact match for std::cerr.
5545 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
5547         PR libstdc++/83833
5548         * include/bits/random.h (chi_squared_distribution::param): Update
5549         gamma distribution parameter.
5550         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
5551         test.
5553         PR libstdc++/83830
5554         * include/std/type_traits (has_unique_object_representations_v): Add
5555         variable template.
5556         * testsuite/20_util/has_unique_object_representations/value.cc: Check
5557         variable template.
5559 2018-01-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
5561         Make optional conditionally
5562         trivially_{copy,move}_{constructible,assignable}
5563         * include/std/optional (_Optional_payload): Fix the comment in
5564         the class head and turn into a primary and one specialization.
5565         (_Optional_payload::_M_engaged): Strike the NSDMI.
5566         (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
5567         New.
5568         (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
5569         Likewise.
5570         (_Optional_payload<_Tp, false>::_M_get): Likewise.
5571         (_Optional_payload<_Tp, false>::_M_reset): Likewise.
5572         (_Optional_base_impl): Likewise.
5573         (_Optional_base): Turn into a primary and three specializations.
5574         (optional(nullopt)): Change the base init.
5575         * testsuite/20_util/optional/assignment/8.cc: New.
5576         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
5577         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
5579 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
5581         PR libstdc++/80276
5582         * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
5583         (get_template_arg_list): New.
5584         (StdVariantPrinter._template_args): Remove, use get_template_arg_list
5585         instead.
5586         (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
5587         of strings and regular expressions.
5588         (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
5589         (FilteringTypePrinter): Add docstring. Match using startswith. Use
5590         strip_inline_namespaces instead of strip_versioned_namespace.
5591         (add_one_type_printer): Prepend namespace to match argument.
5592         (register_type_printers): Add type printers for char16_t and char32_t
5593         string types and for types using cxx11 ABI. Update calls to
5594         add_one_template_type_printer to provide default argument dicts.
5595         * testsuite/libstdc++-prettyprinters/80276.cc: New test.
5596         * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
5597         basic_string<unsigned char> and basic_string<signed char>.
5598         * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
5599         to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
5601 2018-01-14  Andreas Schwab  <schwab@linux-m68k.org>
5603         PR libstdc++/81092
5604         * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
5606 2018-01-13  Tim Shen  <timshen@google.com>
5608         PR libstdc++/83601
5609         * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
5610         * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
5611         * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
5613 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5615         PR libstdc++/64054
5616         * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
5617         Remove dg-xfail-run-if.
5619 2018-01-10  François Dumont  <fdumont@gcc.gnu.org>
5621         * include/bits/forward_list.h
5622         (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
5623         (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
5624         (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
5625         (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
5626         (_Fwd_list_impl()): Add noexcept qualification.
5627         (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
5628         (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
5629         (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
5630         (_Fwd_list_base()): Default.
5631         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
5632         (_Fwd_list_base(_Fwd_list_base&&)): Default.
5633         (forward_list<>()): Default.
5634         (forward_list<>(forward_list&&)): Default.
5635         (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
5636         (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
5637         (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
5638         * include/bits/forward_list.tcc
5639         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
5640         _M_impl._M_head move assignment.
5641         (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
5642         * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
5644 2018-01-09  Jonathan Wakely  <jwakely@redhat.com>
5646         PR libstdc++/80276
5647         * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
5648         (UniquePointerPrinter): Print correct template argument, not type of
5649         the pointer.
5650         (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
5651         a type.
5652         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
5653         array type.
5654         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
5655         weak_ptr of array types.
5657 2018-01-09  François Dumont  <fdumont@gcc.gnu.org>
5659         PR libstdc++/83709
5660         * include/bits/hashtable_policy.h
5661         (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
5662         __first != __last.
5663         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
5664         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
5665         Add false_type parameter.
5666         (_Insert_base::insert): Adapt.
5667         * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
5668         Adapt.
5669         (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
5670          Add __n_elt parameter, defaulted to 1.
5671         (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
5672         policy _M_need_rehash.
5673         (_Hashtable::_M_merge_unique): Pass target number of elements to add to
5674         produce only 1 rehash if necessary.
5675         * testsuite/23_containers/unordered_map/insert/83709.cc: New.
5676         * testsuite/23_containers/unordered_set/insert/83709.cc: New.
5678 2018-01-09  Juraj Oršulić  <juraj.orsulic@fer.hr>
5679             Jonathan Wakely  <jwakely@redhat.com>
5681         PR libstdc++/59253 (partial)
5682         * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
5683         type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
5684         (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
5685         children.
5686         * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
5687         of unique_ptr printer.
5688         * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
5689         output of shared_ptr printer.
5691 2018-01-05  Jonathan Wakely  <jwakely@redhat.com>
5693         PR libstdc++/83626
5694         * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
5695         unnecessary symlink_status call.
5696         (remove_all(const path&, error_code&)): Use filesystem::remove.
5697         * src/filesystem/std-ops.cc: Likewise.
5699         PR libstdc++/83279
5700         * src/filesystem/std-ops.cc  (do_copy_file): Use non-null offset with
5701         sendfile.
5703         PR libstdc++/83626
5704         * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
5705         report an error for ENOENT.
5706         (remove_all(const path&)): Fix type of result variable.
5707         (remove_all(const path&, error_code&)): Use non-throwing increment
5708         for directory iterator. Call POSIX remove directly to avoid redundant
5709         calls to symlink_status. Do not report errors for ENOENT.
5710         * src/filesystem/std-ops.cc: Likewise.
5711         * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
5712         overload.
5713         * testsuite/experimental/filesystem/operations/remove_all.cc:
5714         Likewise.
5716 2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
5718         PR libstdc++/83626
5719         * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
5720         redundant call to ec.clear().
5721         (remove_all(const path&, error_code&))): Do not return an error for
5722         non-existent paths.
5723         * src/filesystem/std-ops.cc: Likewise.
5724         * testsuite/27_io/filesystem/operations/remove.cc: New test.
5725         * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
5726         results for non-existent paths.
5727         * testsuite/experimental/filesystem/operations/remove.cc: New test.
5728         * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
5729         expected results for non-existent paths.
5731         * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
5732         check status_known once.
5733         * include/experimental/bits/fs_ops.h: Likewise.
5735         PR libstdc++/83607
5736         * include/std/functional (__is_byte_like): New trait.
5737         (__is_std_equal_to): Remove.
5738         (__boyer_moore_base_t): Use __is_byte_like instead of
5739         __is_std_equal_to.
5740         * include/experimental/functional (__is_std_equal_to): Remove.
5741         (__boyer_moore_base_t): Use __is_byte_like instead of
5742         __is_std_equal_to.
5743         * testsuite/20_util/function_objects/83607.cc: New test.
5745 2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
5747         Protect optional's deduction guide with the feature macro
5748         * include/std/optional: Use the feature macro.
5750 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
5752         Update copyright years.
5754 Copyright (C) 2018 Free Software Foundation, Inc.
5756 Copying and distribution of this file, with or without modification,
5757 are permitted in any medium without royalty provided the copyright
5758 notice and this notice are preserved.