PR c++/86342 - -Wdeprecated-copy and system headers.
[official-gcc.git] / libstdc++-v3 / ChangeLog
blobe421efcbbd1fd0ecb62e2faca32a7d8b9becc021
1 2018-06-27  François Dumont  <fdumont@gcc.gnu.org>
3         * include/bits/stl_vector.h
4         (struct _Vector_base<>::_Vector_impl_data): New.
5         (struct _Vector_base<>::_Vector_impl): Inherit from latter.
6         (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
7         (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
8         (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
9         (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
10         (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
11         (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
12         (_Vector_base()): Default.
13         (_Vector_base(_Vector_base&&)): Default.
14         (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
15         (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
16         (_Vector_base::_M_create_storage(size_t)): Make protected.
17         (vector()): Default.
18         (vector(vector&&)): Default.
19         (vector(vector&&, const allocator_type&, true_type)): New.
20         (vector(vector&&, const allocator_type&, false_type)): New.
21         (vector(vector&&, const allocator_type&)): Use latters.
22         (vector(_InputIte, _InputIte, const allocator_type&)): Call
23         _M_range_initialize directly.
24         * include/debug/vector
25         (vector(vector&&, const allocator_type&)): Add noexcept qualification.
26         * testsuite/23_containers/vector/allocator/default_init.cc: New.
27         * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
28         static assertions.
30 2018-06-27  Jonathan Wakely  <jwakely@redhat.com>
32         * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
33         (__is_byte<byte>): Define specialization for std::byte.
35         PR libstdc++/86138
36         * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
37         Declare explicit instantiations of COW empty reps and I/O functions.
39 2018-06-26  David Edelsohn  <dje.gcc@gmail.com>
41         * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
42         directives.
43         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
45 2018-06-26  Jonathan Wakely  <jwakely@redhat.com>
47         * include/bits/regex.tcc (regex_iterator::operator==): Add missing
48         noexcept.
50 2018-06-25  Jonathan Wakely  <jwakely@redhat.com>
52         PR libstdc++/86112
53         * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
54         Replace dict comprehension.
56         PR libstdc++/81092
57         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
59         PR libstdc++/86292
60         * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
61         Add try-catch block.
62         * testsuite/23_containers/vector/cons/86292.cc: New.
64         * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
66         * include/experimental/algorithm (sample, shuffle): Add new overloads
67         using per-thread random number engine.
68         * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
69         dependencies by using __gnu_test::test_container.
70         * testsuite/experimental/algorithm/sample-2.cc: New.
71         * testsuite/experimental/algorithm/shuffle.cc: New.
73 2018-06-22  Jonathan Wakely  <jwakely@redhat.com>
75         * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
76         different size_t mangling on 32-bit targets.
78         PR libstdc++/86280
79         * include/experimental/memory_resource
80         (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
81         enough for result of left shift.
83         PR libstdc++/86138
84         * include/bits/basic_string.tcc:
85         [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
86         (basic_string<char>::_Rep::_S_empty_rep_storage)
87         (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
88         instantiation declarations.
89         [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
90         explicit instantiation declarations.
91         * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
92         * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
94 2018-06-21  Jonathan Wakely  <jwakely@redhat.com>
96         PR libstdc++/83328
97         * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
98         * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
99         * configure: Regenerate.
100         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
101         (basic_string::insert(const_iterator, initializer_list<C>)): Add.
102         [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
103         (basic_string::insert(iterator, initializer_list<C>)): Suppress
104         definition.
105         * include/debug/string (basic_string::insert(iterator, C)): Change
106         first parameter to const_iterator.
107         (basic_string::insert(iterator, size_type, C)): Likewise. Change
108         return type to iterator.
109         (basic_string::insert(iterator, InputIterator, InputIterator)):
110         Likewise.
111         (basic_string::insert(iterator, initializer_list<C>)): Change first
112         parameter to const_iterator and return type to iterator.
113         * src/c++11/string-inst.cc: Extend comment.
114         * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
115         New.
116         * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
117         New.
118         * testsuite/util/testsuite_abi.cc: Add new symbol version.
120         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
122         PR libstdc++/70940
123         * include/experimental/memory_resource
124         (__resource_adaptor_imp::do_deallocate): Add missing return.
125         * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
126         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
127         resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
128         __gnu_cxx::malloc_allocator.
130         PR libstdc++/70940
131         * include/experimental/memory_resource (__resource_adaptor_common):
132         New base class.
133         (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
134         pointer from unaligned, and vice versa.
135         (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
136         allocated pointer to meet alignment request.
137         (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
138         original pointer for deallocation.
139         (__resource_adaptor_imp::do_is_equal): Reformat.
140         (__resource_adaptor_imp::_S_aligned_size): Remove.
141         (__resource_adaptor_imp::_S_supported): Remove.
142         (new_delete_resource): Use __gnu_cxx::new_allocator.
143         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
144         extended alignments and use debug_allocator to check for matching
145         allocate/deallocate pairs.
147 2018-06-21  François Dumont  <fdumont@gcc.gnu.org>
149         * include/debug/safe_iterator.h
150         (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
151         Compare __x base iterator with a value-initialized iterator of the
152         same type.
154 2018-06-20  Jonathan Wakely  <jwakely@redhat.com>
156         PR libstdc++/70966
157         * include/experimental/memory_resource (__resource_adaptor_imp): Add
158         static assertions to enforce requirements on pointer types.
159         (__resource_adaptor_imp::get_allocator()): Add noexcept.
160         (new_delete_resource, null_memory_resource): Return address of an
161         object with dynamic storage duration.
162         (__null_memory_resource): Remove.
163         * testsuite/experimental/memory_resource/70966.cc: New.
165         * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
166         missed from recent commit.
168 2018-06-19  Jonathan Wakely  <jwakely@redhat.com>
170         * include/std/utility: Remove unused <exception> header.
172 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
174         LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
175         * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
176         (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
177         a specialization of std::pair.
178         * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
179         pair elements are constructed correctly.
181         LWG 2989 hide path iostream operators from normal lookup
182         * include/bits/fs_path.h (operator<<, operator>>): Define inline as
183         friends.
184         * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
186         LWG 3050 Fix cv-qualification of convertibility constraints
187         * include/std/chrono (duration, operator*, operator/, operator%): Use
188         const-qualified type as source type in is_convertible constraints.
189         * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
190         * testsuite/20_util/duration/cons/dr3050.cc: New.
191         * testsuite/20_util/duration/literals/range.cc: Rename to...
192         * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
193         dg-error lineno.
195 2018-06-18  Maya Rashish  <coypu@sdf.org>
197         * crossconfig.m4: Handle OpenBSD just like NetBSD.
198         * configure: Rebuilt.
200 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
202         P0754R2 <version> header
203         * include/Makefile.am: Add new header.
204         * include/Makefile.in: Regenerate.
205         * include/bits/c++config: Change doxygen comment to suggest <version>
206         instead of <iosfwd>.
207         * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
208         unconditionally.  Add C++17 and C++20 headers.
209         * include/std/version: New header.
210         * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
211         * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
212         * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
213         * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
214         * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
215         * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
216         * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
217         New.
218         * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
219         * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
220         * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
221         * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
222         * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
223         * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
224         * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
225         New.
226         * testsuite/18_support/headers/version/macros.cc: New.
227         * testsuite/18_support/headers/version/macros.cc: New.
229         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
230         enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
231         symlink.
232         * config.h.in: Regenerate.
233         * configure: Regenerate.
234         * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
236         LWG 3035. std::allocator's constructors should be constexpr
237         * include/bits/allocator.h (allocator): Add constexpr to constructors
238         for C++2a. Replace dynamic exception specifications with NOTHROW
239         macro.
240         (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
241         NOTHROW.
242         * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
243         * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
244         to constructors for C++2a.
245         * include/ext/new_allocator.h (new_allocator): Likewise.
247 2018-06-16  Jonathan Wakely  <jwakely@redhat.com>
249         LWG 3076 basic_string CTAD ambiguity
250         * doc/xml/manual/intro.xml: Document LWG 3076 change.
251         * include/bits/basic_string.h
252         [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
253         (basic_string(const _CharT*, const _Alloc&)): Turn into a function
254         template constrained by _RequireAllocator.
255         (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
256         * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
257         Define.
258         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
259         deduction
260         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
261         Likewise.
263 2018-06-15  Jonathan Wakely  <jwakely@redhat.com>
265         PR libstdc++/86169
266         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
267         (basic_string::data()): Unshare string.
268         * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
269         New.
271         * include/std/string_view (basic_string_view(const CharT*)): Remove
272         check for null pointer and add nonnull attribute.
273         (compare(const CharT*), compare(size_type, size_type, const CharT*))
274         (find(const CharT*, size_type), rfind(const CharT*, size_type))
275         (find_first_of(const CharT*, size_type))
276         (find_last_of(const CharT*, size_type))
277         (find_first_not_of(const CharT*, size_type))
278         (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
279         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
280         * testsuite/21_strings/basic_string_view/operations/compare/char/
281         nonnull.cc: New.
282         * testsuite/21_strings/basic_string_view/operations/find/char/
283         nonnull.cc: New.
284         * testsuite/21_strings/basic_string_view/operations/rfind/char/
285         nonnull.cc: New.
287         PR libstdc++/86168
288         * include/bits/random.h (random_device(const string&)): Remove
289         default argument.
291         * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
292         define for C++17 and above.
294         LWG 2993 reference_wrapper<T> conversion from T&&
295         * doc/xml/manual/intro.xml: Document LWG 2993 change.
296         * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
297         (reference_wrapper(_Tp&&)): Remove.
298         (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
299         template.
300         (reference_wrapper): Add deduction guide.
301         * testsuite/20_util/reference_wrapper/deduction.cc: New.
302         * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
304         LWG 3039 Unnecessary decay in thread and packaged_task
305         * include/std/future (__constrain_pkgdtask): Replace with ...
306         (packaged_task::__not_same): New alias template, using
307         __remove_cvref_t instead of decay.
308         * include/std/thread (thread::__not_same): Add comment.
310 2018-06-14  Jonathan Wakely  <jwakely@redhat.com>
312         LWG 3075 basic_string needs deduction guides from basic_string_view
313         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
314         deduction from string views.
315         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
316         Likewise.
318         LWG 3074 make scalar types non-deduced in valarray non-member functions
319         * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
320         scalar parameters to be a non-deduced context.
321         * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
322         whitespace.
323         * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
324         * testsuite/26_numerics/valarray/transcend.cc: New.
326         * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
327         Move back to <utility>.
328         * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
329         Restore to here.
331         P0935R0 Eradicating unnecessarily explicit default constructors
332         * include/backward/strstream (strstreambuf): Add non-explicit default
333         constructor.
334         * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
335         Likewise.
336         * include/bits/regex.h (match_results): Likewise.
337         * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
338         default constructor.
339         * testsuite/22_locale/conversions/string/1.cc: Likewise.
340         * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
341         * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
343         * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
344         macro from <utility> and change type to long.
345         * include/std/utility (__cpp_lib_tuple_element_t): Remove.
346         * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
347         macro.
349         P0935R0 Eradicating unnecessarily explicit default constructors
350         * include/bits/random.h (uniform_real_distribution::param_type)
351         (normal_distribution::param_type, lognormal_distribution::param_type)
352         (gamma_distribution::param_type, chi_squared_distribution::param_type)
353         (cauchy_distribution::param_type, fisher_f_distribution::param_type)
354         (student_t_distribution::param_type)
355         (bernoulli_distribution::param_type)
356         (binomial_distribution::param_type)
357         (geometric_distribution::param_type)
358         (negative_binomial_distribution::param_type)
359         (poisson_distribution::param_type)
360         (exponential_distribution::param_type)
361         (weibull_distribution::param_type)
362         (extreme_value_distribution::param_type): Add non-explicit default
363         constructors. Remove default argument for first parameter of explicit
364         constructors.
365         * include/bits/uniform_int_dist.h
366         (uniform_int_distribution::param_type): Likewise.
367         * include/ext/random
368         (beta_distribution::param_type, rice_distribution::param_type)
369         (nakagami_distribution::param_type, pareto_distribution::param_type)
370         (k_distribution::param_type, arcsine_distribution::param_type)
371         (hoyt_distribution::param_type, triangular_distribution::param_type)
372         (von_mises_distribution::param_type)
373         (hypergeometric_distribution::param_type)
374         (logistic_distribution::param_type)
375         (uniform_inside_sphere_distribution::param_type): Likewise.
376         (uniform_on_sphere_distribution::param_type): Make default constructor
377         non-explicit.
378         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
379         Test param_type for non-explicit default constructor.
380         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
381         Likewise.
382         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
383         Likewise.
384         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
385         Likewise.
386         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
387         Likewise.
388         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
389         Likewise.
390         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
391         Likewise.
392         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
393         Likewise.
394         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
395         Likewise.
396         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
397         Likewise.
398         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
399         Likewise.
400         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
401         Likewise.
402         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
403         Likewise.
404         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
405         Likewise.
406         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
407         Likewise.
408         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
409         Likewise.
410         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
411         Likewise.
412         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
413         Likewise.
414         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
415         Likewise.
416         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
417         Likewise.
418         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
419         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
420         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
421         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
422         Likewise.
423         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
424         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
425         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
426         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
427         Likewise.
428         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
429         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
430         * testsuite/ext/random/triangular_distribution/cons/default.cc:
431         Likewise.
432         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
433         Likewise.
434         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
435         Likewise.
436         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
437         Likewise.
439 2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
440             Jonathan Wakely  <jwakely@redhat.com>
442         PR libstdc++/83982
443         * include/bits/vector.tcc (vector::_M_default_append(size_type)):
444         Default-construct new elements before moving existing ones.
445         * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
446         New.
448 2018-06-13  Jonathan Wakely  <jwakely@redhat.com>
450         PR libstdc++/86127
451         * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
452         unused typedef.
453         (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
454         Use node allocator to create and destroy elements.
455         (forward_list::_Tp_alloc_type): Remove unused typedef.
456         (forward_list::_Alloc_traits): Use allocator_traits instead of
457         __gnu_cxx::__alloc_traits.
459 2018-06-13  François Dumont  <fdumont@gcc.gnu.org>
461         * include/debug/helper_functions.h
462         (__gnu_debug::_Safe_iterator<>): Add declaration.
463         (__can_advance(_Ite, _Size)): New.
464         (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
465         * include/debug/functions.h
466         (__gnu_debug::_Safe_iterator<>): Remove declaration.
467         * include/debug/stl_iterator.h
468         (__can_advance(const _Safe_iterator<>&)): New definition.
469         * include/debug/stl_iterator.h
470         (__can_advance(const std::reverse_iterator<>&, _Size)): New.
471         (__can_advance(const std::move_iterator<>&, _Size)): New.
472         * include/debug/macros.h (__glibcxx_check_can_increment): New.
473         * include/debug/debug.h (__glibcxx_requires_can_increment): New.
474         * include/bits/stl_algobase.h (fill_n): Use latter.
475         * testsuite/25_algorithms/fill_n/2.cc: New.
476         * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
477         * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
478         * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
479         * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
481         * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
482         (__glibcxx_requires_can_decrement_range): New.
484 2018-06-12  François Dumont  <fdumont@gcc.gnu.org>
486         * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
487         (__glibcxx_check_can_decrement_range): New.
488         * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
489         __glibcxx_requires_can_increment_range.
490         (std::move(_II, _II, _OI)): Likewise.
491         (std::copy_backward(_BI, _BI, _BI2)): Use
492         __glibcxx_requires_can_decrement_range.
493         (std::move_backward(_BI, _BI, _BI2)): Likewise.
494         * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
495         * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
496         * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
497         * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
498         * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
499         * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
501 2018-06-12  Jonathan Wakely  <jwakely@redhat.com>
503         P0935R0 Eradicating unnecessarily explicit default constructors
504         * include/bits/random.h (linear_congruential_engine)
505         (mersenne_twister_engine, subtract_with_carry_engine, random_device)
506         (uniform_real_distribution, normal_distribution)
507         (lognormal_distribution, gamma_distribution, chi_squared_distribution)
508         (cauchy_distribution, fisher_f_distribution, student_t_distribution)
509         (bernoulli_distribution, binomial_distribution,geometric_distribution)
510         (negative_binomial_distribution, exponential_distribution)
511         (weibull_distribution, extreme_value_distribution): Add non-explicit
512         default constructors. Remove default argument for first parameter of
513         explicit constructors.
514         (piecewise_constant_distribution, piecewise_linear_distribution):
515         Make default constructor non-explicit.
516         * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
517         non-explicit default constructors. Remove default argument for first
518         parameter of explicit constructor.
519         * include/ext/random
520         (simd_fast_mersenne_twister_engine, beta_distribution)
521         (rice_distribution, nakagami_distribution, pareto_distribution)
522         (k_distribution, arcsine_distribution, hoyt_distribution)
523         (triangular_distribution, von_mises_distribution)
524         (hypergeometric_distribution, logistic_distribution)
525         (uniform_inside_sphere_distribution): Likewise.
526         (uniform_on_sphere_distribution): Make default constructor
527         non-explicit.
528         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
529         Test for non-explicit default constructor. Fix references to standard.
530         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
531         Likewise.
532         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
533         Likewise.
534         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
535         Likewise.
536         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
537         Likewise.
538         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
539         Likewise.
540         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
541         Likewise.
542         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
543         Likewise.
544         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
545         Likewise.
546         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
547         Likewise.
548         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
549         Likewise.
550         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
551         Likewise.
552         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
553         Likewise.
554         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
555         Likewise.
556         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
557         Likewise.
558         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
559         Likewise.
560         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
561         Likewise.
562         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
563         Likewise.
564         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
565         Likewise.
566         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
567         Likewise.
568         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
569         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
570         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
571         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
572         Likewise.
573         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
574         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
575         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
576         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
577         Likewise.
578         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
579         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
580         * testsuite/ext/random/triangular_distribution/cons/default.cc:
581         Likewise.
582         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
583         Likewise.
584         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
585         Likewise.
586         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
587         Likewise.
588         * testsuite/util/testsuite_common_types.h
589         (implicitly_default_constructible): New helper.
591 2018-06-08  Jonathan Wakely  <jwakely@redhat.com>
593         * include/bits/ios_base.h (ios::Init::Init(const Init&))
594         (ios::Init::operator=): Define as defaulted.
595         * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
596         Likewise.
597         * include/bits/stream_iterator.h (istream_iterator::operator=)
598         (ostream_iterator::operator=): Likewise.
599         * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
600         Likewise.
601         * include/std/bitset (bitset::reference::reference(const reference&)):
602         Likewise.
603         * include/std/complex (complex<float>::complex(const complex&))
604         (complex<double>::complex(const complex&))
605         (complex<long double>::complex(const complex&)): Likewise.
607 2018-06-07  Jonathan Wakely  <jwakely@redhat.com>
609         * include/bits/regex.h (sub_match): Add noexcept to default
610         constructor and length observer.
611         (match_results): Add noexcept to default constructor and observers
612         with no preconditions. Define destructor as defaulted.
613         (operator==, operator!=, swap): Add noexcept.
614         (regex_iterator): Add default member initializers and define default
615         constructor and destructor as defaulted. Add noexcept to equality
616         and dereference operators.
618 2018-06-07  François Dumont  <fdumont@gcc.gnu.org>
620         * src/c++11/debug.cc
621         (_Safe_iterator_base::_M_detach()): Reset state only if needed.
622         (_Safe_iterator_base::_M_detach_single()): Likewise.
623         (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
624         (_Safe_local_iterator_base::_M_detach_single()): Likewise.
626 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
628         * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
629         move of const value.
631 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
633         PR c++/86068
634         * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
635         rather than __cpp_transactional_memory >= 201505L.
637 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
639         PR libstdc++/86008
640         * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
641         Define new partial specialization.
642         * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
643         new overload.
644         (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
645         value not reference for iteration.
646         * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
647         comment.
648         * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
649         * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
650         comment.
652 2018-06-05  Jonathan Wakely  <jwakely@redhat.com>
654         * include/std/type_traits: Fix comment typos.
656         * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
657         mingw* targets.
658         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
659         * testsuite/experimental/filesystem/operations/read_symlink.cc:
660         Likewise.
662 2018-06-05  François Dumont  <fdumont@gcc.gnu.org>
664         * include/bits/stl_tempbuf.h
665         (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
666         (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
667         * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
668         * include/bits/stl_algo.h (__stable_partition): Adapt.
669         (__inplace_merge): Adapt.
670         (__stable_sort): Adapt.
672 2018-06-04  Jonathan Wakely  <jwakely@redhat.com>
674         PR libstdc++/85930
675         * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
676         unconditionally. Remove redundant declaration.
677         [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
678         alignment-specifier.
680         * include/bits/postypes.h (fpos): Define special members as defaulted.
682         PR libstdc++/85930
683         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
684         the static variable correctly.
686 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
688         PR libstdc++/78870 support std::filesystem on Windows
689         * config.h.in: Regenerate.
690         * configure: Regenerate.
691         * configure.ac: Check for link, readlink and symlink.
692         * include/bits/fs_path.h (path::operator/=(const path&)): Move
693         definition out of class body.
694         (path::is_absolute(), path::_M_append(path)): Likewise.
695         (operator<<(basic_ostream, const path&)): Use std::quoted directly.
696         (operator>>(basic_istream, path&)): Likewise.
697         (u8path): Reorder definitions and fix Windows implementation.
698         (path::is_absolute()): Define inline and fix for Windows.
699         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
700         Define POSIX version inline.
701         (path::_M_append(path)): Define inline.
702         * include/experimental/bits/fs_path.h (path::is_absolute()): Move
703         definition out of class body.
704         (operator<<(basic_ostream, const path&)): Fix type of delimiter and
705         escape characters.
706         (operator>>(basic_istream, path&)): Likewise.
707         (path::is_absolute()): Define inline and fix for Windows.
708         * src/filesystem/dir-common.h (__gnu_posix): New namespace.
709         (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
710         (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
711         Define as adaptors for Windows functions/types or as
712         using-declarations for POSIX functions/types.
713         (_Dir_base, get_file_type): Qualify names to use declarations from
714         __gnu_posix namespace.
715         (_Dir_base::is_dor_or_dotdot): New helper functions.
716         * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
717         names to use declarations from __gnu_posix namespace.
718         * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
719         (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
720         (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
721         (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
722         (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
723         (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
724         Define as adaptors for Windows functions/types or as
725         using-declarations for POSIX functions/types.
726         (stat_type, do_copy_file): Qualify names to use declarations from
727         __gnu_posix namespace.
728         (do_space): Declare new function.
729         (make_file_type): Only use S_ISLNK if defined.
730         * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
731         path::value_type not char.
732         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
733         names to use declarations from __gnu_posix namespace.
734         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
735         add implementation for Windows.
736         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
737         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
738         [!_PC_PATH_MAX]: Don't use pathconf.
739         [PATH_MAX]: Use if defined.
740         (filesystem::current_path(const path&, error_code&))
741         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
742         (filesystem::last_write_time, filesystem::permissions): Use names
743         from __gnu_posix.
744         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
745         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
746         implementation for Windows.
747         (filesystem::rename, filesystem::resize_file): Use names from
748         __gnu_posix.
749         (filesystem::space): Use do_space.
750         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
751         (filesystem::status, filesystem::symlink_status): Use names from
752         __gnu_posix.
753         (filesystem::temp_directory_path): Add implementation for Windows.
754         * src/filesystem/path.cc (dot): Define constant.
755         (path::replace_extension): Use dot.
756         (path::_M_find_extension): Likewise. Use path::string_type not
757         std::string.
758         (path::_M_split_cmpts): Use dot.
759         (filesystem_error::_M_get_what): Use u8string() not native().
760         * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
761         Qualify names to use declarations from __gnu_posix namespace.
762         * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
763         correct error_code.
764         (filesystem::absolute(const path&, error_code&)): Add implementation
765         for Windows.
766         (char_ptr, filesystem::canonical): Use path::value_type not char.
767         (do_copy_file): Use names from __gnu_posix.
768         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
769         sendfile.
770         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
771         names to use declarations from __gnu_posix namespace.
772         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
773         add implementation for Windows.
774         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
775         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
776         [!_PC_PATH_MAX]: Don't use pathconf.
777         [PATH_MAX]: Use if defined.
778         (filesystem::current_path(const path&, error_code&))
779         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
780         (filesystem::last_write_time, filesystem::permissions): Use names
781         from __gnu_posix.
782         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
783         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
784         implementation for Windows.
785         (filesystem::rename, filesystem::resize_file): Use names from
786         __gnu_posix.
787         (do_space): Define.
788         (filesystem::space): Use do_space.
789         (filesystem::status, filesystem::symlink_status): Use names from
790         __gnu_posix.
791         (filesystem::temp_directory_path): Add implementation for Windows.
792         * src/filesystem/std-path.cc
793         [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
794         Define for Windows.
795         (dot): Define constant.
796         (path::replace_extension, is_dot): Use dot.
797         (path::lexically_normal): Check _M_type instead of calling
798         non-existent function.
799         (path::_M_find_extension): Use dot. Use path::string_type not
800         std::string.
801         (path::_M_split_cmpts): Use dot.
802         (filesystem_error::_M_get_what): Use u8string() not native().
803         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
804         use symlinks.
805         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
806         Likewise.
807         * testsuite/27_io/filesystem/operations/absolute.cc: Use
808         __gnu_test::root_path() instead of "/" and add Windows-specific tests.
809         * testsuite/27_io/filesystem/operations/canonical.cc: Use
810         path::string() to get narrow string, not path::native().
811         * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
812         with std::filesystem::path not std::basic_string.
813         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
814         * testsuite/27_io/filesystem/operations/exists.cc: Use
815         __gnu_test::root_path() instead of "/".
816         * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
817         fstreams with std::filesystem::path not std::basic_string.
818         * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
819         path::string() to get narrow string.
820         * testsuite/27_io/filesystem/operations/space.cc: Check results for
821         errors, expect sensible values otherwise.
822         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
823         helpers for adjusting the environment on Windows.
824         * testsuite/27_io/filesystem/path/append/path.cc: Test
825         Windows-specific behaviour.
826         * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
827         of path::string_type objects.
828         * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
829         string to wide string on Windows.
830         * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
831         for backslash as root-directory.
832         * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
833         path::string() to get narrow string.
834         * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
835         paths.
836         * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
837         not std::string.
838         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
839         different definintion of absolute paths on Windows.
840         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
841         Do not use symlinks.
842         * testsuite/experimental/filesystem/operations/absolute.cc: Test
843         Windows behaviour.
844         * testsuite/experimental/filesystem/operations/copy.cc: Construct
845         fstreams with NTCTS not std::basic_string.
846         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
847         * testsuite/experimental/filesystem/operations/exists.cc: Use
848         __gnu_test::root_path() instead of "/".
849         * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
850         fstreams with NTCTS not std::basic_string.
851         * testsuite/experimental/filesystem/operations/last_write_time.cc:
852         Use path::string() to get narrow string.
853         * testsuite/experimental/filesystem/operations/space.cc: Use
854         __gnu_test::root_path() instead of "/".
855         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
856         Add helpers for adjusting the environment on Windows.
857         * testsuite/experimental/filesystem/path/append/path.cc: Use
858         path::string() to get narrow strings for comparisons.
859         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
860         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
861         Likewise.
862         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
863         * testsuite/experimental/filesystem/path/native/string.cc: Use
864         string_type not std::string.
865         * testsuite/experimental/filesystem/path/query/is_absolute.cc:
866         Adjust for different definintion of absolute paths on Windows.
867         * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
868         function.
869         (__gnu_test::scoped_file): Construct fstreams with NTCTS not
870         std::basic_string.
872 2018-05-31  Jonathan Wakely  <jwakely@redhat.com>
874         PR libstdc++/85951
875         * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
876         uint_least16_t and uint_least32_t.
877         (__make_unsigned<wchar_t>): Define unconditionally.
878         (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
879         typedefs.
880         (__make_unsigned_selector_base): New type to provide helper templates.
881         (__make_unsigned_selector<_Tp, false, true>): Reimplement using
882         __make_unsigned_selector_base helpers.
883         (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
884         (__make_signed_selector<_Tp, true, false>): Remove intermediate
885         typedefs.
886         (__make_signed<wchar_t>, __make_signed<char16_t>)
887         (__make_signed<char32_t>)): Define unconditionally.
888         * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
889         wchar_t, char16_t and char32_t are transformed correctly.
890         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
891         dg-error lineno.
892         * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
893         wchar_t, char16_t and char32_t are transformed correctly.
894         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
895         dg-error lineno.
897 2018-05-29  Jonathan Wakely  <jwakely@redhat.com>
899         * include/std/variant (__erased_dtor): Qualify call to __get.
901 2018-05-27  François Dumont  <fdumont@gcc.gnu.org>
903         * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
904         (_Rb_tree(const allocator_type&)): Use latter.
905         * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
906         (map(initializer_list<value_type>, const allocator_type&)): Likewise.
907         (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
908         * include/bits/stl_multimap.h
909         (multimap(const allocator_type&)): Likewise.
910         (multimap(initializer_list<value_type>, const allocator_type&)):
911         Likewise.
912         (multimap(_InputIterator, _InputIterator, const allocator_type&)):
913         Likewise.
914         * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
915         (set(initializer_list<value_type>, const allocator_type&)): Likewise.
916         (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
917         * include/bits/stl_multiset.h
918         (multiset(const allocator_type&)): Likewise.
919         (multiset(initializer_list<value_type>, const allocator_type&)):
920         Likewise.
921         (multiset(_InputIterator, _InputIterator, const allocator_type&)):
922         Likewise.
924 2018-05-25  François Dumont  <fdumont@gcc.gnu.org>
926         PR libstdc++/85768
927         * src/c++11/debug.cc: Remove backtrace usage.
929 2018-05-24  Maya Rashish  <coypu@sdf.org>
931         PR target/85904
932         * crossconfig.m4: Test for aligned_alloc on netbsd.
933         * configure: Regenerate.
935 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
937         PR libstdc++/69769
938         PR libstdc++/85886
939         * include/bits/atomic_base.h (__atomic_base::value_type)
940         (__atomic_base::difference_type): Add new typedefs.
941         * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
942         (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
943         (atomic<T*>::operator++, atomic<T*>::operator--)
944         (atomic<T*>::operator+=, atomic<T*>::operator-=)
945         (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
946         to enforce C++17 requirement on pointer arithmetic.
947         (__atomic_val_t, __atomic_diff_t): New alias templates.
948         (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
949         (atomic_compare_exchange_weak_explicit)
950         (atomic_compare_exchange_strong_explicit, atomic_store)
951         (atomic_exchange, atomic_compare_exchange_weak)
952         (atomic_compare_exchange_strong): Use __atomic_val_t to make
953         scalar parameters be non-deduced contexts.
954         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
955         (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
956         atomic instead of __atomic_base, and use __atomic_diff_t for scalar
957         parameters.
958         (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
959         (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
960         (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
961         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
962         (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
963         address types.
964         * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
965         * testsuite/29_atomics/atomic/69769.cc: New test.
966         * testsuite/29_atomics/atomic/nonmembers.cc: New test.
967         * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
968         Disable test for C++17 and later.
969         * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
970         * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
971         * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
972         test.
974 2018-05-23  Jonathan Wakely  <jwakely@redhat.com>
976         * include/bits/fs_path.h (path::__is_encoded_char): Change from class
977         template to alias template.
978         (path::__value_type_is_char): Use remove_const_t.
979         (path:_S_string_from_iter): New helper function.
980         (path::_S_convert(InputIter, __null_terminated))
981         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
982         Use _S_string_from_iter.
983         (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
984         rep for COW strings.
985         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
986         Change from class template to alias template.
987         (path::__value_type_is_char): Use remove_const.
988         (path:_S_string_from_iter): New helper function.
989         (path::_S_convert(InputIter, __null_terminated))
990         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
991         Use _S_string_from_iter.
992         * testsuite/27_io/filesystem/path/append/source.cc: Test appending
993         wide strings.
994         * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
995         string equality, not path equivalence.
996         * testsuite/27_io/filesystem/path/construct/format.cc: Check
997         construction from std::string and std::wstring and input iterators.
998         * testsuite/27_io/filesystem/path/construct/locale.cc: Check
999         construction from iterators.
1000         * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1001         exact string equality, not path equivalence.
1002         * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1003         construction from iterators.
1005         * include/bits/fs_path.h (path::_M_type): Change default member
1006         initializer to _Filename.
1007         (path::begin): Create past-the-end iterator for empty path.
1008         * src/filesystem/std-path.cc (path::remove_filename()): Remove
1009         debugging check.
1010         (path::has_relative_path()): Return false for empty filenames.
1011         (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1012         Fix offset of empty final component.
1013         * testsuite/27_io/filesystem/path/itr/components.cc: New.
1014         * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1016 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
1018         Add support for opening file streams from wide character strings.
1019         * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1020         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1021         Define new overload.
1022         * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1023         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1024         Declare new overload.
1025         * configure.ac: Check for _wfopen.
1026         * crossconfig.m4: Likewise.
1027         * configure: Regenerate.
1028         * config.h.in: Regenerate.
1029         * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1030         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1031         Define new overload.
1032         * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1033         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1034         Declare new overload.
1035         [_GLIBCXX_HAVE__WFOPEN]
1036         (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1037         (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1038         (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1039         (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1040         (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1041         (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1042         new overloads.
1043         * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1044         * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1045         * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1046         * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1047         * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1048         * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1049         * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1051 2018-05-21  François Dumont  <fdumont@gcc.gnu.org>
1053         PR libstdc++/85845
1054         * include/bits/stl_tree.h
1055         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1056         qualification.
1058 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
1060         * src/filesystem/std-ops.cc (absolute): Report an error for empty
1061         paths.
1062         (weakly_canonical(const path&)): Do not call canonical on empty path.
1063         (weakly_canonical(const path&, error_code&)): Likewise.
1064         * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1066         PR libstdc++/85818
1067         * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1068         dg-require-filesystem-ts.
1070         PR libstdc++/85843
1071         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1072         initialize base class to avoid warnings.
1074 2018-05-19  Jonathan Wakely  <jwakely@redhat.com>
1076         * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1077         [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1078         little_endian element in bitmask.
1079         * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1080         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1082 2018-05-18  François Dumont  <fdumont@gcc.gnu.org>
1084         * include/bits/stl_tree.h
1085         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1086         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1087         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1088         (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1089         * include/debug/map.h
1090         (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1091         * include/debug/multimap.h
1092         (multimap(multimap&&, const_allocator_type&)): Likewise.
1093         * include/debug/set.h
1094         (set(set&&, const_allocator_type&)): Likewise.
1095         * include/debug/multiset.h
1096         (multiset(multiset&&, const_allocator_type&)): Likewise.
1097         * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1098         Add checks.
1099         * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1100         Add checks.
1101         * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1102         Add checks.
1103         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1104         Add checks.
1105         * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1106         Add checks.
1107         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1108         Add checks.
1109         * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1110         Add checks.
1111         * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1112         Add checks.
1114 2018-05-18  Jason Merrill  <jason@redhat.com>
1116         * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1117         for conversion to const_iterator.  Add defaulted copy ops.
1118         * libsupc++/new (bad_alloc): Add defaulted copy ops.
1119         * libsupc++/exception.h (exception): Add defaulted copy ops.
1120         * include/std/system_error (system_error): Add defaulted copy ops.
1121         * include/std/stdexcept (domain_error, invalid_argument)
1122         (length_error, out_of_range, range_error, overflow_error)
1123         (underflow_error): Add defaulted copy ops.
1124         * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1125         copy assignment.
1126         * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1127         * include/ext/throw_allocator.h (condition_base): Add defaulted
1128         default and copy ctor and copy assignment.
1130 2018-05-18  Jonathan Wakely  <jwakely@redhat.com>
1132         PR libstdc++/85098
1133         * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1134         (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1135         (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1136         (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1137         definitions.
1138         * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1139         whitespace.
1140         * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1141         braces around body of do-while.
1142         * testsuite/28_regex/basic_regex/85098.cc: New
1144 2018-05-17  Jonathan Wakely  <jwakely@redhat.com>
1146         PR libstdc++/85818
1147         * src/filesystem/path.cc (path::preferred_separator): Add used
1148         attribute.
1149         * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1151         PR libstdc++/85812
1152         * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1153         * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1154         Refactor to separate non-throwing and throwing implementations.
1155         [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1156         if constructing the object throws.
1158 2018-05-15  Jonathan Wakely  <jwakely@redhat.com>
1160         PR libstdc++/85749
1161         * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1162         (linear_congruential_engine, mersenne_twister_engine)
1163         (subtract_with_carry_engine, discard_block_engine)
1164         (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1165         constrain function templates taking seed sequences.
1166         * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1167         (mersenne_twister_engine::seed(_Sseq&))
1168         (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1169         match declarations.
1170         * include/ext/random (simd_fast_mersenne_twister_engine): Use
1171         __is_seed_seq to constrain function templates taking seed sequences.
1172         * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1173         Change return type to match declaration.
1174         * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1175         New.
1176         * testsuite/26_numerics/random/independent_bits_engine/cons/
1177         seed_seq2.cc: New.
1178         * testsuite/26_numerics/random/linear_congruential_engine/cons/
1179         seed_seq2.cc: New.
1180         * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1181         seed_seq2.cc: New.
1182         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1183         * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1184         New.
1185         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1186         seed_seq2.cc: New.
1187         * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1188         seed_seq2.cc: New.
1190         PR libstdc++/83891
1191         * include/bits/fs_path.h (path::is_absolute()): Use same definition
1192         for all operating systems.
1193         * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1194         * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1195         * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1196         * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1198         * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1199         unused <vector> header.
1200         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1201         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1202         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1203         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1204         * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1205         Likewise.
1206         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1207         Likewise.
1208         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1209         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1210         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1211         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1212         * testsuite/experimental/filesystem/path/decompose/extension.cc:
1213         Likewise.
1214         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1215         * testsuite/experimental/filesystem/path/query/has_extension.cc:
1216         Likewise.
1217         * testsuite/experimental/filesystem/path/query/has_filename.cc:
1218         Likewise.
1219         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1220         Likewise.
1221         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1222         Likewise.
1223         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1224         Likewise.
1225         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1226         Likewise.
1227         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1228         Likewise.
1229         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1230         * testsuite/experimental/filesystem/path/query/is_relative.cc:
1231         Likewise.
1233         PR libstdc++/84159
1234         * include/bits/fs_path.h (path::operator/=, path::append): Construct
1235         temporary path before calling _M_append.
1236         (path::_M_append): Change parameter to path and implement C++17
1237         semantics.
1238         * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1239         and more examples from the standard.
1240         * testsuite/27_io/filesystem/path/append/source.cc: New.
1241         * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1242         * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1244         * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1245         __invoke to prevent ADL.
1247 2018-05-14  Jonathan Wakely  <jwakely@redhat.com>
1249         PR libstdc++/81256
1250         * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1251         exceptions from _M_terminate_output().
1252         * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1253         exceptions from close().
1254         * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1256         * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1257         (__valarray_get_storage): Call operator new directly. Remove ignored
1258         top-level restrict qualifier and add malloc attribute instead.
1259         (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1261         PR libstdc++/67554
1262         * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1263         (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1265         PR libstdc++/82966
1266         * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1267         instead of type.
1268         * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1270 2018-05-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
1272         PR libstdc++/80165
1273         * testsuite/20_util/variant/80165.cc: New.
1275 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
1277         * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1278         * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1279         of C++11 containers with Debug Mode support.
1280         * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1281         * doc/html/*: Regenerate.
1283 2018-05-10  Jason Merrill  <jason@redhat.com>
1285         * include/bits/regex_compiler.h (_S_cache_size): Change from
1286         function to variable.
1288 2018-05-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
1290         PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1291         * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1292         argument defaulted to +1.  Doxy comments on same.
1293         * testsuite/special_functions/02_assoc_legendre/
1294         check_value.cc: Regen.
1295         * testsuite/tr1/5_numerical_facilities/special_functions/
1296         02_assoc_legendre/check_value.cc: Regen.
1298 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
1300         PR libstdc++/85729
1301         * include/bits/c++config.h (__replacement_assert): Add linkage
1302         specification.
1303         * include/bits/std_abs.h: Add comment to closing brace of block.
1304         * include/c_global/cstddef: Add linkage specification.
1305         * include/c_global/cstring: Likewise.
1306         * include/c_global/cwchar: Likewise.
1308 2018-05-09  François Dumont  <fdumont@gcc.gnu.org>
1310         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1311         Rename in...
1312         (_Safe_iterator<>::_S_constant()): ...that.
1313         * include/debug/safe_local_iterator.h
1314         (_Safe_local_iterator<>::_M_constant()): Rename in...
1315         (_Safe_local_iterator<>::_S_constant()): ...that.
1316         * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1317         (_Iterator_state::__rbegin): New.
1318         (_Iterator_state::__rmiddle): New.
1319         (_Iterator_state::__rend): New.
1320         (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1321         _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1322         iterator type.
1323         (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1324         _Is_iterator)): Likewise.
1325         (_Parameter::_S_reverse_state(_Iterator_state)): New.
1326         (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1327         _Is_iterator)): New.
1328         (_Parameter(std::reverse_iterator<> const&, const char*,
1329         _Is_iterator)): New.
1330         (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1331         const char*, _Is_iterator)): New.
1332         (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1333         New.
1334         (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1335         _Is_iterator)): New.
1336         * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1337         * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1338         * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1340 2018-05-09  Jonathan Wakely  <jwakely@redhat.com>
1342         * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1343         Use constexpr if in C++17 mode.
1344         (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1345         Copy from const object.
1346         * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1348 2018-05-08  François Dumont  <fdumont@gcc.gnu.org>
1350         * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1351         [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1352         backtrace.
1354         * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1355         * include/debug/functions.h (__check_valid_range): Use latter.
1356         * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1357         use latter.
1358         * include/debug/deque
1359         (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1360         * include/debug/forward_list
1361         (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1362         Likewise.
1363         * include/debug/list
1364         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1365         * include/debug/list
1366         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1367         * include/debug/map.h
1368         (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1369         (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1370         Likewise.
1371         * include/debug/multimap.h
1372         (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1373         (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1374         const _Alloc&)): Likewise.
1375         * include/debug/set.h
1376         (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1377         (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1378         Likewise.
1379         * include/debug/multiset.h
1380         (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1381         (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1382         const _Alloc&)): Likewise.
1383         * include/debug/string
1384         (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1385         Likewise.
1386         * include/debug/unordered_map
1387         (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1388         Likewise.
1389         (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1390         const _Alloc&)): Likewise.
1391         * include/debug/unordered_set
1392         (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1393         Likewise.
1394         (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1395         const _Alloc&)): Likewise.
1396         * include/debug/vector
1397         (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1399         * include/debug/formatter.h (_Error_formatter::_M_function): New.
1400         (_Error_formatter(const char*, unsigned int)): Adapt.
1401         (_Error_formatter::_M_at): Rename in...
1402         (_Error_formatter::_S_at): ...that and adapt.
1403         * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1404         (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1405         * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1406         when available.
1408 2018-05-08  Jonathan Wakely  <jwakely@redhat.com>
1410         * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1411         Use normal std::vector even in Debug Mode.
1413         PR libstdc++/85672
1414         * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1415         to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1416         * include/Makefile.in: Regenerate.
1417         * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1418         within conditional block.
1420 2018-05-07  Jonathan Wakely  <jwakely@redhat.com>
1422         * doc/xml/manual/using.xml (table.cmd_options): Document that the
1423         C++17 Filesystem implementation also needs -lstdc++fs.
1425         PR libstdc++/85671
1426         * include/bits/fs_path.h (operator/): Permit copy elision.
1427         * include/experimental/bits/fs_path.h (operator/): Likewise.
1429 2018-05-07  Edward Smith-Rowland  <3dw4rd@verizon.net>
1431         Moar PR libstdc++/80506
1432         * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1433         Fix magic number used in loop condition.
1435 2018-05-04  Jonathan Wakely  <jwakely@redhat.com>
1437         PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1438         * include/std/optional (_Optional_payload): Add noexcept to default
1439         constructor. Re-indent.
1440         (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1441         constructor for copying disengaged payloads.
1442         (_Optional_payload<_Tp, true, false, true>): Likewise.
1443         (_Optional_payload<_Tp, true, true, false>): Likewise.
1444         (_Optional_payload<_Tp, true, false, false>): Likewise.
1445         * testsuite/20_util/optional/cons/85642.cc: New.
1446         * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1448 2018-05-03  Jonathan Wakely  <jwakely@redhat.com>
1450         PR libstdc++/82644
1451         * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1452         inline definitions instead of using-declarations.
1453         [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1454         * testsuite/tr1/5_numerical_facilities/special_functions/
1455         07_conf_hyperg/compile_cxx17.cc: New.
1456         * testsuite/tr1/5_numerical_facilities/special_functions/
1457         17_hyperg/compile_cxx17.cc: New.
1459         PR libstdc++/84769
1460         * include/std/variant (visit): Qualify std::get call.
1462         PR libstdc++/85632 use uintmax_t for arithmetic
1463         * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1464         arithmetic in result type.
1465         * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1466         * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1467         is greater than free space.
1468         * testsuite/experimental/filesystem/operations/space.cc: New.
1470         * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1471         * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1472         New.
1473         * testsuite/20_util/remove_cvref/value.cc: New.
1474         * testsuite/20_util/remove_cvref/value_ext.cc: New.
1476         PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1477         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1478         (append(const basic_string&, size_type, size_type)
1479         (assign(const basic_string&, size_type, size_type)
1480         (insert(size_type, const basic_string&, size_type, size_type)
1481         (replace(size_type,size_type,const basic_string&,size_type,size_type)
1482         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1483         Add default arguments (LWG 2268).
1484         [_GLIBCXX_USE_CXX11_ABI=0]
1485         (append(const basic_string&, size_type, size_type)
1486         (assign(const basic_string&, size_type, size_type)
1487         (insert(size_type, const basic_string&, size_type, size_type)
1488         (replace(size_type,size_type,const basic_string&,size_type,size_type)
1489         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1490         Likewise.
1491         * testsuite/21_strings/basic_string/dr2268.cc: New test.
1493         PR libstdc++/84535
1494         * include/std/thread (thread::__not_same): New SFINAE helper.
1495         (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1496         first argument is not a std::thread. Add static assertion to check
1497         INVOKE expression is valid.
1498         (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1499         (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1500         __invoke_result for return types and remove exception specifications.
1501         * testsuite/30_threads/thread/cons/84535.cc: New.
1503         * include/std/future (__async_result_of): Use __invoke_result instead
1504         of result_of.
1506         * include/std/any (any_cast): Use __remove_cvref_t.
1507         * include/std/tuple (__make_tuple): Likewise.
1508         * include/std/type_traits (__remove_cvref_t): Define.
1509         (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1510         [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1511         * include/std/variant (__erased_hash): Use __remove_cvref_t.
1513 2018-05-02  François Dumont  <fdumont@gcc.gnu.org>
1515         * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1516         ensure overloaded comma not used.
1517         * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1518         * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1519         * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1520         * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1521         * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1522         * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1523         * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1525 2018-05-02  Jonathan Wakely  <jwakely@redhat.com>
1527         PR libstdc++/68197
1528         * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1529         indices to unsigned.
1530         * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1531         as failure. Refactor error handling.
1532         * testsuite/27_io/ios_base/storage/68197.cc: New.
1534         PR libstdc++/57997
1535         PR libstdc++/83860
1536         * include/bits/gslice_array.h (gslice_array): Define default
1537         constructor as deleted, as per C++11 standard.
1538         * include/bits/mask_array.h (mask_array): Likewise.
1539         * include/bits/slice_array.h (slice_array): Likewise.
1540         * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1541         to namespace __detail.
1542         (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1543         members.
1544         * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1545         of data members in closure objects.
1546         (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1547         (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1548         __detail.
1549         (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1550         (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1551         (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1552         * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1553         (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1554         using-declarations to namespace std.
1555         * testsuite/26_numerics/valarray/83860.cc: New.
1557         * testsuite/backward/strstream_move.cc: Remove duplicate function
1558         call.
1560         PR libstdc++/69608
1561         * include/backward/strstream (strstreambuf): Define move constructor
1562         and move assignment operator.
1563         (istrstream, ostrstream, strstream): Likewise.
1564         * testsuite/backward/strstream_move.cc: New.
1566 2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
1568         PR libstdc++/84654
1569         * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1570         * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1571         * configure: Regenerate.
1572         * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1573         based on ENABLE_FLOAT128.
1574         * include/Makefile.in: Regenerate.
1575         * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1576         [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1577         _GLIBCXX_USE_FLOAT128.
1579 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
1581         * configure: Regenerated.
1583 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
1585         * configure: Regenerated.
1587 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
1588             Jakub Jelinek  <jakub@redhat.com>
1590         PR libstdc++/85442
1591         * src/c++11/Makefile.am: Don't generate debuginfo again for
1592         cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1593         * src/c++11/Makefile.in: Regenerate.
1595 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
1597         PR libstdc++/84442
1598         * testsuite/30_threads/thread/cons/terminate.cc
1599         [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1601 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
1603         PR jit/85384
1604         * configure: Regenerate.
1606 2018-04-16  Jonathan Wakely  <jwakely@redhat.com>
1608         * testsuite/experimental/filesystem/file_status/1.cc: Add
1609         -DUSE_FILESYSTEM_TS to dg-options.
1610         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1611         Likewise.
1612         * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1613         * testsuite/experimental/filesystem/iterators/
1614         recursive_directory_iterator.cc: Likewise.
1615         * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1616         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1617         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1618         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1619         * testsuite/experimental/filesystem/operations/create_directories.cc:
1620         Likewise.
1621         * testsuite/experimental/filesystem/operations/create_directory.cc:
1622         Likewise.
1623         * testsuite/experimental/filesystem/operations/create_symlink.cc:
1624         Likewise.
1625         * testsuite/experimental/filesystem/operations/current_path.cc:
1626         Likewise.
1627         * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1628         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1629         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1630         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1631         * testsuite/experimental/filesystem/operations/last_write_time.cc:
1632         Likewise.
1633         * testsuite/experimental/filesystem/operations/permissions.cc:
1634         Likewise.
1635         * testsuite/experimental/filesystem/operations/read_symlink.cc:
1636         Likewise.
1637         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1638         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1639         * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1640         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1641         Likewise.
1642         * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1643         * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1644         * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1645         * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1646         * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1647         * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1648         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1649         * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1650         * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1651         * testsuite/experimental/filesystem/path/construct/default.cc:
1652         Likewise.
1653         * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1654         * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1655         * testsuite/experimental/filesystem/path/construct/string_view.cc:
1656         Likewise.
1657         * testsuite/experimental/filesystem/path/decompose/extension.cc:
1658         Likewise.
1659         * testsuite/experimental/filesystem/path/decompose/filename.cc:
1660         Likewise.
1661         * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1662         Likewise.
1663         * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1664         Likewise.
1665         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1666         Likewise.
1667         * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1668         Likewise.
1669         * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1670         Likewise.
1671         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1672         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1673         Likewise.
1674         * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1675         * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1676         * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1677         Likewise.
1678         * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1679         Likewise.
1680         * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1681         Likewise.
1682         * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1683         Likewise.
1684         * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1685         * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1686         * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1687         Likewise.
1688         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1689         * testsuite/experimental/filesystem/path/query/has_extension.cc:
1690         Likewise.
1691         * testsuite/experimental/filesystem/path/query/has_filename.cc:
1692         Likewise.
1693         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1694         Likewise.
1695         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1696         Likewise.
1697         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1698         Likewise.
1699         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1700         Likewise.
1701         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1702         Likewise.
1703         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1704         * testsuite/experimental/filesystem/path/query/is_relative.cc:
1705         Likewise.
1707 2018-04-13  Jonathan Wakely  <jwakely@redhat.com>
1709         * src/c++11/Makefile.am: Fix sed command.
1710         * src/c++11/Makefile.in: Regenerate.
1712         * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1713         handle mangled names starting with double underscores on darwin.
1714         * src/c++11/Makefile.in: Regenerate.
1716 2018-04-12  Jonathan Wakely  <jwakely@redhat.com>
1718         * src/c++11/Makefile.am: Fix comment.
1719         * src/c++11/Makefile.in: Regenerate.
1720         * src/c++11/cxx11-ios_failure.cc: Fix comment.
1721         * src/c++98/ios_failure.cc: Likewise.
1723         * src/c++11/ios.cc: Remove redundant macro definition.
1725 2018-04-11  Jonathan Wakely  <jwakely@redhat.com>
1727         * doc/xml/manual/abi.xml: Document header locations in recent
1728         releases.
1729         * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1730         * doc/xml/manual/spine.xml: Update copyright years.
1731         * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1732         undefined behaviour.
1733         * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1734         * doc/html/*: Regenerate.
1736 2018-04-10  Jonathan Wakely  <jwakely@redhat.com>
1738         * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1739         * doc/xml/manual/backwards_compatibility.xml: Likewise.
1740         * doc/xml/manual/containers.xml: Likewise.
1741         * doc/xml/manual/debug_mode.xml: Likewise.
1742         * doc/xml/manual/extensions.xml: Likewise.
1743         * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1744         * doc/xml/manual/using.xml: Likewise.
1745         * doc/xml/manual/utilities.xml: Likewise.
1747         PR libstdc++/85222
1748         * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1749         cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1750         * src/c++11/Makefile.in: Regenerate.
1751         * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1752         New types.
1753         [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1754         * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1755         * src/c++98/ios_failure.cc (__construct_ios_failure)
1756         (__destroy_ios_failure, is_ios_failure_handler): New functions.
1757         [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1758         * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1759         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1760         handler types, to always catch std::ios_base::failure.
1761         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1762         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1763         exceptions_failbit.cc: Likewise.
1764         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1765         exceptions_failbit.cc: Likewise.
1766         * testsuite/27_io/basic_istream/extractors_other/char/
1767         exceptions_null.cc: Likewise.
1768         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1769         exceptions_null.cc: Likewise.
1770         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1771         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1772         * testsuite/27_io/basic_ostream/inserters_other/char/
1773         exceptions_null.cc: Likewise.
1774         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1775         exceptions_null.cc: Likewise.
1776         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1778 2018-04-05  Jonathan Wakely  <jwakely@redhat.com>
1780         * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1781         __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1783 2018-04-03  Jonathan Wakely  <jwakely@redhat.com>
1785         PR libstdc++/85183
1786         * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1787         value categories.
1788         * testsuite/20_util/variant/85183.cc: New.
1790 2018-03-26  Jonathan Wakely  <jwakely@redhat.com>
1792         * include/std/variant (__get): Qualify calls to avoid ADL.
1793         (__select_index): Adjust whitespace.
1794         (variant): Add using-declaration to workaround Clang bug.
1796 2018-03-22  Jonathan Wakely  <jwakely@redhat.com>
1798         PR libstdc++/85040
1799         * include/bits/stl_function.h (greater::__not_overloaded)
1800         (less::__not_overloaded, greater_equal::__not_overloaded)
1801         (less_equal::__not_overloaded): Fix ambiguous specializations.
1802         * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1803         tests for type with overloaded operators.
1805 2018-03-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1807         PR libstdc++/77691
1808         * testsuite/experimental/memory_resource/resource_adaptor.cc:
1809         xfail execution on 32-bit Solaris/x86.
1811 2018-03-21  Jonathan Wakely  <jwakely@redhat.com>
1813         * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1814         VERIFY instead of assert.
1815         * testsuite/20_util/hash/84998.cc: New test.
1816         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1817         copy of test adjusted for Debug Mode.
1818         * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1819         test in Debug Mode.
1821 2018-03-20  François Dumont  <fdumont@gcc.gnu.org>
1823         PR libstdc++/84998
1824         * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1825         * include/std/bitset: Likewise.
1826         * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1827         declaration.
1828         * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1829         * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1830         * include/bits/stl_set.h (std::set<>): Likewise.
1831         * include/bits/unordered_map.h (std::unordered_map<>): Fix
1832         _Hash_merge_helper friend declaration.
1833         (std::unordered_multimap<>): Likewise.
1834         * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1835         (std::unordered_multiset<>): Likewise.
1837 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
1839         * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1840         trailing slash for domain level link.
1841         * doc/xml/faq.xml: Ditto.
1842         * doc/xml/manual/appendix_free.xml (software): Ditto.
1843         * doc/xml/manual/intro.xml: Ditto.
1844         * doc/xml/manual/spine.xml: Ditto.
1845         * doc/xml/spine.xml: Ditto.
1847 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
1849         * doc/xml/manual/documentation_hacking.xml: Adjust link to
1850         docbook.org.
1852 2018-03-17  Jonathan Wakely  <jwakely@redhat.com>
1854         * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1855         to compile as C++98.
1857 2018-03-14  Jonathan Wakely  <jwakely@redhat.com>
1859         PR libstdc++/78420
1860         * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1861         (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1862         to ensure total order for pointers.
1863         (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1864         Add operator() overloads for pointer arguments and make generic
1865         overloads dispatch to new _S_cmp functions when comparisons would
1866         use built-in operators for pointers.
1867         * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1869 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
1871         PR libstdc++/84773
1872         PR libstdc++/83662
1873         * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1874         * configure: Regenerate.
1875         * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1876         (aligned_alloc): Add using-declaration.
1877         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1879 2018-03-09  François Dumont  <fdumont@gcc.gnu.org>
1881         * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1882         Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1883         registration.
1885 2018-03-09  Jonathan Wakely  <jwakely@redhat.com>
1887         PR libstdc++/84769
1888         * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1889         Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1891         src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1892         src/filesystem/std-ops.cc (create_dir): Likewise.
1894 2018-03-08  François Dumont  <fdumont@gcc.gnu.org>
1896         * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1897         (StdListIteratorPrinter): Inherit from latter.
1898         (StdFwdListIteratorPrinter): New, inherit from latter.
1899         (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1900         when iterator has no associated container.
1901         (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1902         __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1903         registrations.
1904         * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1905         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1907 2018-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1909         PR libstdc++/84601
1910         * include/std/optional (_Optional_payload): Split into multiple
1911         specializations that can handle different cases of trivial or
1912         non-trivial assignment operators.
1913         * testsuite/20_util/optional/84601.cc: New.
1914         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1916 2018-03-02  Jonathan Wakely  <jwakely@redhat.com>
1918         PR libstdc++/84671
1919         * include/bits/parse_numbers.h (_Number_help): Add partial
1920         specialization to handle digit separators. Adjust partial
1921         specialization for recursion temrination to require _Pow == 1ULL.
1922         * testsuite/20_util/duration/literals/84671.cc: New
1924 2018-02-27  Ville Voutilainen  <ville.voutilainen@gmail.com>
1926         Implement the missing bits of LWG 2769
1927         * include/std/any (any_cast(const any&)): Add static_assert.
1928         (any_cast(any&)): Likewise.
1929         (any_cast(any&&)): Likewise, and remove the handling
1930         for copyable-but-not-movable type.
1931         * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1932         * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1933         add new tests.
1935 2018-02-23  Jonathan Wakely  <jwakely@redhat.com>
1937         PR libstdc++/84532
1938         * include/std/thread (thread::__make_invoker): Construct tuple
1939         directly instead of using make_tuple.
1940         * testsuite/30_threads/async/84532.cc: New.
1941         * testsuite/30_threads/thread/84532.cc: New.
1943 2018-02-20  François Dumont  <fdumont@gcc.gnu.org>
1945         * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1946         (template<> __aligned_buffer): Define as __aligned_membuf alias.
1948 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1950         PR target/84148
1951         * configure: Regenerate.
1953 2018-02-15  Jonathan Wakely  <jwakely@redhat.com>
1955         PR libstdc++/81797
1956         * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1957         * configure: Regenerate.
1958         * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1959         defined.
1960         * include/Makefile.in: Regenerate.
1962 2018-01-29  Jonathan Wakely  <jwakely@redhat.com>
1964         PR libstdc++/83833
1965         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1966         Add -ffloat-store to options for m68k and ia32.
1968         * doc/xml/faq.xml: Update copyright years.
1969         * doc/html/*: Regenerate.
1971         PR libstdc++/83658
1972         * include/std/any (any::__do_emplace): Only set _M_manager after
1973         constructing the contained object.
1974         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1975         * testsuite/20_util/any/modifiers/83658.cc: New test.
1977 2018-01-25  Jonathan Wakely  <jwakely@redhat.com>
1979         PR libstdc++/81076
1980         * include/c_global/cstddef (__byte_operand): Define primary template.
1981         * testsuite/18_support/byte/81076.cc: New test.
1983 2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>
1985         * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1986         dg-options and dg-add-options order.
1987         * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1988         * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1989         Likewise.
1990         * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1991         * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1992         Likewise.
1993         * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1994         Likewise.
1995         * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1996         * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1997         Likewise.
1998         * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1999         Likewise.
2000         * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2001         Likewise.
2002         * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2003         Likewise.
2004         * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2005         Likewise.
2006         * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2007         Likewise.
2008         * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2009         Likewise.
2010         * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2011         Likewise.
2012         * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2013         * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2014         * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2015         * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2016         * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2017         * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2018         * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2019         * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2020         * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2021         Likewise.
2022         * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2023         Likewise.
2024         * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2025         Likewise.
2026         * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2027         Likewise.
2029 2018-01-18  Uros Bizjak  <ubizjak@gmail.com>
2031         * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
2032         include linux/types.h when checking linux/random.h header.
2033         * config.h.in: Regenerate.
2034         * configure: Ditto.
2035         * src/c++11/random.cc: Conditionally include linux/types.h.
2037 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
2039         * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2041 2018-01-16  Jonathan Wakely  <jwakely@redhat.com>
2043         PR libstdc++/83834
2044         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2045         pattern with exact match for std::cerr.
2047 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
2049         PR libstdc++/83833
2050         * include/bits/random.h (chi_squared_distribution::param): Update
2051         gamma distribution parameter.
2052         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2053         test.
2055         PR libstdc++/83830
2056         * include/std/type_traits (has_unique_object_representations_v): Add
2057         variable template.
2058         * testsuite/20_util/has_unique_object_representations/value.cc: Check
2059         variable template.
2061 2018-01-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
2063         Make optional conditionally
2064         trivially_{copy,move}_{constructible,assignable}
2065         * include/std/optional (_Optional_payload): Fix the comment in
2066         the class head and turn into a primary and one specialization.
2067         (_Optional_payload::_M_engaged): Strike the NSDMI.
2068         (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2069         New.
2070         (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2071         Likewise.
2072         (_Optional_payload<_Tp, false>::_M_get): Likewise.
2073         (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2074         (_Optional_base_impl): Likewise.
2075         (_Optional_base): Turn into a primary and three specializations.
2076         (optional(nullopt)): Change the base init.
2077         * testsuite/20_util/optional/assignment/8.cc: New.
2078         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2079         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2081 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
2083         PR libstdc++/80276
2084         * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2085         (get_template_arg_list): New.
2086         (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2087         instead.
2088         (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2089         of strings and regular expressions.
2090         (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2091         (FilteringTypePrinter): Add docstring. Match using startswith. Use
2092         strip_inline_namespaces instead of strip_versioned_namespace.
2093         (add_one_type_printer): Prepend namespace to match argument.
2094         (register_type_printers): Add type printers for char16_t and char32_t
2095         string types and for types using cxx11 ABI. Update calls to
2096         add_one_template_type_printer to provide default argument dicts.
2097         * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2098         * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2099         basic_string<unsigned char> and basic_string<signed char>.
2100         * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2101         to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2103 2018-01-14  Andreas Schwab  <schwab@linux-m68k.org>
2105         PR libstdc++/81092
2106         * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2108 2018-01-13  Tim Shen  <timshen@google.com>
2110         PR libstdc++/83601
2111         * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2112         * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2113         * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2115 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2117         PR libstdc++/64054
2118         * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2119         Remove dg-xfail-run-if.
2121 2018-01-10  François Dumont  <fdumont@gcc.gnu.org>
2123         * include/bits/forward_list.h
2124         (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2125         (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2126         (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2127         (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2128         (_Fwd_list_impl()): Add noexcept qualification.
2129         (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2130         (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2131         (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2132         (_Fwd_list_base()): Default.
2133         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2134         (_Fwd_list_base(_Fwd_list_base&&)): Default.
2135         (forward_list<>()): Default.
2136         (forward_list<>(forward_list&&)): Default.
2137         (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2138         (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2139         (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2140         * include/bits/forward_list.tcc
2141         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2142         _M_impl._M_head move assignment.
2143         (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2144         * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2146 2018-01-09  Jonathan Wakely  <jwakely@redhat.com>
2148         PR libstdc++/80276
2149         * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2150         (UniquePointerPrinter): Print correct template argument, not type of
2151         the pointer.
2152         (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2153         a type.
2154         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2155         array type.
2156         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2157         weak_ptr of array types.
2159 2018-01-09  François Dumont  <fdumont@gcc.gnu.org>
2161         PR libstdc++/83709
2162         * include/bits/hashtable_policy.h
2163         (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2164         __first != __last.
2165         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2166         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2167         Add false_type parameter.
2168         (_Insert_base::insert): Adapt.
2169         * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2170         Adapt.
2171         (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2172          Add __n_elt parameter, defaulted to 1.
2173         (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2174         policy _M_need_rehash.
2175         (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2176         produce only 1 rehash if necessary.
2177         * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2178         * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2180 2018-01-09  Juraj Oršulić  <juraj.orsulic@fer.hr>
2181             Jonathan Wakely  <jwakely@redhat.com>
2183         PR libstdc++/59253 (partial)
2184         * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2185         type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2186         (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2187         children.
2188         * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2189         of unique_ptr printer.
2190         * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2191         output of shared_ptr printer.
2193 2018-01-05  Jonathan Wakely  <jwakely@redhat.com>
2195         PR libstdc++/83626
2196         * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2197         unnecessary symlink_status call.
2198         (remove_all(const path&, error_code&)): Use filesystem::remove.
2199         * src/filesystem/std-ops.cc: Likewise.
2201         PR libstdc++/83279
2202         * src/filesystem/std-ops.cc  (do_copy_file): Use non-null offset with
2203         sendfile.
2205         PR libstdc++/83626
2206         * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2207         report an error for ENOENT.
2208         (remove_all(const path&)): Fix type of result variable.
2209         (remove_all(const path&, error_code&)): Use non-throwing increment
2210         for directory iterator. Call POSIX remove directly to avoid redundant
2211         calls to symlink_status. Do not report errors for ENOENT.
2212         * src/filesystem/std-ops.cc: Likewise.
2213         * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2214         overload.
2215         * testsuite/experimental/filesystem/operations/remove_all.cc:
2216         Likewise.
2218 2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
2220         PR libstdc++/83626
2221         * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2222         redundant call to ec.clear().
2223         (remove_all(const path&, error_code&))): Do not return an error for
2224         non-existent paths.
2225         * src/filesystem/std-ops.cc: Likewise.
2226         * testsuite/27_io/filesystem/operations/remove.cc: New test.
2227         * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2228         results for non-existent paths.
2229         * testsuite/experimental/filesystem/operations/remove.cc: New test.
2230         * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2231         expected results for non-existent paths.
2233         * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2234         check status_known once.
2235         * include/experimental/bits/fs_ops.h: Likewise.
2237         PR libstdc++/83607
2238         * include/std/functional (__is_byte_like): New trait.
2239         (__is_std_equal_to): Remove.
2240         (__boyer_moore_base_t): Use __is_byte_like instead of
2241         __is_std_equal_to.
2242         * include/experimental/functional (__is_std_equal_to): Remove.
2243         (__boyer_moore_base_t): Use __is_byte_like instead of
2244         __is_std_equal_to.
2245         * testsuite/20_util/function_objects/83607.cc: New test.
2247 2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
2249         Protect optional's deduction guide with the feature macro
2250         * include/std/optional: Use the feature macro.
2252 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2254         Update copyright years.
2256 Copyright (C) 2018 Free Software Foundation, Inc.
2258 Copying and distribution of this file, with or without modification,
2259 are permitted in any medium without royalty provided the copyright
2260 notice and this notice are preserved.