1 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/utility: Remove unused <exception> header.
5 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
7 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
8 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
9 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
10 a specialization of std::pair.
11 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
12 pair elements are constructed correctly.
14 LWG 2989 hide path iostream operators from normal lookup
15 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
17 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
19 LWG 3050 Fix cv-qualification of convertibility constraints
20 * include/std/chrono (duration, operator*, operator/, operator%): Use
21 const-qualified type as source type in is_convertible constraints.
22 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
23 * testsuite/20_util/duration/cons/dr3050.cc: New.
24 * testsuite/20_util/duration/literals/range.cc: Rename to...
25 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
28 2018-06-18 Maya Rashish <coypu@sdf.org>
30 * crossconfig.m4: Handle OpenBSD just like NetBSD.
33 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
35 P0754R2 <version> header
36 * include/Makefile.am: Add new header.
37 * include/Makefile.in: Regenerate.
38 * include/bits/c++config: Change doxygen comment to suggest <version>
40 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
41 unconditionally. Add C++17 and C++20 headers.
42 * include/std/version: New header.
43 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
44 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
45 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
46 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
47 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
48 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
49 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
51 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
52 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
53 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
54 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
55 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
56 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
57 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
59 * testsuite/18_support/headers/version/macros.cc: New.
60 * testsuite/18_support/headers/version/macros.cc: New.
62 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
63 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
65 * config.h.in: Regenerate.
66 * configure: Regenerate.
67 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
69 LWG 3035. std::allocator's constructors should be constexpr
70 * include/bits/allocator.h (allocator): Add constexpr to constructors
71 for C++2a. Replace dynamic exception specifications with NOTHROW
73 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
75 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
76 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
77 to constructors for C++2a.
78 * include/ext/new_allocator.h (new_allocator): Likewise.
80 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
82 LWG 3076 basic_string CTAD ambiguity
83 * doc/xml/manual/intro.xml: Document LWG 3076 change.
84 * include/bits/basic_string.h
85 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
86 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
87 template constrained by _RequireAllocator.
88 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
89 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
91 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
93 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
96 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
99 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
100 (basic_string::data()): Unshare string.
101 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
104 * include/std/string_view (basic_string_view(const CharT*)): Remove
105 check for null pointer and add nonnull attribute.
106 (compare(const CharT*), compare(size_type, size_type, const CharT*))
107 (find(const CharT*, size_type), rfind(const CharT*, size_type))
108 (find_first_of(const CharT*, size_type))
109 (find_last_of(const CharT*, size_type))
110 (find_first_not_of(const CharT*, size_type))
111 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
112 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
113 * testsuite/21_strings/basic_string_view/operations/compare/char/
115 * testsuite/21_strings/basic_string_view/operations/find/char/
117 * testsuite/21_strings/basic_string_view/operations/rfind/char/
121 * include/bits/random.h (random_device(const string&)): Remove
124 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
125 define for C++17 and above.
127 LWG 2993 reference_wrapper<T> conversion from T&&
128 * doc/xml/manual/intro.xml: Document LWG 2993 change.
129 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
130 (reference_wrapper(_Tp&&)): Remove.
131 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
133 (reference_wrapper): Add deduction guide.
134 * testsuite/20_util/reference_wrapper/deduction.cc: New.
135 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
137 LWG 3039 Unnecessary decay in thread and packaged_task
138 * include/std/future (__constrain_pkgdtask): Replace with ...
139 (packaged_task::__not_same): New alias template, using
140 __remove_cvref_t instead of decay.
141 * include/std/thread (thread::__not_same): Add comment.
143 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
145 LWG 3075 basic_string needs deduction guides from basic_string_view
146 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
147 deduction from string views.
148 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
151 LWG 3074 make scalar types non-deduced in valarray non-member functions
152 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
153 scalar parameters to be a non-deduced context.
154 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
156 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
157 * testsuite/26_numerics/valarray/transcend.cc: New.
159 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
160 Move back to <utility>.
161 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
164 P0935R0 Eradicating unnecessarily explicit default constructors
165 * include/backward/strstream (strstreambuf): Add non-explicit default
167 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
169 * include/bits/regex.h (match_results): Likewise.
170 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
172 * testsuite/22_locale/conversions/string/1.cc: Likewise.
173 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
174 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
176 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
177 macro from <utility> and change type to long.
178 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
179 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
182 P0935R0 Eradicating unnecessarily explicit default constructors
183 * include/bits/random.h (uniform_real_distribution::param_type)
184 (normal_distribution::param_type, lognormal_distribution::param_type)
185 (gamma_distribution::param_type, chi_squared_distribution::param_type)
186 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
187 (student_t_distribution::param_type)
188 (bernoulli_distribution::param_type)
189 (binomial_distribution::param_type)
190 (geometric_distribution::param_type)
191 (negative_binomial_distribution::param_type)
192 (poisson_distribution::param_type)
193 (exponential_distribution::param_type)
194 (weibull_distribution::param_type)
195 (extreme_value_distribution::param_type): Add non-explicit default
196 constructors. Remove default argument for first parameter of explicit
198 * include/bits/uniform_int_dist.h
199 (uniform_int_distribution::param_type): Likewise.
201 (beta_distribution::param_type, rice_distribution::param_type)
202 (nakagami_distribution::param_type, pareto_distribution::param_type)
203 (k_distribution::param_type, arcsine_distribution::param_type)
204 (hoyt_distribution::param_type, triangular_distribution::param_type)
205 (von_mises_distribution::param_type)
206 (hypergeometric_distribution::param_type)
207 (logistic_distribution::param_type)
208 (uniform_inside_sphere_distribution::param_type): Likewise.
209 (uniform_on_sphere_distribution::param_type): Make default constructor
211 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
212 Test param_type for non-explicit default constructor.
213 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
215 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
217 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
219 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
221 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
223 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
225 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
227 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
229 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
231 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
233 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
235 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
237 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
239 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
241 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
243 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
245 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
247 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
249 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
251 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
252 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
253 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
254 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
256 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
257 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
258 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
259 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
261 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
262 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
263 * testsuite/ext/random/triangular_distribution/cons/default.cc:
265 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
267 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
269 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
272 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
273 Jonathan Wakely <jwakely@redhat.com>
276 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
277 Default-construct new elements before moving existing ones.
278 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
281 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
284 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
286 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
287 Use node allocator to create and destroy elements.
288 (forward_list::_Tp_alloc_type): Remove unused typedef.
289 (forward_list::_Alloc_traits): Use allocator_traits instead of
290 __gnu_cxx::__alloc_traits.
292 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
294 * include/debug/helper_functions.h
295 (__gnu_debug::_Safe_iterator<>): Add declaration.
296 (__can_advance(_Ite, _Size)): New.
297 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
298 * include/debug/functions.h
299 (__gnu_debug::_Safe_iterator<>): Remove declaration.
300 * include/debug/stl_iterator.h
301 (__can_advance(const _Safe_iterator<>&)): New definition.
302 * include/debug/stl_iterator.h
303 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
304 (__can_advance(const std::move_iterator<>&, _Size)): New.
305 * include/debug/macros.h (__glibcxx_check_can_increment): New.
306 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
307 * include/bits/stl_algobase.h (fill_n): Use latter.
308 * testsuite/25_algorithms/fill_n/2.cc: New.
309 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
310 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
311 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
312 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
314 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
315 (__glibcxx_requires_can_decrement_range): New.
317 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
319 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
320 (__glibcxx_check_can_decrement_range): New.
321 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
322 __glibcxx_requires_can_increment_range.
323 (std::move(_II, _II, _OI)): Likewise.
324 (std::copy_backward(_BI, _BI, _BI2)): Use
325 __glibcxx_requires_can_decrement_range.
326 (std::move_backward(_BI, _BI, _BI2)): Likewise.
327 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
328 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
329 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
330 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
331 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
332 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
334 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
336 P0935R0 Eradicating unnecessarily explicit default constructors
337 * include/bits/random.h (linear_congruential_engine)
338 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
339 (uniform_real_distribution, normal_distribution)
340 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
341 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
342 (bernoulli_distribution, binomial_distribution,geometric_distribution)
343 (negative_binomial_distribution, exponential_distribution)
344 (weibull_distribution, extreme_value_distribution): Add non-explicit
345 default constructors. Remove default argument for first parameter of
346 explicit constructors.
347 (piecewise_constant_distribution, piecewise_linear_distribution):
348 Make default constructor non-explicit.
349 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
350 non-explicit default constructors. Remove default argument for first
351 parameter of explicit constructor.
353 (simd_fast_mersenne_twister_engine, beta_distribution)
354 (rice_distribution, nakagami_distribution, pareto_distribution)
355 (k_distribution, arcsine_distribution, hoyt_distribution)
356 (triangular_distribution, von_mises_distribution)
357 (hypergeometric_distribution, logistic_distribution)
358 (uniform_inside_sphere_distribution): Likewise.
359 (uniform_on_sphere_distribution): Make default constructor
361 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
362 Test for non-explicit default constructor. Fix references to standard.
363 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
365 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
367 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
369 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
371 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
373 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
375 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
377 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
379 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
381 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
383 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
385 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
387 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
389 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
391 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
393 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
395 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
397 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
399 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
401 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
402 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
403 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
404 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
406 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
407 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
408 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
409 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
411 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
412 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
413 * testsuite/ext/random/triangular_distribution/cons/default.cc:
415 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
417 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
419 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
421 * testsuite/util/testsuite_common_types.h
422 (implicitly_default_constructible): New helper.
424 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
426 * include/bits/ios_base.h (ios::Init::Init(const Init&))
427 (ios::Init::operator=): Define as defaulted.
428 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
430 * include/bits/stream_iterator.h (istream_iterator::operator=)
431 (ostream_iterator::operator=): Likewise.
432 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
434 * include/std/bitset (bitset::reference::reference(const reference&)):
436 * include/std/complex (complex<float>::complex(const complex&))
437 (complex<double>::complex(const complex&))
438 (complex<long double>::complex(const complex&)): Likewise.
440 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
442 * include/bits/regex.h (sub_match): Add noexcept to default
443 constructor and length observer.
444 (match_results): Add noexcept to default constructor and observers
445 with no preconditions. Define destructor as defaulted.
446 (operator==, operator!=, swap): Add noexcept.
447 (regex_iterator): Add default member initializers and define default
448 constructor and destructor as defaulted. Add noexcept to equality
449 and dereference operators.
451 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
454 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
455 (_Safe_iterator_base::_M_detach_single()): Likewise.
456 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
457 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
459 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
461 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
464 2018-06-06 Jakub Jelinek <jakub@redhat.com>
467 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
468 rather than __cpp_transactional_memory >= 201505L.
470 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
473 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
474 Define new partial specialization.
475 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
477 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
478 value not reference for iteration.
479 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
481 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
482 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
485 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
487 * include/std/type_traits: Fix comment typos.
489 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
491 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
492 * testsuite/experimental/filesystem/operations/read_symlink.cc:
495 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
497 * include/bits/stl_tempbuf.h
498 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
499 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
500 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
501 * include/bits/stl_algo.h (__stable_partition): Adapt.
502 (__inplace_merge): Adapt.
503 (__stable_sort): Adapt.
505 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
508 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
509 unconditionally. Remove redundant declaration.
510 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
513 * include/bits/postypes.h (fpos): Define special members as defaulted.
516 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
517 the static variable correctly.
519 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
521 PR libstdc++/78870 support std::filesystem on Windows
522 * config.h.in: Regenerate.
523 * configure: Regenerate.
524 * configure.ac: Check for link, readlink and symlink.
525 * include/bits/fs_path.h (path::operator/=(const path&)): Move
526 definition out of class body.
527 (path::is_absolute(), path::_M_append(path)): Likewise.
528 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
529 (operator>>(basic_istream, path&)): Likewise.
530 (u8path): Reorder definitions and fix Windows implementation.
531 (path::is_absolute()): Define inline and fix for Windows.
532 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
533 Define POSIX version inline.
534 (path::_M_append(path)): Define inline.
535 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
536 definition out of class body.
537 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
539 (operator>>(basic_istream, path&)): Likewise.
540 (path::is_absolute()): Define inline and fix for Windows.
541 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
542 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
543 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
544 Define as adaptors for Windows functions/types or as
545 using-declarations for POSIX functions/types.
546 (_Dir_base, get_file_type): Qualify names to use declarations from
547 __gnu_posix namespace.
548 (_Dir_base::is_dor_or_dotdot): New helper functions.
549 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
550 names to use declarations from __gnu_posix namespace.
551 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
552 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
553 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
554 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
555 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
556 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
557 Define as adaptors for Windows functions/types or as
558 using-declarations for POSIX functions/types.
559 (stat_type, do_copy_file): Qualify names to use declarations from
560 __gnu_posix namespace.
561 (do_space): Declare new function.
562 (make_file_type): Only use S_ISLNK if defined.
563 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
564 path::value_type not char.
565 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
566 names to use declarations from __gnu_posix namespace.
567 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
568 add implementation for Windows.
569 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
570 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
571 [!_PC_PATH_MAX]: Don't use pathconf.
572 [PATH_MAX]: Use if defined.
573 (filesystem::current_path(const path&, error_code&))
574 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
575 (filesystem::last_write_time, filesystem::permissions): Use names
577 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
578 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
579 implementation for Windows.
580 (filesystem::rename, filesystem::resize_file): Use names from
582 (filesystem::space): Use do_space.
583 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
584 (filesystem::status, filesystem::symlink_status): Use names from
586 (filesystem::temp_directory_path): Add implementation for Windows.
587 * src/filesystem/path.cc (dot): Define constant.
588 (path::replace_extension): Use dot.
589 (path::_M_find_extension): Likewise. Use path::string_type not
591 (path::_M_split_cmpts): Use dot.
592 (filesystem_error::_M_get_what): Use u8string() not native().
593 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
594 Qualify names to use declarations from __gnu_posix namespace.
595 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
597 (filesystem::absolute(const path&, error_code&)): Add implementation
599 (char_ptr, filesystem::canonical): Use path::value_type not char.
600 (do_copy_file): Use names from __gnu_posix.
601 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
603 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
604 names to use declarations from __gnu_posix namespace.
605 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
606 add implementation for Windows.
607 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
608 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
609 [!_PC_PATH_MAX]: Don't use pathconf.
610 [PATH_MAX]: Use if defined.
611 (filesystem::current_path(const path&, error_code&))
612 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
613 (filesystem::last_write_time, filesystem::permissions): Use names
615 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
616 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
617 implementation for Windows.
618 (filesystem::rename, filesystem::resize_file): Use names from
621 (filesystem::space): Use do_space.
622 (filesystem::status, filesystem::symlink_status): Use names from
624 (filesystem::temp_directory_path): Add implementation for Windows.
625 * src/filesystem/std-path.cc
626 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
628 (dot): Define constant.
629 (path::replace_extension, is_dot): Use dot.
630 (path::lexically_normal): Check _M_type instead of calling
631 non-existent function.
632 (path::_M_find_extension): Use dot. Use path::string_type not
634 (path::_M_split_cmpts): Use dot.
635 (filesystem_error::_M_get_what): Use u8string() not native().
636 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
638 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
640 * testsuite/27_io/filesystem/operations/absolute.cc: Use
641 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
642 * testsuite/27_io/filesystem/operations/canonical.cc: Use
643 path::string() to get narrow string, not path::native().
644 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
645 with std::filesystem::path not std::basic_string.
646 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
647 * testsuite/27_io/filesystem/operations/exists.cc: Use
648 __gnu_test::root_path() instead of "/".
649 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
650 fstreams with std::filesystem::path not std::basic_string.
651 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
652 path::string() to get narrow string.
653 * testsuite/27_io/filesystem/operations/space.cc: Check results for
654 errors, expect sensible values otherwise.
655 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
656 helpers for adjusting the environment on Windows.
657 * testsuite/27_io/filesystem/path/append/path.cc: Test
658 Windows-specific behaviour.
659 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
660 of path::string_type objects.
661 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
662 string to wide string on Windows.
663 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
664 for backslash as root-directory.
665 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
666 path::string() to get narrow string.
667 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
669 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
671 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
672 different definintion of absolute paths on Windows.
673 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
675 * testsuite/experimental/filesystem/operations/absolute.cc: Test
677 * testsuite/experimental/filesystem/operations/copy.cc: Construct
678 fstreams with NTCTS not std::basic_string.
679 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
680 * testsuite/experimental/filesystem/operations/exists.cc: Use
681 __gnu_test::root_path() instead of "/".
682 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
683 fstreams with NTCTS not std::basic_string.
684 * testsuite/experimental/filesystem/operations/last_write_time.cc:
685 Use path::string() to get narrow string.
686 * testsuite/experimental/filesystem/operations/space.cc: Use
687 __gnu_test::root_path() instead of "/".
688 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
689 Add helpers for adjusting the environment on Windows.
690 * testsuite/experimental/filesystem/path/append/path.cc: Use
691 path::string() to get narrow strings for comparisons.
692 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
693 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
695 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
696 * testsuite/experimental/filesystem/path/native/string.cc: Use
697 string_type not std::string.
698 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
699 Adjust for different definintion of absolute paths on Windows.
700 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
702 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
705 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
708 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
709 uint_least16_t and uint_least32_t.
710 (__make_unsigned<wchar_t>): Define unconditionally.
711 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
713 (__make_unsigned_selector_base): New type to provide helper templates.
714 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
715 __make_unsigned_selector_base helpers.
716 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
717 (__make_signed_selector<_Tp, true, false>): Remove intermediate
719 (__make_signed<wchar_t>, __make_signed<char16_t>)
720 (__make_signed<char32_t>)): Define unconditionally.
721 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
722 wchar_t, char16_t and char32_t are transformed correctly.
723 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
725 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
726 wchar_t, char16_t and char32_t are transformed correctly.
727 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
730 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
732 * include/std/variant (__erased_dtor): Qualify call to __get.
734 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
736 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
737 (_Rb_tree(const allocator_type&)): Use latter.
738 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
739 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
740 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
741 * include/bits/stl_multimap.h
742 (multimap(const allocator_type&)): Likewise.
743 (multimap(initializer_list<value_type>, const allocator_type&)):
745 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
747 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
748 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
749 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
750 * include/bits/stl_multiset.h
751 (multiset(const allocator_type&)): Likewise.
752 (multiset(initializer_list<value_type>, const allocator_type&)):
754 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
757 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
760 * src/c++11/debug.cc: Remove backtrace usage.
762 2018-05-24 Maya Rashish <coypu@sdf.org>
765 * crossconfig.m4: Test for aligned_alloc on netbsd.
766 * configure: Regenerate.
768 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
772 * include/bits/atomic_base.h (__atomic_base::value_type)
773 (__atomic_base::difference_type): Add new typedefs.
774 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
775 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
776 (atomic<T*>::operator++, atomic<T*>::operator--)
777 (atomic<T*>::operator+=, atomic<T*>::operator-=)
778 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
779 to enforce C++17 requirement on pointer arithmetic.
780 (__atomic_val_t, __atomic_diff_t): New alias templates.
781 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
782 (atomic_compare_exchange_weak_explicit)
783 (atomic_compare_exchange_strong_explicit, atomic_store)
784 (atomic_exchange, atomic_compare_exchange_weak)
785 (atomic_compare_exchange_strong): Use __atomic_val_t to make
786 scalar parameters be non-deduced contexts.
787 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
788 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
789 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
791 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
792 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
793 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
794 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
795 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
797 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
798 * testsuite/29_atomics/atomic/69769.cc: New test.
799 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
800 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
801 Disable test for C++17 and later.
802 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
803 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
804 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
807 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
809 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
810 template to alias template.
811 (path::__value_type_is_char): Use remove_const_t.
812 (path:_S_string_from_iter): New helper function.
813 (path::_S_convert(InputIter, __null_terminated))
814 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
815 Use _S_string_from_iter.
816 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
818 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
819 Change from class template to alias template.
820 (path::__value_type_is_char): Use remove_const.
821 (path:_S_string_from_iter): New helper function.
822 (path::_S_convert(InputIter, __null_terminated))
823 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
824 Use _S_string_from_iter.
825 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
827 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
828 string equality, not path equivalence.
829 * testsuite/27_io/filesystem/path/construct/format.cc: Check
830 construction from std::string and std::wstring and input iterators.
831 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
832 construction from iterators.
833 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
834 exact string equality, not path equivalence.
835 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
836 construction from iterators.
838 * include/bits/fs_path.h (path::_M_type): Change default member
839 initializer to _Filename.
840 (path::begin): Create past-the-end iterator for empty path.
841 * src/filesystem/std-path.cc (path::remove_filename()): Remove
843 (path::has_relative_path()): Return false for empty filenames.
844 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
845 Fix offset of empty final component.
846 * testsuite/27_io/filesystem/path/itr/components.cc: New.
847 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
849 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
851 Add support for opening file streams from wide character strings.
852 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
853 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
855 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
856 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
857 Declare new overload.
858 * configure.ac: Check for _wfopen.
859 * crossconfig.m4: Likewise.
860 * configure: Regenerate.
861 * config.h.in: Regenerate.
862 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
863 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
865 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
866 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
867 Declare new overload.
868 [_GLIBCXX_HAVE__WFOPEN]
869 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
870 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
871 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
872 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
873 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
874 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
876 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
877 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
878 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
879 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
880 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
881 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
882 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
884 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
887 * include/bits/stl_tree.h
888 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
891 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
893 * src/filesystem/std-ops.cc (absolute): Report an error for empty
895 (weakly_canonical(const path&)): Do not call canonical on empty path.
896 (weakly_canonical(const path&, error_code&)): Likewise.
897 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
900 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
901 dg-require-filesystem-ts.
904 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
905 initialize base class to avoid warnings.
907 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
909 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
910 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
911 little_endian element in bitmask.
912 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
913 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
915 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
917 * include/bits/stl_tree.h
918 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
919 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
920 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
921 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
922 * include/debug/map.h
923 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
924 * include/debug/multimap.h
925 (multimap(multimap&&, const_allocator_type&)): Likewise.
926 * include/debug/set.h
927 (set(set&&, const_allocator_type&)): Likewise.
928 * include/debug/multiset.h
929 (multiset(multiset&&, const_allocator_type&)): Likewise.
930 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
932 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
934 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
936 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
938 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
940 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
942 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
944 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
947 2018-05-18 Jason Merrill <jason@redhat.com>
949 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
950 for conversion to const_iterator. Add defaulted copy ops.
951 * libsupc++/new (bad_alloc): Add defaulted copy ops.
952 * libsupc++/exception.h (exception): Add defaulted copy ops.
953 * include/std/system_error (system_error): Add defaulted copy ops.
954 * include/std/stdexcept (domain_error, invalid_argument)
955 (length_error, out_of_range, range_error, overflow_error)
956 (underflow_error): Add defaulted copy ops.
957 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
959 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
960 * include/ext/throw_allocator.h (condition_base): Add defaulted
961 default and copy ctor and copy assignment.
963 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
966 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
967 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
968 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
969 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
971 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
973 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
974 braces around body of do-while.
975 * testsuite/28_regex/basic_regex/85098.cc: New
977 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
980 * src/filesystem/path.cc (path::preferred_separator): Add used
982 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
985 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
986 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
987 Refactor to separate non-throwing and throwing implementations.
988 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
989 if constructing the object throws.
991 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
994 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
995 (linear_congruential_engine, mersenne_twister_engine)
996 (subtract_with_carry_engine, discard_block_engine)
997 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
998 constrain function templates taking seed sequences.
999 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1000 (mersenne_twister_engine::seed(_Sseq&))
1001 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1003 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1004 __is_seed_seq to constrain function templates taking seed sequences.
1005 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1006 Change return type to match declaration.
1007 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1009 * testsuite/26_numerics/random/independent_bits_engine/cons/
1011 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1013 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1015 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1016 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1018 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1020 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1024 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1025 for all operating systems.
1026 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1027 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1028 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1029 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1031 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1032 unused <vector> header.
1033 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1034 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1035 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1036 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1037 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1039 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1041 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1042 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1043 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1044 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1045 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1047 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1048 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1050 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1052 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1054 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1056 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1058 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1060 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1062 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1063 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1067 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1068 temporary path before calling _M_append.
1069 (path::_M_append): Change parameter to path and implement C++17
1071 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1072 and more examples from the standard.
1073 * testsuite/27_io/filesystem/path/append/source.cc: New.
1074 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1075 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1077 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1078 __invoke to prevent ADL.
1080 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
1083 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1084 exceptions from _M_terminate_output().
1085 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1086 exceptions from close().
1087 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1089 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1090 (__valarray_get_storage): Call operator new directly. Remove ignored
1091 top-level restrict qualifier and add malloc attribute instead.
1092 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1095 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1096 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1099 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1101 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1103 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1106 * testsuite/20_util/variant/80165.cc: New.
1108 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1110 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1111 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1112 of C++11 containers with Debug Mode support.
1113 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1114 * doc/html/*: Regenerate.
1116 2018-05-10 Jason Merrill <jason@redhat.com>
1118 * include/bits/regex_compiler.h (_S_cache_size): Change from
1119 function to variable.
1121 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1123 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1124 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1125 argument defaulted to +1. Doxy comments on same.
1126 * testsuite/special_functions/02_assoc_legendre/
1127 check_value.cc: Regen.
1128 * testsuite/tr1/5_numerical_facilities/special_functions/
1129 02_assoc_legendre/check_value.cc: Regen.
1131 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1134 * include/bits/c++config.h (__replacement_assert): Add linkage
1136 * include/bits/std_abs.h: Add comment to closing brace of block.
1137 * include/c_global/cstddef: Add linkage specification.
1138 * include/c_global/cstring: Likewise.
1139 * include/c_global/cwchar: Likewise.
1141 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1143 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1145 (_Safe_iterator<>::_S_constant()): ...that.
1146 * include/debug/safe_local_iterator.h
1147 (_Safe_local_iterator<>::_M_constant()): Rename in...
1148 (_Safe_local_iterator<>::_S_constant()): ...that.
1149 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1150 (_Iterator_state::__rbegin): New.
1151 (_Iterator_state::__rmiddle): New.
1152 (_Iterator_state::__rend): New.
1153 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1154 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1156 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1157 _Is_iterator)): Likewise.
1158 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1159 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1160 _Is_iterator)): New.
1161 (_Parameter(std::reverse_iterator<> const&, const char*,
1162 _Is_iterator)): New.
1163 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1164 const char*, _Is_iterator)): New.
1165 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1167 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1168 _Is_iterator)): New.
1169 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1170 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1171 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1173 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1175 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1176 Use constexpr if in C++17 mode.
1177 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1178 Copy from const object.
1179 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1181 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1183 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1184 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1187 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1188 * include/debug/functions.h (__check_valid_range): Use latter.
1189 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1191 * include/debug/deque
1192 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1193 * include/debug/forward_list
1194 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1196 * include/debug/list
1197 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1198 * include/debug/list
1199 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1200 * include/debug/map.h
1201 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1202 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1204 * include/debug/multimap.h
1205 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1206 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1207 const _Alloc&)): Likewise.
1208 * include/debug/set.h
1209 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1210 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1212 * include/debug/multiset.h
1213 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1214 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1215 const _Alloc&)): Likewise.
1216 * include/debug/string
1217 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1219 * include/debug/unordered_map
1220 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1222 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1223 const _Alloc&)): Likewise.
1224 * include/debug/unordered_set
1225 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1227 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1228 const _Alloc&)): Likewise.
1229 * include/debug/vector
1230 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1232 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1233 (_Error_formatter(const char*, unsigned int)): Adapt.
1234 (_Error_formatter::_M_at): Rename in...
1235 (_Error_formatter::_S_at): ...that and adapt.
1236 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1237 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1238 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1241 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1243 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1244 Use normal std::vector even in Debug Mode.
1247 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1248 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1249 * include/Makefile.in: Regenerate.
1250 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1251 within conditional block.
1253 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1255 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1256 C++17 Filesystem implementation also needs -lstdc++fs.
1259 * include/bits/fs_path.h (operator/): Permit copy elision.
1260 * include/experimental/bits/fs_path.h (operator/): Likewise.
1262 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1264 Moar PR libstdc++/80506
1265 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1266 Fix magic number used in loop condition.
1268 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1270 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1271 * include/std/optional (_Optional_payload): Add noexcept to default
1272 constructor. Re-indent.
1273 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1274 constructor for copying disengaged payloads.
1275 (_Optional_payload<_Tp, true, false, true>): Likewise.
1276 (_Optional_payload<_Tp, true, true, false>): Likewise.
1277 (_Optional_payload<_Tp, true, false, false>): Likewise.
1278 * testsuite/20_util/optional/cons/85642.cc: New.
1279 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1281 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1284 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1285 inline definitions instead of using-declarations.
1286 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1287 * testsuite/tr1/5_numerical_facilities/special_functions/
1288 07_conf_hyperg/compile_cxx17.cc: New.
1289 * testsuite/tr1/5_numerical_facilities/special_functions/
1290 17_hyperg/compile_cxx17.cc: New.
1293 * include/std/variant (visit): Qualify std::get call.
1295 PR libstdc++/85632 use uintmax_t for arithmetic
1296 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1297 arithmetic in result type.
1298 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1299 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1300 is greater than free space.
1301 * testsuite/experimental/filesystem/operations/space.cc: New.
1303 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1304 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1306 * testsuite/20_util/remove_cvref/value.cc: New.
1307 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1309 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1310 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1311 (append(const basic_string&, size_type, size_type)
1312 (assign(const basic_string&, size_type, size_type)
1313 (insert(size_type, const basic_string&, size_type, size_type)
1314 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1315 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1316 Add default arguments (LWG 2268).
1317 [_GLIBCXX_USE_CXX11_ABI=0]
1318 (append(const basic_string&, size_type, size_type)
1319 (assign(const basic_string&, size_type, size_type)
1320 (insert(size_type, const basic_string&, size_type, size_type)
1321 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1322 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1324 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1327 * include/std/thread (thread::__not_same): New SFINAE helper.
1328 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1329 first argument is not a std::thread. Add static assertion to check
1330 INVOKE expression is valid.
1331 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1332 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1333 __invoke_result for return types and remove exception specifications.
1334 * testsuite/30_threads/thread/cons/84535.cc: New.
1336 * include/std/future (__async_result_of): Use __invoke_result instead
1339 * include/std/any (any_cast): Use __remove_cvref_t.
1340 * include/std/tuple (__make_tuple): Likewise.
1341 * include/std/type_traits (__remove_cvref_t): Define.
1342 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1343 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1344 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1346 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1348 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1349 ensure overloaded comma not used.
1350 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1351 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1352 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1353 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1354 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1355 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1356 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1358 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1361 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1362 indices to unsigned.
1363 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1364 as failure. Refactor error handling.
1365 * testsuite/27_io/ios_base/storage/68197.cc: New.
1369 * include/bits/gslice_array.h (gslice_array): Define default
1370 constructor as deleted, as per C++11 standard.
1371 * include/bits/mask_array.h (mask_array): Likewise.
1372 * include/bits/slice_array.h (slice_array): Likewise.
1373 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1374 to namespace __detail.
1375 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1377 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1378 of data members in closure objects.
1379 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1380 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1382 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1383 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1384 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1385 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1386 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1387 using-declarations to namespace std.
1388 * testsuite/26_numerics/valarray/83860.cc: New.
1390 * testsuite/backward/strstream_move.cc: Remove duplicate function
1394 * include/backward/strstream (strstreambuf): Define move constructor
1395 and move assignment operator.
1396 (istrstream, ostrstream, strstream): Likewise.
1397 * testsuite/backward/strstream_move.cc: New.
1399 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1402 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1403 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1404 * configure: Regenerate.
1405 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1406 based on ENABLE_FLOAT128.
1407 * include/Makefile.in: Regenerate.
1408 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1409 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1410 _GLIBCXX_USE_FLOAT128.
1412 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1414 * configure: Regenerated.
1416 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1418 * configure: Regenerated.
1420 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1421 Jakub Jelinek <jakub@redhat.com>
1424 * src/c++11/Makefile.am: Don't generate debuginfo again for
1425 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1426 * src/c++11/Makefile.in: Regenerate.
1428 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1431 * testsuite/30_threads/thread/cons/terminate.cc
1432 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1434 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1437 * configure: Regenerate.
1439 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1441 * testsuite/experimental/filesystem/file_status/1.cc: Add
1442 -DUSE_FILESYSTEM_TS to dg-options.
1443 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1445 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1446 * testsuite/experimental/filesystem/iterators/
1447 recursive_directory_iterator.cc: Likewise.
1448 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1449 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1450 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1451 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1452 * testsuite/experimental/filesystem/operations/create_directories.cc:
1454 * testsuite/experimental/filesystem/operations/create_directory.cc:
1456 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1458 * testsuite/experimental/filesystem/operations/current_path.cc:
1460 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1461 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1462 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1463 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1464 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1466 * testsuite/experimental/filesystem/operations/permissions.cc:
1468 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1470 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1471 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1472 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1473 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1475 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1476 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1477 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1478 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1479 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1480 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1481 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1482 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1483 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1484 * testsuite/experimental/filesystem/path/construct/default.cc:
1486 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1487 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1488 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1490 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1492 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1494 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1496 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1498 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1500 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1502 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1504 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1505 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1507 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1508 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1509 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1511 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1513 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1515 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1517 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1518 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1519 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1521 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1522 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1524 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1526 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1528 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1530 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1532 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1534 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1536 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1537 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1540 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
1542 * src/c++11/Makefile.am: Fix sed command.
1543 * src/c++11/Makefile.in: Regenerate.
1545 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1546 handle mangled names starting with double underscores on darwin.
1547 * src/c++11/Makefile.in: Regenerate.
1549 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
1551 * src/c++11/Makefile.am: Fix comment.
1552 * src/c++11/Makefile.in: Regenerate.
1553 * src/c++11/cxx11-ios_failure.cc: Fix comment.
1554 * src/c++98/ios_failure.cc: Likewise.
1556 * src/c++11/ios.cc: Remove redundant macro definition.
1558 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
1560 * doc/xml/manual/abi.xml: Document header locations in recent
1562 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1563 * doc/xml/manual/spine.xml: Update copyright years.
1564 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1565 undefined behaviour.
1566 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1567 * doc/html/*: Regenerate.
1569 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1571 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1572 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1573 * doc/xml/manual/containers.xml: Likewise.
1574 * doc/xml/manual/debug_mode.xml: Likewise.
1575 * doc/xml/manual/extensions.xml: Likewise.
1576 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1577 * doc/xml/manual/using.xml: Likewise.
1578 * doc/xml/manual/utilities.xml: Likewise.
1581 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1582 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1583 * src/c++11/Makefile.in: Regenerate.
1584 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1586 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1587 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1588 * src/c++98/ios_failure.cc (__construct_ios_failure)
1589 (__destroy_ios_failure, is_ios_failure_handler): New functions.
1590 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1591 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1592 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1593 handler types, to always catch std::ios_base::failure.
1594 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1595 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1596 exceptions_failbit.cc: Likewise.
1597 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1598 exceptions_failbit.cc: Likewise.
1599 * testsuite/27_io/basic_istream/extractors_other/char/
1600 exceptions_null.cc: Likewise.
1601 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1602 exceptions_null.cc: Likewise.
1603 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1604 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1605 * testsuite/27_io/basic_ostream/inserters_other/char/
1606 exceptions_null.cc: Likewise.
1607 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1608 exceptions_null.cc: Likewise.
1609 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1611 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
1613 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1614 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1616 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
1619 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1621 * testsuite/20_util/variant/85183.cc: New.
1623 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
1625 * include/std/variant (__get): Qualify calls to avoid ADL.
1626 (__select_index): Adjust whitespace.
1627 (variant): Add using-declaration to workaround Clang bug.
1629 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
1632 * include/bits/stl_function.h (greater::__not_overloaded)
1633 (less::__not_overloaded, greater_equal::__not_overloaded)
1634 (less_equal::__not_overloaded): Fix ambiguous specializations.
1635 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1636 tests for type with overloaded operators.
1638 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1641 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1642 xfail execution on 32-bit Solaris/x86.
1644 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
1646 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1647 VERIFY instead of assert.
1648 * testsuite/20_util/hash/84998.cc: New test.
1649 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1650 copy of test adjusted for Debug Mode.
1651 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1654 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
1657 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1658 * include/std/bitset: Likewise.
1659 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1661 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1662 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1663 * include/bits/stl_set.h (std::set<>): Likewise.
1664 * include/bits/unordered_map.h (std::unordered_map<>): Fix
1665 _Hash_merge_helper friend declaration.
1666 (std::unordered_multimap<>): Likewise.
1667 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1668 (std::unordered_multiset<>): Likewise.
1670 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1672 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1673 trailing slash for domain level link.
1674 * doc/xml/faq.xml: Ditto.
1675 * doc/xml/manual/appendix_free.xml (software): Ditto.
1676 * doc/xml/manual/intro.xml: Ditto.
1677 * doc/xml/manual/spine.xml: Ditto.
1678 * doc/xml/spine.xml: Ditto.
1680 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1682 * doc/xml/manual/documentation_hacking.xml: Adjust link to
1685 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
1687 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1688 to compile as C++98.
1690 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
1693 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1694 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1695 to ensure total order for pointers.
1696 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1697 Add operator() overloads for pointer arguments and make generic
1698 overloads dispatch to new _S_cmp functions when comparisons would
1699 use built-in operators for pointers.
1700 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1702 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1706 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1707 * configure: Regenerate.
1708 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1709 (aligned_alloc): Add using-declaration.
1710 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1712 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
1714 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1715 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1718 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
1721 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1722 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1724 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1725 src/filesystem/std-ops.cc (create_dir): Likewise.
1727 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
1729 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1730 (StdListIteratorPrinter): Inherit from latter.
1731 (StdFwdListIteratorPrinter): New, inherit from latter.
1732 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1733 when iterator has no associated container.
1734 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1735 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1737 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1738 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1740 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1743 * include/std/optional (_Optional_payload): Split into multiple
1744 specializations that can handle different cases of trivial or
1745 non-trivial assignment operators.
1746 * testsuite/20_util/optional/84601.cc: New.
1747 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1749 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
1752 * include/bits/parse_numbers.h (_Number_help): Add partial
1753 specialization to handle digit separators. Adjust partial
1754 specialization for recursion temrination to require _Pow == 1ULL.
1755 * testsuite/20_util/duration/literals/84671.cc: New
1757 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
1759 Implement the missing bits of LWG 2769
1760 * include/std/any (any_cast(const any&)): Add static_assert.
1761 (any_cast(any&)): Likewise.
1762 (any_cast(any&&)): Likewise, and remove the handling
1763 for copyable-but-not-movable type.
1764 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1765 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1768 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
1771 * include/std/thread (thread::__make_invoker): Construct tuple
1772 directly instead of using make_tuple.
1773 * testsuite/30_threads/async/84532.cc: New.
1774 * testsuite/30_threads/thread/84532.cc: New.
1776 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
1778 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1779 (template<> __aligned_buffer): Define as __aligned_membuf alias.
1781 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1784 * configure: Regenerate.
1786 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
1789 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1790 * configure: Regenerate.
1791 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1793 * include/Makefile.in: Regenerate.
1795 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
1798 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1799 Add -ffloat-store to options for m68k and ia32.
1801 * doc/xml/faq.xml: Update copyright years.
1802 * doc/html/*: Regenerate.
1805 * include/std/any (any::__do_emplace): Only set _M_manager after
1806 constructing the contained object.
1807 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1808 * testsuite/20_util/any/modifiers/83658.cc: New test.
1810 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
1813 * include/c_global/cstddef (__byte_operand): Define primary template.
1814 * testsuite/18_support/byte/81076.cc: New test.
1816 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
1818 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1819 dg-options and dg-add-options order.
1820 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1821 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1823 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1824 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1826 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1828 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1829 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1831 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1833 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
1835 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
1837 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
1839 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
1841 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
1843 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
1845 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
1846 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
1847 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
1848 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
1849 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
1850 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
1851 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
1852 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
1853 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
1855 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
1857 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
1859 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
1862 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
1864 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
1865 include linux/types.h when checking linux/random.h header.
1866 * config.h.in: Regenerate.
1868 * src/c++11/random.cc: Conditionally include linux/types.h.
1870 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
1872 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
1874 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
1877 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
1878 pattern with exact match for std::cerr.
1880 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1883 * include/bits/random.h (chi_squared_distribution::param): Update
1884 gamma distribution parameter.
1885 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
1889 * include/std/type_traits (has_unique_object_representations_v): Add
1891 * testsuite/20_util/has_unique_object_representations/value.cc: Check
1894 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1896 Make optional conditionally
1897 trivially_{copy,move}_{constructible,assignable}
1898 * include/std/optional (_Optional_payload): Fix the comment in
1899 the class head and turn into a primary and one specialization.
1900 (_Optional_payload::_M_engaged): Strike the NSDMI.
1901 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
1903 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
1905 (_Optional_payload<_Tp, false>::_M_get): Likewise.
1906 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
1907 (_Optional_base_impl): Likewise.
1908 (_Optional_base): Turn into a primary and three specializations.
1909 (optional(nullopt)): Change the base init.
1910 * testsuite/20_util/optional/assignment/8.cc: New.
1911 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
1912 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1914 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1917 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
1918 (get_template_arg_list): New.
1919 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
1921 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
1922 of strings and regular expressions.
1923 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
1924 (FilteringTypePrinter): Add docstring. Match using startswith. Use
1925 strip_inline_namespaces instead of strip_versioned_namespace.
1926 (add_one_type_printer): Prepend namespace to match argument.
1927 (register_type_printers): Add type printers for char16_t and char32_t
1928 string types and for types using cxx11 ABI. Update calls to
1929 add_one_template_type_printer to provide default argument dicts.
1930 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
1931 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
1932 basic_string<unsigned char> and basic_string<signed char>.
1933 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
1934 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
1936 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
1939 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1941 2018-01-13 Tim Shen <timshen@google.com>
1944 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
1945 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
1946 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
1948 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1951 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
1952 Remove dg-xfail-run-if.
1954 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
1956 * include/bits/forward_list.h
1957 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
1958 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
1959 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
1960 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
1961 (_Fwd_list_impl()): Add noexcept qualification.
1962 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
1963 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
1964 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
1965 (_Fwd_list_base()): Default.
1966 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
1967 (_Fwd_list_base(_Fwd_list_base&&)): Default.
1968 (forward_list<>()): Default.
1969 (forward_list<>(forward_list&&)): Default.
1970 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
1971 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
1972 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
1973 * include/bits/forward_list.tcc
1974 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
1975 _M_impl._M_head move assignment.
1976 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
1977 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
1979 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
1982 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
1983 (UniquePointerPrinter): Print correct template argument, not type of
1985 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
1987 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
1989 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
1990 weak_ptr of array types.
1992 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
1995 * include/bits/hashtable_policy.h
1996 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
1998 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
1999 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2000 Add false_type parameter.
2001 (_Insert_base::insert): Adapt.
2002 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2004 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2005 Add __n_elt parameter, defaulted to 1.
2006 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2007 policy _M_need_rehash.
2008 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2009 produce only 1 rehash if necessary.
2010 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2011 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2013 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2014 Jonathan Wakely <jwakely@redhat.com>
2016 PR libstdc++/59253 (partial)
2017 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2018 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2019 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2021 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2022 of unique_ptr printer.
2023 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2024 output of shared_ptr printer.
2026 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
2029 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2030 unnecessary symlink_status call.
2031 (remove_all(const path&, error_code&)): Use filesystem::remove.
2032 * src/filesystem/std-ops.cc: Likewise.
2035 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2039 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2040 report an error for ENOENT.
2041 (remove_all(const path&)): Fix type of result variable.
2042 (remove_all(const path&, error_code&)): Use non-throwing increment
2043 for directory iterator. Call POSIX remove directly to avoid redundant
2044 calls to symlink_status. Do not report errors for ENOENT.
2045 * src/filesystem/std-ops.cc: Likewise.
2046 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2048 * testsuite/experimental/filesystem/operations/remove_all.cc:
2051 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
2054 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2055 redundant call to ec.clear().
2056 (remove_all(const path&, error_code&))): Do not return an error for
2058 * src/filesystem/std-ops.cc: Likewise.
2059 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2060 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2061 results for non-existent paths.
2062 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2063 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2064 expected results for non-existent paths.
2066 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2067 check status_known once.
2068 * include/experimental/bits/fs_ops.h: Likewise.
2071 * include/std/functional (__is_byte_like): New trait.
2072 (__is_std_equal_to): Remove.
2073 (__boyer_moore_base_t): Use __is_byte_like instead of
2075 * include/experimental/functional (__is_std_equal_to): Remove.
2076 (__boyer_moore_base_t): Use __is_byte_like instead of
2078 * testsuite/20_util/function_objects/83607.cc: New test.
2080 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2082 Protect optional's deduction guide with the feature macro
2083 * include/std/optional: Use the feature macro.
2085 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2087 Update copyright years.
2089 Copyright (C) 2018 Free Software Foundation, Inc.
2091 Copying and distribution of this file, with or without modification,
2092 are permitted in any medium without royalty provided the copyright
2093 notice and this notice are preserved.