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