1 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
3 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
4 missed from recent commit.
6 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
8 * include/std/utility: Remove unused <exception> header.
10 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
12 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
13 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
14 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
15 a specialization of std::pair.
16 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
17 pair elements are constructed correctly.
19 LWG 2989 hide path iostream operators from normal lookup
20 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
22 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
24 LWG 3050 Fix cv-qualification of convertibility constraints
25 * include/std/chrono (duration, operator*, operator/, operator%): Use
26 const-qualified type as source type in is_convertible constraints.
27 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
28 * testsuite/20_util/duration/cons/dr3050.cc: New.
29 * testsuite/20_util/duration/literals/range.cc: Rename to...
30 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
33 2018-06-18 Maya Rashish <coypu@sdf.org>
35 * crossconfig.m4: Handle OpenBSD just like NetBSD.
38 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
40 P0754R2 <version> header
41 * include/Makefile.am: Add new header.
42 * include/Makefile.in: Regenerate.
43 * include/bits/c++config: Change doxygen comment to suggest <version>
45 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
46 unconditionally. Add C++17 and C++20 headers.
47 * include/std/version: New header.
48 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
49 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
50 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
51 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
52 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
53 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
54 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
56 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
57 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
58 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
59 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
60 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
61 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
62 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
64 * testsuite/18_support/headers/version/macros.cc: New.
65 * testsuite/18_support/headers/version/macros.cc: New.
67 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
68 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
70 * config.h.in: Regenerate.
71 * configure: Regenerate.
72 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
74 LWG 3035. std::allocator's constructors should be constexpr
75 * include/bits/allocator.h (allocator): Add constexpr to constructors
76 for C++2a. Replace dynamic exception specifications with NOTHROW
78 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
80 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
81 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
82 to constructors for C++2a.
83 * include/ext/new_allocator.h (new_allocator): Likewise.
85 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
87 LWG 3076 basic_string CTAD ambiguity
88 * doc/xml/manual/intro.xml: Document LWG 3076 change.
89 * include/bits/basic_string.h
90 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
91 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
92 template constrained by _RequireAllocator.
93 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
94 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
96 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
98 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
101 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
104 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
105 (basic_string::data()): Unshare string.
106 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
109 * include/std/string_view (basic_string_view(const CharT*)): Remove
110 check for null pointer and add nonnull attribute.
111 (compare(const CharT*), compare(size_type, size_type, const CharT*))
112 (find(const CharT*, size_type), rfind(const CharT*, size_type))
113 (find_first_of(const CharT*, size_type))
114 (find_last_of(const CharT*, size_type))
115 (find_first_not_of(const CharT*, size_type))
116 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
117 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
118 * testsuite/21_strings/basic_string_view/operations/compare/char/
120 * testsuite/21_strings/basic_string_view/operations/find/char/
122 * testsuite/21_strings/basic_string_view/operations/rfind/char/
126 * include/bits/random.h (random_device(const string&)): Remove
129 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
130 define for C++17 and above.
132 LWG 2993 reference_wrapper<T> conversion from T&&
133 * doc/xml/manual/intro.xml: Document LWG 2993 change.
134 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
135 (reference_wrapper(_Tp&&)): Remove.
136 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
138 (reference_wrapper): Add deduction guide.
139 * testsuite/20_util/reference_wrapper/deduction.cc: New.
140 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
142 LWG 3039 Unnecessary decay in thread and packaged_task
143 * include/std/future (__constrain_pkgdtask): Replace with ...
144 (packaged_task::__not_same): New alias template, using
145 __remove_cvref_t instead of decay.
146 * include/std/thread (thread::__not_same): Add comment.
148 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
150 LWG 3075 basic_string needs deduction guides from basic_string_view
151 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
152 deduction from string views.
153 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
156 LWG 3074 make scalar types non-deduced in valarray non-member functions
157 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
158 scalar parameters to be a non-deduced context.
159 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
161 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
162 * testsuite/26_numerics/valarray/transcend.cc: New.
164 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
165 Move back to <utility>.
166 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
169 P0935R0 Eradicating unnecessarily explicit default constructors
170 * include/backward/strstream (strstreambuf): Add non-explicit default
172 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
174 * include/bits/regex.h (match_results): Likewise.
175 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
177 * testsuite/22_locale/conversions/string/1.cc: Likewise.
178 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
179 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
181 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
182 macro from <utility> and change type to long.
183 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
184 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
187 P0935R0 Eradicating unnecessarily explicit default constructors
188 * include/bits/random.h (uniform_real_distribution::param_type)
189 (normal_distribution::param_type, lognormal_distribution::param_type)
190 (gamma_distribution::param_type, chi_squared_distribution::param_type)
191 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
192 (student_t_distribution::param_type)
193 (bernoulli_distribution::param_type)
194 (binomial_distribution::param_type)
195 (geometric_distribution::param_type)
196 (negative_binomial_distribution::param_type)
197 (poisson_distribution::param_type)
198 (exponential_distribution::param_type)
199 (weibull_distribution::param_type)
200 (extreme_value_distribution::param_type): Add non-explicit default
201 constructors. Remove default argument for first parameter of explicit
203 * include/bits/uniform_int_dist.h
204 (uniform_int_distribution::param_type): Likewise.
206 (beta_distribution::param_type, rice_distribution::param_type)
207 (nakagami_distribution::param_type, pareto_distribution::param_type)
208 (k_distribution::param_type, arcsine_distribution::param_type)
209 (hoyt_distribution::param_type, triangular_distribution::param_type)
210 (von_mises_distribution::param_type)
211 (hypergeometric_distribution::param_type)
212 (logistic_distribution::param_type)
213 (uniform_inside_sphere_distribution::param_type): Likewise.
214 (uniform_on_sphere_distribution::param_type): Make default constructor
216 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
217 Test param_type for non-explicit default constructor.
218 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
220 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
222 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
224 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
226 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
228 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
230 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
232 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
234 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
236 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
238 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
240 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
242 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
244 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
246 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
248 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
250 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
252 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
254 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
256 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
257 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
258 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
259 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
261 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
262 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
263 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
264 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
266 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
267 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
268 * testsuite/ext/random/triangular_distribution/cons/default.cc:
270 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
272 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
274 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
277 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
278 Jonathan Wakely <jwakely@redhat.com>
281 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
282 Default-construct new elements before moving existing ones.
283 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
286 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
289 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
291 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
292 Use node allocator to create and destroy elements.
293 (forward_list::_Tp_alloc_type): Remove unused typedef.
294 (forward_list::_Alloc_traits): Use allocator_traits instead of
295 __gnu_cxx::__alloc_traits.
297 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
299 * include/debug/helper_functions.h
300 (__gnu_debug::_Safe_iterator<>): Add declaration.
301 (__can_advance(_Ite, _Size)): New.
302 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
303 * include/debug/functions.h
304 (__gnu_debug::_Safe_iterator<>): Remove declaration.
305 * include/debug/stl_iterator.h
306 (__can_advance(const _Safe_iterator<>&)): New definition.
307 * include/debug/stl_iterator.h
308 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
309 (__can_advance(const std::move_iterator<>&, _Size)): New.
310 * include/debug/macros.h (__glibcxx_check_can_increment): New.
311 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
312 * include/bits/stl_algobase.h (fill_n): Use latter.
313 * testsuite/25_algorithms/fill_n/2.cc: New.
314 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
315 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
316 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
317 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
319 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
320 (__glibcxx_requires_can_decrement_range): New.
322 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
324 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
325 (__glibcxx_check_can_decrement_range): New.
326 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
327 __glibcxx_requires_can_increment_range.
328 (std::move(_II, _II, _OI)): Likewise.
329 (std::copy_backward(_BI, _BI, _BI2)): Use
330 __glibcxx_requires_can_decrement_range.
331 (std::move_backward(_BI, _BI, _BI2)): Likewise.
332 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
333 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
334 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
335 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
336 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
337 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
339 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
341 P0935R0 Eradicating unnecessarily explicit default constructors
342 * include/bits/random.h (linear_congruential_engine)
343 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
344 (uniform_real_distribution, normal_distribution)
345 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
346 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
347 (bernoulli_distribution, binomial_distribution,geometric_distribution)
348 (negative_binomial_distribution, exponential_distribution)
349 (weibull_distribution, extreme_value_distribution): Add non-explicit
350 default constructors. Remove default argument for first parameter of
351 explicit constructors.
352 (piecewise_constant_distribution, piecewise_linear_distribution):
353 Make default constructor non-explicit.
354 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
355 non-explicit default constructors. Remove default argument for first
356 parameter of explicit constructor.
358 (simd_fast_mersenne_twister_engine, beta_distribution)
359 (rice_distribution, nakagami_distribution, pareto_distribution)
360 (k_distribution, arcsine_distribution, hoyt_distribution)
361 (triangular_distribution, von_mises_distribution)
362 (hypergeometric_distribution, logistic_distribution)
363 (uniform_inside_sphere_distribution): Likewise.
364 (uniform_on_sphere_distribution): Make default constructor
366 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
367 Test for non-explicit default constructor. Fix references to standard.
368 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
370 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
372 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
374 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
376 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
378 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
380 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
382 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
384 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
386 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
388 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
390 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
392 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
394 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
396 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
398 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
400 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
402 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
404 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
406 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
407 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
408 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
409 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
411 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
412 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
413 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
414 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
416 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
417 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
418 * testsuite/ext/random/triangular_distribution/cons/default.cc:
420 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
422 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
424 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
426 * testsuite/util/testsuite_common_types.h
427 (implicitly_default_constructible): New helper.
429 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
431 * include/bits/ios_base.h (ios::Init::Init(const Init&))
432 (ios::Init::operator=): Define as defaulted.
433 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
435 * include/bits/stream_iterator.h (istream_iterator::operator=)
436 (ostream_iterator::operator=): Likewise.
437 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
439 * include/std/bitset (bitset::reference::reference(const reference&)):
441 * include/std/complex (complex<float>::complex(const complex&))
442 (complex<double>::complex(const complex&))
443 (complex<long double>::complex(const complex&)): Likewise.
445 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
447 * include/bits/regex.h (sub_match): Add noexcept to default
448 constructor and length observer.
449 (match_results): Add noexcept to default constructor and observers
450 with no preconditions. Define destructor as defaulted.
451 (operator==, operator!=, swap): Add noexcept.
452 (regex_iterator): Add default member initializers and define default
453 constructor and destructor as defaulted. Add noexcept to equality
454 and dereference operators.
456 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
459 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
460 (_Safe_iterator_base::_M_detach_single()): Likewise.
461 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
462 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
464 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
466 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
469 2018-06-06 Jakub Jelinek <jakub@redhat.com>
472 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
473 rather than __cpp_transactional_memory >= 201505L.
475 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
478 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
479 Define new partial specialization.
480 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
482 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
483 value not reference for iteration.
484 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
486 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
487 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
490 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
492 * include/std/type_traits: Fix comment typos.
494 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
496 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
497 * testsuite/experimental/filesystem/operations/read_symlink.cc:
500 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
502 * include/bits/stl_tempbuf.h
503 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
504 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
505 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
506 * include/bits/stl_algo.h (__stable_partition): Adapt.
507 (__inplace_merge): Adapt.
508 (__stable_sort): Adapt.
510 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
513 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
514 unconditionally. Remove redundant declaration.
515 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
518 * include/bits/postypes.h (fpos): Define special members as defaulted.
521 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
522 the static variable correctly.
524 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
526 PR libstdc++/78870 support std::filesystem on Windows
527 * config.h.in: Regenerate.
528 * configure: Regenerate.
529 * configure.ac: Check for link, readlink and symlink.
530 * include/bits/fs_path.h (path::operator/=(const path&)): Move
531 definition out of class body.
532 (path::is_absolute(), path::_M_append(path)): Likewise.
533 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
534 (operator>>(basic_istream, path&)): Likewise.
535 (u8path): Reorder definitions and fix Windows implementation.
536 (path::is_absolute()): Define inline and fix for Windows.
537 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
538 Define POSIX version inline.
539 (path::_M_append(path)): Define inline.
540 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
541 definition out of class body.
542 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
544 (operator>>(basic_istream, path&)): Likewise.
545 (path::is_absolute()): Define inline and fix for Windows.
546 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
547 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
548 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
549 Define as adaptors for Windows functions/types or as
550 using-declarations for POSIX functions/types.
551 (_Dir_base, get_file_type): Qualify names to use declarations from
552 __gnu_posix namespace.
553 (_Dir_base::is_dor_or_dotdot): New helper functions.
554 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
555 names to use declarations from __gnu_posix namespace.
556 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
557 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
558 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
559 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
560 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
561 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
562 Define as adaptors for Windows functions/types or as
563 using-declarations for POSIX functions/types.
564 (stat_type, do_copy_file): Qualify names to use declarations from
565 __gnu_posix namespace.
566 (do_space): Declare new function.
567 (make_file_type): Only use S_ISLNK if defined.
568 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
569 path::value_type not char.
570 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
571 names to use declarations from __gnu_posix namespace.
572 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
573 add implementation for Windows.
574 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
575 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
576 [!_PC_PATH_MAX]: Don't use pathconf.
577 [PATH_MAX]: Use if defined.
578 (filesystem::current_path(const path&, error_code&))
579 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
580 (filesystem::last_write_time, filesystem::permissions): Use names
582 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
583 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
584 implementation for Windows.
585 (filesystem::rename, filesystem::resize_file): Use names from
587 (filesystem::space): Use do_space.
588 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
589 (filesystem::status, filesystem::symlink_status): Use names from
591 (filesystem::temp_directory_path): Add implementation for Windows.
592 * src/filesystem/path.cc (dot): Define constant.
593 (path::replace_extension): Use dot.
594 (path::_M_find_extension): Likewise. Use path::string_type not
596 (path::_M_split_cmpts): Use dot.
597 (filesystem_error::_M_get_what): Use u8string() not native().
598 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
599 Qualify names to use declarations from __gnu_posix namespace.
600 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
602 (filesystem::absolute(const path&, error_code&)): Add implementation
604 (char_ptr, filesystem::canonical): Use path::value_type not char.
605 (do_copy_file): Use names from __gnu_posix.
606 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
608 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
609 names to use declarations from __gnu_posix namespace.
610 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
611 add implementation for Windows.
612 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
613 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
614 [!_PC_PATH_MAX]: Don't use pathconf.
615 [PATH_MAX]: Use if defined.
616 (filesystem::current_path(const path&, error_code&))
617 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
618 (filesystem::last_write_time, filesystem::permissions): Use names
620 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
621 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
622 implementation for Windows.
623 (filesystem::rename, filesystem::resize_file): Use names from
626 (filesystem::space): Use do_space.
627 (filesystem::status, filesystem::symlink_status): Use names from
629 (filesystem::temp_directory_path): Add implementation for Windows.
630 * src/filesystem/std-path.cc
631 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
633 (dot): Define constant.
634 (path::replace_extension, is_dot): Use dot.
635 (path::lexically_normal): Check _M_type instead of calling
636 non-existent function.
637 (path::_M_find_extension): Use dot. Use path::string_type not
639 (path::_M_split_cmpts): Use dot.
640 (filesystem_error::_M_get_what): Use u8string() not native().
641 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
643 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
645 * testsuite/27_io/filesystem/operations/absolute.cc: Use
646 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
647 * testsuite/27_io/filesystem/operations/canonical.cc: Use
648 path::string() to get narrow string, not path::native().
649 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
650 with std::filesystem::path not std::basic_string.
651 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
652 * testsuite/27_io/filesystem/operations/exists.cc: Use
653 __gnu_test::root_path() instead of "/".
654 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
655 fstreams with std::filesystem::path not std::basic_string.
656 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
657 path::string() to get narrow string.
658 * testsuite/27_io/filesystem/operations/space.cc: Check results for
659 errors, expect sensible values otherwise.
660 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
661 helpers for adjusting the environment on Windows.
662 * testsuite/27_io/filesystem/path/append/path.cc: Test
663 Windows-specific behaviour.
664 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
665 of path::string_type objects.
666 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
667 string to wide string on Windows.
668 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
669 for backslash as root-directory.
670 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
671 path::string() to get narrow string.
672 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
674 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
676 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
677 different definintion of absolute paths on Windows.
678 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
680 * testsuite/experimental/filesystem/operations/absolute.cc: Test
682 * testsuite/experimental/filesystem/operations/copy.cc: Construct
683 fstreams with NTCTS not std::basic_string.
684 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
685 * testsuite/experimental/filesystem/operations/exists.cc: Use
686 __gnu_test::root_path() instead of "/".
687 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
688 fstreams with NTCTS not std::basic_string.
689 * testsuite/experimental/filesystem/operations/last_write_time.cc:
690 Use path::string() to get narrow string.
691 * testsuite/experimental/filesystem/operations/space.cc: Use
692 __gnu_test::root_path() instead of "/".
693 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
694 Add helpers for adjusting the environment on Windows.
695 * testsuite/experimental/filesystem/path/append/path.cc: Use
696 path::string() to get narrow strings for comparisons.
697 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
698 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
700 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
701 * testsuite/experimental/filesystem/path/native/string.cc: Use
702 string_type not std::string.
703 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
704 Adjust for different definintion of absolute paths on Windows.
705 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
707 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
710 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
713 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
714 uint_least16_t and uint_least32_t.
715 (__make_unsigned<wchar_t>): Define unconditionally.
716 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
718 (__make_unsigned_selector_base): New type to provide helper templates.
719 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
720 __make_unsigned_selector_base helpers.
721 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
722 (__make_signed_selector<_Tp, true, false>): Remove intermediate
724 (__make_signed<wchar_t>, __make_signed<char16_t>)
725 (__make_signed<char32_t>)): Define unconditionally.
726 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
727 wchar_t, char16_t and char32_t are transformed correctly.
728 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
730 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
731 wchar_t, char16_t and char32_t are transformed correctly.
732 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
735 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
737 * include/std/variant (__erased_dtor): Qualify call to __get.
739 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
741 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
742 (_Rb_tree(const allocator_type&)): Use latter.
743 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
744 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
745 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
746 * include/bits/stl_multimap.h
747 (multimap(const allocator_type&)): Likewise.
748 (multimap(initializer_list<value_type>, const allocator_type&)):
750 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
752 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
753 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
754 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
755 * include/bits/stl_multiset.h
756 (multiset(const allocator_type&)): Likewise.
757 (multiset(initializer_list<value_type>, const allocator_type&)):
759 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
762 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
765 * src/c++11/debug.cc: Remove backtrace usage.
767 2018-05-24 Maya Rashish <coypu@sdf.org>
770 * crossconfig.m4: Test for aligned_alloc on netbsd.
771 * configure: Regenerate.
773 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
777 * include/bits/atomic_base.h (__atomic_base::value_type)
778 (__atomic_base::difference_type): Add new typedefs.
779 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
780 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
781 (atomic<T*>::operator++, atomic<T*>::operator--)
782 (atomic<T*>::operator+=, atomic<T*>::operator-=)
783 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
784 to enforce C++17 requirement on pointer arithmetic.
785 (__atomic_val_t, __atomic_diff_t): New alias templates.
786 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
787 (atomic_compare_exchange_weak_explicit)
788 (atomic_compare_exchange_strong_explicit, atomic_store)
789 (atomic_exchange, atomic_compare_exchange_weak)
790 (atomic_compare_exchange_strong): Use __atomic_val_t to make
791 scalar parameters be non-deduced contexts.
792 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
793 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
794 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
796 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
797 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
798 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
799 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
800 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
802 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
803 * testsuite/29_atomics/atomic/69769.cc: New test.
804 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
805 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
806 Disable test for C++17 and later.
807 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
808 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
809 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
812 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
814 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
815 template to alias template.
816 (path::__value_type_is_char): Use remove_const_t.
817 (path:_S_string_from_iter): New helper function.
818 (path::_S_convert(InputIter, __null_terminated))
819 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
820 Use _S_string_from_iter.
821 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
823 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
824 Change from class template to alias template.
825 (path::__value_type_is_char): Use remove_const.
826 (path:_S_string_from_iter): New helper function.
827 (path::_S_convert(InputIter, __null_terminated))
828 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
829 Use _S_string_from_iter.
830 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
832 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
833 string equality, not path equivalence.
834 * testsuite/27_io/filesystem/path/construct/format.cc: Check
835 construction from std::string and std::wstring and input iterators.
836 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
837 construction from iterators.
838 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
839 exact string equality, not path equivalence.
840 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
841 construction from iterators.
843 * include/bits/fs_path.h (path::_M_type): Change default member
844 initializer to _Filename.
845 (path::begin): Create past-the-end iterator for empty path.
846 * src/filesystem/std-path.cc (path::remove_filename()): Remove
848 (path::has_relative_path()): Return false for empty filenames.
849 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
850 Fix offset of empty final component.
851 * testsuite/27_io/filesystem/path/itr/components.cc: New.
852 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
854 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
856 Add support for opening file streams from wide character strings.
857 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
858 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
860 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
861 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
862 Declare new overload.
863 * configure.ac: Check for _wfopen.
864 * crossconfig.m4: Likewise.
865 * configure: Regenerate.
866 * config.h.in: Regenerate.
867 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
868 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
870 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
871 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
872 Declare new overload.
873 [_GLIBCXX_HAVE__WFOPEN]
874 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
875 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
876 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
877 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
878 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
879 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
881 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
882 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
883 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
884 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
885 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
886 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
887 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
889 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
892 * include/bits/stl_tree.h
893 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
896 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
898 * src/filesystem/std-ops.cc (absolute): Report an error for empty
900 (weakly_canonical(const path&)): Do not call canonical on empty path.
901 (weakly_canonical(const path&, error_code&)): Likewise.
902 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
905 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
906 dg-require-filesystem-ts.
909 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
910 initialize base class to avoid warnings.
912 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
914 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
915 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
916 little_endian element in bitmask.
917 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
918 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
920 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
922 * include/bits/stl_tree.h
923 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
924 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
925 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
926 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
927 * include/debug/map.h
928 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
929 * include/debug/multimap.h
930 (multimap(multimap&&, const_allocator_type&)): Likewise.
931 * include/debug/set.h
932 (set(set&&, const_allocator_type&)): Likewise.
933 * include/debug/multiset.h
934 (multiset(multiset&&, const_allocator_type&)): Likewise.
935 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
937 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
939 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
941 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
943 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
945 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
947 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
949 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
952 2018-05-18 Jason Merrill <jason@redhat.com>
954 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
955 for conversion to const_iterator. Add defaulted copy ops.
956 * libsupc++/new (bad_alloc): Add defaulted copy ops.
957 * libsupc++/exception.h (exception): Add defaulted copy ops.
958 * include/std/system_error (system_error): Add defaulted copy ops.
959 * include/std/stdexcept (domain_error, invalid_argument)
960 (length_error, out_of_range, range_error, overflow_error)
961 (underflow_error): Add defaulted copy ops.
962 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
964 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
965 * include/ext/throw_allocator.h (condition_base): Add defaulted
966 default and copy ctor and copy assignment.
968 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
971 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
972 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
973 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
974 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
976 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
978 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
979 braces around body of do-while.
980 * testsuite/28_regex/basic_regex/85098.cc: New
982 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
985 * src/filesystem/path.cc (path::preferred_separator): Add used
987 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
990 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
991 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
992 Refactor to separate non-throwing and throwing implementations.
993 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
994 if constructing the object throws.
996 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
999 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1000 (linear_congruential_engine, mersenne_twister_engine)
1001 (subtract_with_carry_engine, discard_block_engine)
1002 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1003 constrain function templates taking seed sequences.
1004 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1005 (mersenne_twister_engine::seed(_Sseq&))
1006 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1008 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1009 __is_seed_seq to constrain function templates taking seed sequences.
1010 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1011 Change return type to match declaration.
1012 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1014 * testsuite/26_numerics/random/independent_bits_engine/cons/
1016 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1018 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1020 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1021 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1023 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1025 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1029 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1030 for all operating systems.
1031 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1032 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1033 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1034 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1036 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1037 unused <vector> header.
1038 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1039 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1040 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1041 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1042 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1044 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1046 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1047 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1048 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1049 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1050 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1052 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1053 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1055 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1057 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1059 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1061 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1063 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1065 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1067 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1068 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1072 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1073 temporary path before calling _M_append.
1074 (path::_M_append): Change parameter to path and implement C++17
1076 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1077 and more examples from the standard.
1078 * testsuite/27_io/filesystem/path/append/source.cc: New.
1079 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1080 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1082 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1083 __invoke to prevent ADL.
1085 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
1088 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1089 exceptions from _M_terminate_output().
1090 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1091 exceptions from close().
1092 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1094 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1095 (__valarray_get_storage): Call operator new directly. Remove ignored
1096 top-level restrict qualifier and add malloc attribute instead.
1097 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1100 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1101 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1104 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1106 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1108 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1111 * testsuite/20_util/variant/80165.cc: New.
1113 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1115 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1116 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1117 of C++11 containers with Debug Mode support.
1118 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1119 * doc/html/*: Regenerate.
1121 2018-05-10 Jason Merrill <jason@redhat.com>
1123 * include/bits/regex_compiler.h (_S_cache_size): Change from
1124 function to variable.
1126 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1128 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1129 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1130 argument defaulted to +1. Doxy comments on same.
1131 * testsuite/special_functions/02_assoc_legendre/
1132 check_value.cc: Regen.
1133 * testsuite/tr1/5_numerical_facilities/special_functions/
1134 02_assoc_legendre/check_value.cc: Regen.
1136 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1139 * include/bits/c++config.h (__replacement_assert): Add linkage
1141 * include/bits/std_abs.h: Add comment to closing brace of block.
1142 * include/c_global/cstddef: Add linkage specification.
1143 * include/c_global/cstring: Likewise.
1144 * include/c_global/cwchar: Likewise.
1146 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1148 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1150 (_Safe_iterator<>::_S_constant()): ...that.
1151 * include/debug/safe_local_iterator.h
1152 (_Safe_local_iterator<>::_M_constant()): Rename in...
1153 (_Safe_local_iterator<>::_S_constant()): ...that.
1154 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1155 (_Iterator_state::__rbegin): New.
1156 (_Iterator_state::__rmiddle): New.
1157 (_Iterator_state::__rend): New.
1158 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1159 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1161 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1162 _Is_iterator)): Likewise.
1163 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1164 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1165 _Is_iterator)): New.
1166 (_Parameter(std::reverse_iterator<> const&, const char*,
1167 _Is_iterator)): New.
1168 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1169 const char*, _Is_iterator)): New.
1170 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1172 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1173 _Is_iterator)): New.
1174 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1175 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1176 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1178 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1180 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1181 Use constexpr if in C++17 mode.
1182 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1183 Copy from const object.
1184 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1186 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1188 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1189 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1192 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1193 * include/debug/functions.h (__check_valid_range): Use latter.
1194 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1196 * include/debug/deque
1197 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1198 * include/debug/forward_list
1199 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1201 * include/debug/list
1202 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1203 * include/debug/list
1204 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1205 * include/debug/map.h
1206 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1207 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1209 * include/debug/multimap.h
1210 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1211 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1212 const _Alloc&)): Likewise.
1213 * include/debug/set.h
1214 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1215 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1217 * include/debug/multiset.h
1218 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1219 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1220 const _Alloc&)): Likewise.
1221 * include/debug/string
1222 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1224 * include/debug/unordered_map
1225 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1227 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1228 const _Alloc&)): Likewise.
1229 * include/debug/unordered_set
1230 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1232 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1233 const _Alloc&)): Likewise.
1234 * include/debug/vector
1235 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1237 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1238 (_Error_formatter(const char*, unsigned int)): Adapt.
1239 (_Error_formatter::_M_at): Rename in...
1240 (_Error_formatter::_S_at): ...that and adapt.
1241 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1242 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1243 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1246 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1248 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1249 Use normal std::vector even in Debug Mode.
1252 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1253 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1254 * include/Makefile.in: Regenerate.
1255 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1256 within conditional block.
1258 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1260 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1261 C++17 Filesystem implementation also needs -lstdc++fs.
1264 * include/bits/fs_path.h (operator/): Permit copy elision.
1265 * include/experimental/bits/fs_path.h (operator/): Likewise.
1267 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1269 Moar PR libstdc++/80506
1270 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1271 Fix magic number used in loop condition.
1273 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1275 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1276 * include/std/optional (_Optional_payload): Add noexcept to default
1277 constructor. Re-indent.
1278 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1279 constructor for copying disengaged payloads.
1280 (_Optional_payload<_Tp, true, false, true>): Likewise.
1281 (_Optional_payload<_Tp, true, true, false>): Likewise.
1282 (_Optional_payload<_Tp, true, false, false>): Likewise.
1283 * testsuite/20_util/optional/cons/85642.cc: New.
1284 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1286 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1289 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1290 inline definitions instead of using-declarations.
1291 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1292 * testsuite/tr1/5_numerical_facilities/special_functions/
1293 07_conf_hyperg/compile_cxx17.cc: New.
1294 * testsuite/tr1/5_numerical_facilities/special_functions/
1295 17_hyperg/compile_cxx17.cc: New.
1298 * include/std/variant (visit): Qualify std::get call.
1300 PR libstdc++/85632 use uintmax_t for arithmetic
1301 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1302 arithmetic in result type.
1303 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1304 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1305 is greater than free space.
1306 * testsuite/experimental/filesystem/operations/space.cc: New.
1308 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1309 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1311 * testsuite/20_util/remove_cvref/value.cc: New.
1312 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1314 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1315 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1316 (append(const basic_string&, size_type, size_type)
1317 (assign(const basic_string&, size_type, size_type)
1318 (insert(size_type, const basic_string&, size_type, size_type)
1319 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1320 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1321 Add default arguments (LWG 2268).
1322 [_GLIBCXX_USE_CXX11_ABI=0]
1323 (append(const basic_string&, size_type, size_type)
1324 (assign(const basic_string&, size_type, size_type)
1325 (insert(size_type, const basic_string&, size_type, size_type)
1326 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1327 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1329 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1332 * include/std/thread (thread::__not_same): New SFINAE helper.
1333 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1334 first argument is not a std::thread. Add static assertion to check
1335 INVOKE expression is valid.
1336 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1337 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1338 __invoke_result for return types and remove exception specifications.
1339 * testsuite/30_threads/thread/cons/84535.cc: New.
1341 * include/std/future (__async_result_of): Use __invoke_result instead
1344 * include/std/any (any_cast): Use __remove_cvref_t.
1345 * include/std/tuple (__make_tuple): Likewise.
1346 * include/std/type_traits (__remove_cvref_t): Define.
1347 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1348 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1349 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1351 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1353 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1354 ensure overloaded comma not used.
1355 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1356 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1357 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1358 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1359 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1360 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1361 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1363 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1366 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1367 indices to unsigned.
1368 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1369 as failure. Refactor error handling.
1370 * testsuite/27_io/ios_base/storage/68197.cc: New.
1374 * include/bits/gslice_array.h (gslice_array): Define default
1375 constructor as deleted, as per C++11 standard.
1376 * include/bits/mask_array.h (mask_array): Likewise.
1377 * include/bits/slice_array.h (slice_array): Likewise.
1378 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1379 to namespace __detail.
1380 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1382 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1383 of data members in closure objects.
1384 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1385 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1387 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1388 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1389 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1390 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1391 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1392 using-declarations to namespace std.
1393 * testsuite/26_numerics/valarray/83860.cc: New.
1395 * testsuite/backward/strstream_move.cc: Remove duplicate function
1399 * include/backward/strstream (strstreambuf): Define move constructor
1400 and move assignment operator.
1401 (istrstream, ostrstream, strstream): Likewise.
1402 * testsuite/backward/strstream_move.cc: New.
1404 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1407 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1408 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1409 * configure: Regenerate.
1410 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1411 based on ENABLE_FLOAT128.
1412 * include/Makefile.in: Regenerate.
1413 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1414 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1415 _GLIBCXX_USE_FLOAT128.
1417 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1419 * configure: Regenerated.
1421 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1423 * configure: Regenerated.
1425 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1426 Jakub Jelinek <jakub@redhat.com>
1429 * src/c++11/Makefile.am: Don't generate debuginfo again for
1430 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1431 * src/c++11/Makefile.in: Regenerate.
1433 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1436 * testsuite/30_threads/thread/cons/terminate.cc
1437 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1439 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1442 * configure: Regenerate.
1444 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1446 * testsuite/experimental/filesystem/file_status/1.cc: Add
1447 -DUSE_FILESYSTEM_TS to dg-options.
1448 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1450 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1451 * testsuite/experimental/filesystem/iterators/
1452 recursive_directory_iterator.cc: Likewise.
1453 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1454 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1455 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1456 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1457 * testsuite/experimental/filesystem/operations/create_directories.cc:
1459 * testsuite/experimental/filesystem/operations/create_directory.cc:
1461 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1463 * testsuite/experimental/filesystem/operations/current_path.cc:
1465 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1466 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1467 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1468 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1469 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1471 * testsuite/experimental/filesystem/operations/permissions.cc:
1473 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1475 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1476 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1477 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1478 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1480 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1481 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1482 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1483 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1484 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1485 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1486 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1487 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1488 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1489 * testsuite/experimental/filesystem/path/construct/default.cc:
1491 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1492 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1493 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1495 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1497 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1499 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1501 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1503 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1505 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1507 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1509 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1510 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1512 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1513 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1514 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1516 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1518 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1520 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1522 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1523 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1524 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1526 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1527 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1529 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1531 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1533 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1535 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1537 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1539 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1541 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1542 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1545 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
1547 * src/c++11/Makefile.am: Fix sed command.
1548 * src/c++11/Makefile.in: Regenerate.
1550 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1551 handle mangled names starting with double underscores on darwin.
1552 * src/c++11/Makefile.in: Regenerate.
1554 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
1556 * src/c++11/Makefile.am: Fix comment.
1557 * src/c++11/Makefile.in: Regenerate.
1558 * src/c++11/cxx11-ios_failure.cc: Fix comment.
1559 * src/c++98/ios_failure.cc: Likewise.
1561 * src/c++11/ios.cc: Remove redundant macro definition.
1563 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
1565 * doc/xml/manual/abi.xml: Document header locations in recent
1567 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1568 * doc/xml/manual/spine.xml: Update copyright years.
1569 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1570 undefined behaviour.
1571 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1572 * doc/html/*: Regenerate.
1574 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1576 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1577 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1578 * doc/xml/manual/containers.xml: Likewise.
1579 * doc/xml/manual/debug_mode.xml: Likewise.
1580 * doc/xml/manual/extensions.xml: Likewise.
1581 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1582 * doc/xml/manual/using.xml: Likewise.
1583 * doc/xml/manual/utilities.xml: Likewise.
1586 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1587 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1588 * src/c++11/Makefile.in: Regenerate.
1589 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1591 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1592 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1593 * src/c++98/ios_failure.cc (__construct_ios_failure)
1594 (__destroy_ios_failure, is_ios_failure_handler): New functions.
1595 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1596 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1597 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1598 handler types, to always catch std::ios_base::failure.
1599 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1600 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1601 exceptions_failbit.cc: Likewise.
1602 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1603 exceptions_failbit.cc: Likewise.
1604 * testsuite/27_io/basic_istream/extractors_other/char/
1605 exceptions_null.cc: Likewise.
1606 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1607 exceptions_null.cc: Likewise.
1608 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1609 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1610 * testsuite/27_io/basic_ostream/inserters_other/char/
1611 exceptions_null.cc: Likewise.
1612 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1613 exceptions_null.cc: Likewise.
1614 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1616 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
1618 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1619 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1621 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
1624 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1626 * testsuite/20_util/variant/85183.cc: New.
1628 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
1630 * include/std/variant (__get): Qualify calls to avoid ADL.
1631 (__select_index): Adjust whitespace.
1632 (variant): Add using-declaration to workaround Clang bug.
1634 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
1637 * include/bits/stl_function.h (greater::__not_overloaded)
1638 (less::__not_overloaded, greater_equal::__not_overloaded)
1639 (less_equal::__not_overloaded): Fix ambiguous specializations.
1640 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1641 tests for type with overloaded operators.
1643 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1646 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1647 xfail execution on 32-bit Solaris/x86.
1649 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
1651 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1652 VERIFY instead of assert.
1653 * testsuite/20_util/hash/84998.cc: New test.
1654 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1655 copy of test adjusted for Debug Mode.
1656 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1659 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
1662 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1663 * include/std/bitset: Likewise.
1664 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1666 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1667 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1668 * include/bits/stl_set.h (std::set<>): Likewise.
1669 * include/bits/unordered_map.h (std::unordered_map<>): Fix
1670 _Hash_merge_helper friend declaration.
1671 (std::unordered_multimap<>): Likewise.
1672 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1673 (std::unordered_multiset<>): Likewise.
1675 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1677 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1678 trailing slash for domain level link.
1679 * doc/xml/faq.xml: Ditto.
1680 * doc/xml/manual/appendix_free.xml (software): Ditto.
1681 * doc/xml/manual/intro.xml: Ditto.
1682 * doc/xml/manual/spine.xml: Ditto.
1683 * doc/xml/spine.xml: Ditto.
1685 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1687 * doc/xml/manual/documentation_hacking.xml: Adjust link to
1690 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
1692 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1693 to compile as C++98.
1695 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
1698 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1699 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1700 to ensure total order for pointers.
1701 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1702 Add operator() overloads for pointer arguments and make generic
1703 overloads dispatch to new _S_cmp functions when comparisons would
1704 use built-in operators for pointers.
1705 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1707 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1711 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1712 * configure: Regenerate.
1713 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1714 (aligned_alloc): Add using-declaration.
1715 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1717 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
1719 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1720 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1723 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
1726 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1727 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1729 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1730 src/filesystem/std-ops.cc (create_dir): Likewise.
1732 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
1734 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1735 (StdListIteratorPrinter): Inherit from latter.
1736 (StdFwdListIteratorPrinter): New, inherit from latter.
1737 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1738 when iterator has no associated container.
1739 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1740 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1742 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1743 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1745 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1748 * include/std/optional (_Optional_payload): Split into multiple
1749 specializations that can handle different cases of trivial or
1750 non-trivial assignment operators.
1751 * testsuite/20_util/optional/84601.cc: New.
1752 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1754 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
1757 * include/bits/parse_numbers.h (_Number_help): Add partial
1758 specialization to handle digit separators. Adjust partial
1759 specialization for recursion temrination to require _Pow == 1ULL.
1760 * testsuite/20_util/duration/literals/84671.cc: New
1762 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
1764 Implement the missing bits of LWG 2769
1765 * include/std/any (any_cast(const any&)): Add static_assert.
1766 (any_cast(any&)): Likewise.
1767 (any_cast(any&&)): Likewise, and remove the handling
1768 for copyable-but-not-movable type.
1769 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1770 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1773 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
1776 * include/std/thread (thread::__make_invoker): Construct tuple
1777 directly instead of using make_tuple.
1778 * testsuite/30_threads/async/84532.cc: New.
1779 * testsuite/30_threads/thread/84532.cc: New.
1781 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
1783 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1784 (template<> __aligned_buffer): Define as __aligned_membuf alias.
1786 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1789 * configure: Regenerate.
1791 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
1794 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1795 * configure: Regenerate.
1796 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1798 * include/Makefile.in: Regenerate.
1800 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
1803 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1804 Add -ffloat-store to options for m68k and ia32.
1806 * doc/xml/faq.xml: Update copyright years.
1807 * doc/html/*: Regenerate.
1810 * include/std/any (any::__do_emplace): Only set _M_manager after
1811 constructing the contained object.
1812 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1813 * testsuite/20_util/any/modifiers/83658.cc: New test.
1815 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
1818 * include/c_global/cstddef (__byte_operand): Define primary template.
1819 * testsuite/18_support/byte/81076.cc: New test.
1821 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
1823 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1824 dg-options and dg-add-options order.
1825 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1826 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1828 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1829 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1831 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1833 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1834 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1836 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1838 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
1840 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
1842 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
1844 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
1846 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
1848 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
1850 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
1851 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
1852 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
1853 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
1854 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
1855 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
1856 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
1857 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
1858 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
1860 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
1862 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
1864 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
1867 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
1869 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
1870 include linux/types.h when checking linux/random.h header.
1871 * config.h.in: Regenerate.
1873 * src/c++11/random.cc: Conditionally include linux/types.h.
1875 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
1877 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
1879 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
1882 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
1883 pattern with exact match for std::cerr.
1885 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1888 * include/bits/random.h (chi_squared_distribution::param): Update
1889 gamma distribution parameter.
1890 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
1894 * include/std/type_traits (has_unique_object_representations_v): Add
1896 * testsuite/20_util/has_unique_object_representations/value.cc: Check
1899 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1901 Make optional conditionally
1902 trivially_{copy,move}_{constructible,assignable}
1903 * include/std/optional (_Optional_payload): Fix the comment in
1904 the class head and turn into a primary and one specialization.
1905 (_Optional_payload::_M_engaged): Strike the NSDMI.
1906 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
1908 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
1910 (_Optional_payload<_Tp, false>::_M_get): Likewise.
1911 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
1912 (_Optional_base_impl): Likewise.
1913 (_Optional_base): Turn into a primary and three specializations.
1914 (optional(nullopt)): Change the base init.
1915 * testsuite/20_util/optional/assignment/8.cc: New.
1916 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
1917 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1919 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1922 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
1923 (get_template_arg_list): New.
1924 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
1926 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
1927 of strings and regular expressions.
1928 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
1929 (FilteringTypePrinter): Add docstring. Match using startswith. Use
1930 strip_inline_namespaces instead of strip_versioned_namespace.
1931 (add_one_type_printer): Prepend namespace to match argument.
1932 (register_type_printers): Add type printers for char16_t and char32_t
1933 string types and for types using cxx11 ABI. Update calls to
1934 add_one_template_type_printer to provide default argument dicts.
1935 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
1936 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
1937 basic_string<unsigned char> and basic_string<signed char>.
1938 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
1939 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
1941 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
1944 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1946 2018-01-13 Tim Shen <timshen@google.com>
1949 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
1950 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
1951 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
1953 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1956 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
1957 Remove dg-xfail-run-if.
1959 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
1961 * include/bits/forward_list.h
1962 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
1963 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
1964 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
1965 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
1966 (_Fwd_list_impl()): Add noexcept qualification.
1967 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
1968 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
1969 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
1970 (_Fwd_list_base()): Default.
1971 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
1972 (_Fwd_list_base(_Fwd_list_base&&)): Default.
1973 (forward_list<>()): Default.
1974 (forward_list<>(forward_list&&)): Default.
1975 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
1976 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
1977 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
1978 * include/bits/forward_list.tcc
1979 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
1980 _M_impl._M_head move assignment.
1981 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
1982 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
1984 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
1987 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
1988 (UniquePointerPrinter): Print correct template argument, not type of
1990 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
1992 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
1994 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
1995 weak_ptr of array types.
1997 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
2000 * include/bits/hashtable_policy.h
2001 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2003 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2004 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2005 Add false_type parameter.
2006 (_Insert_base::insert): Adapt.
2007 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2009 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2010 Add __n_elt parameter, defaulted to 1.
2011 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2012 policy _M_need_rehash.
2013 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2014 produce only 1 rehash if necessary.
2015 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2016 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2018 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2019 Jonathan Wakely <jwakely@redhat.com>
2021 PR libstdc++/59253 (partial)
2022 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2023 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2024 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2026 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2027 of unique_ptr printer.
2028 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2029 output of shared_ptr printer.
2031 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
2034 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2035 unnecessary symlink_status call.
2036 (remove_all(const path&, error_code&)): Use filesystem::remove.
2037 * src/filesystem/std-ops.cc: Likewise.
2040 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2044 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2045 report an error for ENOENT.
2046 (remove_all(const path&)): Fix type of result variable.
2047 (remove_all(const path&, error_code&)): Use non-throwing increment
2048 for directory iterator. Call POSIX remove directly to avoid redundant
2049 calls to symlink_status. Do not report errors for ENOENT.
2050 * src/filesystem/std-ops.cc: Likewise.
2051 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2053 * testsuite/experimental/filesystem/operations/remove_all.cc:
2056 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
2059 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2060 redundant call to ec.clear().
2061 (remove_all(const path&, error_code&))): Do not return an error for
2063 * src/filesystem/std-ops.cc: Likewise.
2064 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2065 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2066 results for non-existent paths.
2067 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2068 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2069 expected results for non-existent paths.
2071 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2072 check status_known once.
2073 * include/experimental/bits/fs_ops.h: Likewise.
2076 * include/std/functional (__is_byte_like): New trait.
2077 (__is_std_equal_to): Remove.
2078 (__boyer_moore_base_t): Use __is_byte_like instead of
2080 * include/experimental/functional (__is_std_equal_to): Remove.
2081 (__boyer_moore_base_t): Use __is_byte_like instead of
2083 * testsuite/20_util/function_objects/83607.cc: New test.
2085 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2087 Protect optional's deduction guide with the feature macro
2088 * include/std/optional: Use the feature macro.
2090 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2092 Update copyright years.
2094 Copyright (C) 2018 Free Software Foundation, Inc.
2096 Copying and distribution of this file, with or without modification,
2097 are permitted in any medium without royalty provided the copyright
2098 notice and this notice are preserved.