2018-03-09 François Dumont <fdumont@gcc.gnu.org>
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob7db7e819979fd2d8b03e8b0673385aafd3b2df38
1 2018-03-09  François Dumont  <fdumont@gcc.gnu.org>
3         * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
4         Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
5         registration.
7 2018-03-09  Jonathan Wakely  <jwakely@redhat.com>
9         PR libstdc++/84769
10         * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
11         Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
13         src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
14         src/filesystem/std-ops.cc (create_dir): Likewise.
16 2018-03-08  François Dumont  <fdumont@gcc.gnu.org>
18         * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
19         (StdListIteratorPrinter): Inherit from latter.
20         (StdFwdListIteratorPrinter): New, inherit from latter.
21         (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
22         when iterator has no associated container.
23         (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
24         __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
25         registrations.
26         * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
27         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
29 2018-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
31         PR libstdc++/84601
32         * include/std/optional (_Optional_payload): Split into multiple
33         specializations that can handle different cases of trivial or
34         non-trivial assignment operators.
35         * testsuite/20_util/optional/84601.cc: New.
36         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
38 2018-03-02  Jonathan Wakely  <jwakely@redhat.com>
40         PR libstdc++/84671
41         * include/bits/parse_numbers.h (_Number_help): Add partial
42         specialization to handle digit separators. Adjust partial
43         specialization for recursion temrination to require _Pow == 1ULL.
44         * testsuite/20_util/duration/literals/84671.cc: New
46 2018-02-27  Ville Voutilainen  <ville.voutilainen@gmail.com>
48         Implement the missing bits of LWG 2769
49         * include/std/any (any_cast(const any&)): Add static_assert.
50         (any_cast(any&)): Likewise.
51         (any_cast(any&&)): Likewise, and remove the handling
52         for copyable-but-not-movable type.
53         * testsuite/20_util/any/misc/any_cast.cc: Adjust.
54         * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
55         add new tests.
57 2018-02-23  Jonathan Wakely  <jwakely@redhat.com>
59         PR libstdc++/84532
60         * include/std/thread (thread::__make_invoker): Construct tuple
61         directly instead of using make_tuple.
62         * testsuite/30_threads/async/84532.cc: New.
63         * testsuite/30_threads/thread/84532.cc: New.
65 2018-02-20  François Dumont  <fdumont@gcc.gnu.org>
67         * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
68         (template<> __aligned_buffer): Define as __aligned_membuf alias.
70 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
72         PR target/84148
73         * configure: Regenerate.
75 2018-02-15  Jonathan Wakely  <jwakely@redhat.com>
77         PR libstdc++/81797
78         * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
79         * configure: Regenerate.
80         * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
81         defined.
82         * include/Makefile.in: Regenerate.
84 2018-01-29  Jonathan Wakely  <jwakely@redhat.com>
86         PR libstdc++/83833
87         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
88         Add -ffloat-store to options for m68k and ia32.
90         * doc/xml/faq.xml: Update copyright years.
91         * doc/html/*: Regenerate.
93         PR libstdc++/83658
94         * include/std/any (any::__do_emplace): Only set _M_manager after
95         constructing the contained object.
96         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
97         * testsuite/20_util/any/modifiers/83658.cc: New test.
99 2018-01-25  Jonathan Wakely  <jwakely@redhat.com>
101         PR libstdc++/81076
102         * include/c_global/cstddef (__byte_operand): Define primary template.
103         * testsuite/18_support/byte/81076.cc: New test.
105 2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>
107         * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
108         dg-options and dg-add-options order.
109         * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
110         * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
111         Likewise.
112         * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
113         * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
114         Likewise.
115         * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
116         Likewise.
117         * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
118         * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
119         Likewise.
120         * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
121         Likewise.
122         * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
123         Likewise.
124         * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
125         Likewise.
126         * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
127         Likewise.
128         * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
129         Likewise.
130         * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
131         Likewise.
132         * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
133         Likewise.
134         * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
135         * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
136         * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
137         * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
138         * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
139         * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
140         * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
141         * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
142         * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
143         Likewise.
144         * testsuite/special_functions/19_sph_bessel/check_nan.cc:
145         Likewise.
146         * testsuite/special_functions/20_sph_legendre/check_nan.cc:
147         Likewise.
148         * testsuite/special_functions/21_sph_neumann/check_nan.cc:
149         Likewise.
151 2018-01-18  Uros Bizjak  <ubizjak@gmail.com>
153         * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
154         include linux/types.h when checking linux/random.h header.
155         * config.h.in: Regenerate.
156         * configure: Ditto.
157         * src/c++11/random.cc: Conditionally include linux/types.h.
159 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
161         * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
163 2018-01-16  Jonathan Wakely  <jwakely@redhat.com>
165         PR libstdc++/83834
166         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
167         pattern with exact match for std::cerr.
169 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
171         PR libstdc++/83833
172         * include/bits/random.h (chi_squared_distribution::param): Update
173         gamma distribution parameter.
174         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
175         test.
177         PR libstdc++/83830
178         * include/std/type_traits (has_unique_object_representations_v): Add
179         variable template.
180         * testsuite/20_util/has_unique_object_representations/value.cc: Check
181         variable template.
183 2018-01-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
185         Make optional conditionally
186         trivially_{copy,move}_{constructible,assignable}
187         * include/std/optional (_Optional_payload): Fix the comment in
188         the class head and turn into a primary and one specialization.
189         (_Optional_payload::_M_engaged): Strike the NSDMI.
190         (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
191         New.
192         (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
193         Likewise.
194         (_Optional_payload<_Tp, false>::_M_get): Likewise.
195         (_Optional_payload<_Tp, false>::_M_reset): Likewise.
196         (_Optional_base_impl): Likewise.
197         (_Optional_base): Turn into a primary and three specializations.
198         (optional(nullopt)): Change the base init.
199         * testsuite/20_util/optional/assignment/8.cc: New.
200         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
201         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
203 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
205         PR libstdc++/80276
206         * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
207         (get_template_arg_list): New.
208         (StdVariantPrinter._template_args): Remove, use get_template_arg_list
209         instead.
210         (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
211         of strings and regular expressions.
212         (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
213         (FilteringTypePrinter): Add docstring. Match using startswith. Use
214         strip_inline_namespaces instead of strip_versioned_namespace.
215         (add_one_type_printer): Prepend namespace to match argument.
216         (register_type_printers): Add type printers for char16_t and char32_t
217         string types and for types using cxx11 ABI. Update calls to
218         add_one_template_type_printer to provide default argument dicts.
219         * testsuite/libstdc++-prettyprinters/80276.cc: New test.
220         * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
221         basic_string<unsigned char> and basic_string<signed char>.
222         * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
223         to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
225 2018-01-14  Andreas Schwab  <schwab@linux-m68k.org>
227         PR libstdc++/81092
228         * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
230 2018-01-13  Tim Shen  <timshen@google.com>
232         PR libstdc++/83601
233         * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
234         * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
235         * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
237 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
239         PR libstdc++/64054
240         * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
241         Remove dg-xfail-run-if.
243 2018-01-10  François Dumont  <fdumont@gcc.gnu.org>
245         * include/bits/forward_list.h
246         (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
247         (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
248         (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
249         (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
250         (_Fwd_list_impl()): Add noexcept qualification.
251         (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
252         (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
253         (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
254         (_Fwd_list_base()): Default.
255         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
256         (_Fwd_list_base(_Fwd_list_base&&)): Default.
257         (forward_list<>()): Default.
258         (forward_list<>(forward_list&&)): Default.
259         (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
260         (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
261         (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
262         * include/bits/forward_list.tcc
263         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
264         _M_impl._M_head move assignment.
265         (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
266         * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
268 2018-01-09  Jonathan Wakely  <jwakely@redhat.com>
270         PR libstdc++/80276
271         * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
272         (UniquePointerPrinter): Print correct template argument, not type of
273         the pointer.
274         (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
275         a type.
276         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
277         array type.
278         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
279         weak_ptr of array types.
281 2018-01-09  François Dumont  <fdumont@gcc.gnu.org>
283         PR libstdc++/83709
284         * include/bits/hashtable_policy.h
285         (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
286         __first != __last.
287         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
288         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
289         Add false_type parameter.
290         (_Insert_base::insert): Adapt.
291         * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
292         Adapt.
293         (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
294          Add __n_elt parameter, defaulted to 1.
295         (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
296         policy _M_need_rehash.
297         (_Hashtable::_M_merge_unique): Pass target number of elements to add to
298         produce only 1 rehash if necessary.
299         * testsuite/23_containers/unordered_map/insert/83709.cc: New.
300         * testsuite/23_containers/unordered_set/insert/83709.cc: New.
302 2018-01-09  Juraj Oršulić  <juraj.orsulic@fer.hr>
303             Jonathan Wakely  <jwakely@redhat.com>
305         PR libstdc++/59253 (partial)
306         * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
307         type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
308         (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
309         children.
310         * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
311         of unique_ptr printer.
312         * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
313         output of shared_ptr printer.
315 2018-01-05  Jonathan Wakely  <jwakely@redhat.com>
317         PR libstdc++/83626
318         * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
319         unnecessary symlink_status call.
320         (remove_all(const path&, error_code&)): Use filesystem::remove.
321         * src/filesystem/std-ops.cc: Likewise.
323         PR libstdc++/83279
324         * src/filesystem/std-ops.cc  (do_copy_file): Use non-null offset with
325         sendfile.
327         PR libstdc++/83626
328         * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
329         report an error for ENOENT.
330         (remove_all(const path&)): Fix type of result variable.
331         (remove_all(const path&, error_code&)): Use non-throwing increment
332         for directory iterator. Call POSIX remove directly to avoid redundant
333         calls to symlink_status. Do not report errors for ENOENT.
334         * src/filesystem/std-ops.cc: Likewise.
335         * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
336         overload.
337         * testsuite/experimental/filesystem/operations/remove_all.cc:
338         Likewise.
340 2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
342         PR libstdc++/83626
343         * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
344         redundant call to ec.clear().
345         (remove_all(const path&, error_code&))): Do not return an error for
346         non-existent paths.
347         * src/filesystem/std-ops.cc: Likewise.
348         * testsuite/27_io/filesystem/operations/remove.cc: New test.
349         * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
350         results for non-existent paths.
351         * testsuite/experimental/filesystem/operations/remove.cc: New test.
352         * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
353         expected results for non-existent paths.
355         * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
356         check status_known once.
357         * include/experimental/bits/fs_ops.h: Likewise.
359         PR libstdc++/83607
360         * include/std/functional (__is_byte_like): New trait.
361         (__is_std_equal_to): Remove.
362         (__boyer_moore_base_t): Use __is_byte_like instead of
363         __is_std_equal_to.
364         * include/experimental/functional (__is_std_equal_to): Remove.
365         (__boyer_moore_base_t): Use __is_byte_like instead of
366         __is_std_equal_to.
367         * testsuite/20_util/function_objects/83607.cc: New test.
369 2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
371         Protect optional's deduction guide with the feature macro
372         * include/std/optional: Use the feature macro.
374 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
376         Update copyright years.
378 Copyright (C) 2018 Free Software Foundation, Inc.
380 Copying and distribution of this file, with or without modification,
381 are permitted in any medium without royalty provided the copyright
382 notice and this notice are preserved.