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