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