Make optional conditionally trivially_{copy,move}_{constructible,assignable}
[gcc.git] / libstdc++-v3 / ChangeLog
1 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
2
3 Make optional conditionally
4 trivially_{copy,move}_{constructible,assignable}
5 * include/std/optional (_Optional_payload): Fix the comment in
6 the class head and turn into a primary and one specialization.
7 (_Optional_payload::_M_engaged): Strike the NSDMI.
8 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
9 New.
10 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
11 Likewise.
12 (_Optional_payload<_Tp, false>::_M_get): Likewise.
13 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
14 (_Optional_base_impl): Likewise.
15 (_Optional_base): Turn into a primary and three specializations.
16 (optional(nullopt)): Change the base init.
17 * testsuite/20_util/optional/assignment/8.cc: New.
18 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
19 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
20
21 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
22
23 PR libstdc++/80276
24 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
25 (get_template_arg_list): New.
26 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
27 instead.
28 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
29 of strings and regular expressions.
30 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
31 (FilteringTypePrinter): Add docstring. Match using startswith. Use
32 strip_inline_namespaces instead of strip_versioned_namespace.
33 (add_one_type_printer): Prepend namespace to match argument.
34 (register_type_printers): Add type printers for char16_t and char32_t
35 string types and for types using cxx11 ABI. Update calls to
36 add_one_template_type_printer to provide default argument dicts.
37 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
38 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
39 basic_string<unsigned char> and basic_string<signed char>.
40 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
41 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
42
43 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
44
45 PR libstdc++/81092
46 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
47
48 2018-01-13 Tim Shen <timshen@google.com>
49
50 PR libstdc++/83601
51 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
52 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
53 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
54
55 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
56
57 PR libstdc++/64054
58 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
59 Remove dg-xfail-run-if.
60
61 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
62
63 * include/bits/forward_list.h
64 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
65 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
66 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
67 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
68 (_Fwd_list_impl()): Add noexcept qualification.
69 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
70 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
71 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
72 (_Fwd_list_base()): Default.
73 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
74 (_Fwd_list_base(_Fwd_list_base&&)): Default.
75 (forward_list<>()): Default.
76 (forward_list<>(forward_list&&)): Default.
77 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
78 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
79 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
80 * include/bits/forward_list.tcc
81 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
82 _M_impl._M_head move assignment.
83 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
84 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
85
86 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
87
88 PR libstdc++/80276
89 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
90 (UniquePointerPrinter): Print correct template argument, not type of
91 the pointer.
92 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
93 a type.
94 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
95 array type.
96 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
97 weak_ptr of array types.
98
99 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
100
101 PR libstdc++/83709
102 * include/bits/hashtable_policy.h
103 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
104 __first != __last.
105 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
106 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
107 Add false_type parameter.
108 (_Insert_base::insert): Adapt.
109 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
110 Adapt.
111 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
112 Add __n_elt parameter, defaulted to 1.
113 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
114 policy _M_need_rehash.
115 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
116 produce only 1 rehash if necessary.
117 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
118 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
119
120 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
121 Jonathan Wakely <jwakely@redhat.com>
122
123 PR libstdc++/59253 (partial)
124 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
125 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
126 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
127 children.
128 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
129 of unique_ptr printer.
130 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
131 output of shared_ptr printer.
132
133 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
134
135 PR libstdc++/83626
136 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
137 unnecessary symlink_status call.
138 (remove_all(const path&, error_code&)): Use filesystem::remove.
139 * src/filesystem/std-ops.cc: Likewise.
140
141 PR libstdc++/83279
142 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
143 sendfile.
144
145 PR libstdc++/83626
146 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
147 report an error for ENOENT.
148 (remove_all(const path&)): Fix type of result variable.
149 (remove_all(const path&, error_code&)): Use non-throwing increment
150 for directory iterator. Call POSIX remove directly to avoid redundant
151 calls to symlink_status. Do not report errors for ENOENT.
152 * src/filesystem/std-ops.cc: Likewise.
153 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
154 overload.
155 * testsuite/experimental/filesystem/operations/remove_all.cc:
156 Likewise.
157
158 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
159
160 PR libstdc++/83626
161 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
162 redundant call to ec.clear().
163 (remove_all(const path&, error_code&))): Do not return an error for
164 non-existent paths.
165 * src/filesystem/std-ops.cc: Likewise.
166 * testsuite/27_io/filesystem/operations/remove.cc: New test.
167 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
168 results for non-existent paths.
169 * testsuite/experimental/filesystem/operations/remove.cc: New test.
170 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
171 expected results for non-existent paths.
172
173 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
174 check status_known once.
175 * include/experimental/bits/fs_ops.h: Likewise.
176
177 PR libstdc++/83607
178 * include/std/functional (__is_byte_like): New trait.
179 (__is_std_equal_to): Remove.
180 (__boyer_moore_base_t): Use __is_byte_like instead of
181 __is_std_equal_to.
182 * include/experimental/functional (__is_std_equal_to): Remove.
183 (__boyer_moore_base_t): Use __is_byte_like instead of
184 __is_std_equal_to.
185 * testsuite/20_util/function_objects/83607.cc: New test.
186
187 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
188
189 Protect optional's deduction guide with the feature macro
190 * include/std/optional: Use the feature macro.
191
192 2018-01-03 Jakub Jelinek <jakub@redhat.com>
193
194 Update copyright years.
195 \f
196 Copyright (C) 2018 Free Software Foundation, Inc.
197
198 Copying and distribution of this file, with or without modification,
199 are permitted in any medium without royalty provided the copyright
200 notice and this notice are preserved.