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