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