1 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
4 define for C++17 and above.
6 LWG 2993 reference_wrapper<T> conversion from T&&
7 * doc/xml/manual/intro.xml: Document LWG 2993 change.
8 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
9 (reference_wrapper(_Tp&&)): Remove.
10 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
12 (reference_wrapper): Add deduction guide.
13 * testsuite/20_util/reference_wrapper/deduction.cc: New.
14 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
16 LWG 3039 Unnecessary decay in thread and packaged_task
17 * include/std/future (__constrain_pkgdtask): Replace with ...
18 (packaged_task::__not_same): New alias template, using
19 __remove_cvref_t instead of decay.
20 * include/std/thread (thread::__not_same): Add comment.
22 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
24 LWG 3075 basic_string needs deduction guides from basic_string_view
25 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
26 deduction from string views.
27 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
30 LWG 3074 make scalar types non-deduced in valarray non-member functions
31 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
32 scalar parameters to be a non-deduced context.
33 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
35 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
36 * testsuite/26_numerics/valarray/transcend.cc: New.
38 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
39 Move back to <utility>.
40 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
43 P0935R0 Eradicating unnecessarily explicit default constructors
44 * include/backward/strstream (strstreambuf): Add non-explicit default
46 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
48 * include/bits/regex.h (match_results): Likewise.
49 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
51 * testsuite/22_locale/conversions/string/1.cc: Likewise.
52 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
53 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
55 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
56 macro from <utility> and change type to long.
57 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
58 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
61 P0935R0 Eradicating unnecessarily explicit default constructors
62 * include/bits/random.h (uniform_real_distribution::param_type)
63 (normal_distribution::param_type, lognormal_distribution::param_type)
64 (gamma_distribution::param_type, chi_squared_distribution::param_type)
65 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
66 (student_t_distribution::param_type)
67 (bernoulli_distribution::param_type)
68 (binomial_distribution::param_type)
69 (geometric_distribution::param_type)
70 (negative_binomial_distribution::param_type)
71 (poisson_distribution::param_type)
72 (exponential_distribution::param_type)
73 (weibull_distribution::param_type)
74 (extreme_value_distribution::param_type): Add non-explicit default
75 constructors. Remove default argument for first parameter of explicit
77 * include/bits/uniform_int_dist.h
78 (uniform_int_distribution::param_type): Likewise.
80 (beta_distribution::param_type, rice_distribution::param_type)
81 (nakagami_distribution::param_type, pareto_distribution::param_type)
82 (k_distribution::param_type, arcsine_distribution::param_type)
83 (hoyt_distribution::param_type, triangular_distribution::param_type)
84 (von_mises_distribution::param_type)
85 (hypergeometric_distribution::param_type)
86 (logistic_distribution::param_type)
87 (uniform_inside_sphere_distribution::param_type): Likewise.
88 (uniform_on_sphere_distribution::param_type): Make default constructor
90 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
91 Test param_type for non-explicit default constructor.
92 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
94 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
96 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
98 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
100 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
102 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
104 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
106 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
108 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
110 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
112 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
114 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
116 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
118 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
120 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
122 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
124 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
126 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
128 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
130 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
131 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
132 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
133 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
135 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
136 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
137 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
138 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
140 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
141 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
142 * testsuite/ext/random/triangular_distribution/cons/default.cc:
144 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
146 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
148 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
151 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
152 Jonathan Wakely <jwakely@redhat.com>
155 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
156 Default-construct new elements before moving existing ones.
157 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
160 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
163 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
165 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
166 Use node allocator to create and destroy elements.
167 (forward_list::_Tp_alloc_type): Remove unused typedef.
168 (forward_list::_Alloc_traits): Use allocator_traits instead of
169 __gnu_cxx::__alloc_traits.
171 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
173 * include/debug/helper_functions.h
174 (__gnu_debug::_Safe_iterator<>): Add declaration.
175 (__can_advance(_Ite, _Size)): New.
176 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
177 * include/debug/functions.h
178 (__gnu_debug::_Safe_iterator<>): Remove declaration.
179 * include/debug/stl_iterator.h
180 (__can_advance(const _Safe_iterator<>&)): New definition.
181 * include/debug/stl_iterator.h
182 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
183 (__can_advance(const std::move_iterator<>&, _Size)): New.
184 * include/debug/macros.h (__glibcxx_check_can_increment): New.
185 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
186 * include/bits/stl_algobase.h (fill_n): Use latter.
187 * testsuite/25_algorithms/fill_n/2.cc: New.
188 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
189 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
190 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
191 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
193 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
194 (__glibcxx_requires_can_decrement_range): New.
196 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
198 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
199 (__glibcxx_check_can_decrement_range): New.
200 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
201 __glibcxx_requires_can_increment_range.
202 (std::move(_II, _II, _OI)): Likewise.
203 (std::copy_backward(_BI, _BI, _BI2)): Use
204 __glibcxx_requires_can_decrement_range.
205 (std::move_backward(_BI, _BI, _BI2)): Likewise.
206 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
207 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
208 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
209 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
210 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
211 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
213 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
215 P0935R0 Eradicating unnecessarily explicit default constructors
216 * include/bits/random.h (linear_congruential_engine)
217 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
218 (uniform_real_distribution, normal_distribution)
219 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
220 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
221 (bernoulli_distribution, binomial_distribution,geometric_distribution)
222 (negative_binomial_distribution, exponential_distribution)
223 (weibull_distribution, extreme_value_distribution): Add non-explicit
224 default constructors. Remove default argument for first parameter of
225 explicit constructors.
226 (piecewise_constant_distribution, piecewise_linear_distribution):
227 Make default constructor non-explicit.
228 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
229 non-explicit default constructors. Remove default argument for first
230 parameter of explicit constructor.
232 (simd_fast_mersenne_twister_engine, beta_distribution)
233 (rice_distribution, nakagami_distribution, pareto_distribution)
234 (k_distribution, arcsine_distribution, hoyt_distribution)
235 (triangular_distribution, von_mises_distribution)
236 (hypergeometric_distribution, logistic_distribution)
237 (uniform_inside_sphere_distribution): Likewise.
238 (uniform_on_sphere_distribution): Make default constructor
240 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
241 Test for non-explicit default constructor. Fix references to standard.
242 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
244 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
246 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
248 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
250 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
252 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
254 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
256 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
258 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
260 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
262 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
264 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
266 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
268 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
270 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
272 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
274 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
276 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
278 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
280 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
281 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
282 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
283 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
285 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
286 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
287 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
288 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
290 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
291 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
292 * testsuite/ext/random/triangular_distribution/cons/default.cc:
294 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
296 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
298 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
300 * testsuite/util/testsuite_common_types.h
301 (implicitly_default_constructible): New helper.
303 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
305 * include/bits/ios_base.h (ios::Init::Init(const Init&))
306 (ios::Init::operator=): Define as defaulted.
307 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
309 * include/bits/stream_iterator.h (istream_iterator::operator=)
310 (ostream_iterator::operator=): Likewise.
311 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
313 * include/std/bitset (bitset::reference::reference(const reference&)):
315 * include/std/complex (complex<float>::complex(const complex&))
316 (complex<double>::complex(const complex&))
317 (complex<long double>::complex(const complex&)): Likewise.
319 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
321 * include/bits/regex.h (sub_match): Add noexcept to default
322 constructor and length observer.
323 (match_results): Add noexcept to default constructor and observers
324 with no preconditions. Define destructor as defaulted.
325 (operator==, operator!=, swap): Add noexcept.
326 (regex_iterator): Add default member initializers and define default
327 constructor and destructor as defaulted. Add noexcept to equality
328 and dereference operators.
330 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
333 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
334 (_Safe_iterator_base::_M_detach_single()): Likewise.
335 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
336 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
338 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
340 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
343 2018-06-06 Jakub Jelinek <jakub@redhat.com>
346 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
347 rather than __cpp_transactional_memory >= 201505L.
349 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
352 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
353 Define new partial specialization.
354 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
356 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
357 value not reference for iteration.
358 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
360 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
361 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
364 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
366 * include/std/type_traits: Fix comment typos.
368 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
370 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
371 * testsuite/experimental/filesystem/operations/read_symlink.cc:
374 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
376 * include/bits/stl_tempbuf.h
377 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
378 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
379 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
380 * include/bits/stl_algo.h (__stable_partition): Adapt.
381 (__inplace_merge): Adapt.
382 (__stable_sort): Adapt.
384 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
387 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
388 unconditionally. Remove redundant declaration.
389 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
392 * include/bits/postypes.h (fpos): Define special members as defaulted.
395 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
396 the static variable correctly.
398 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
400 PR libstdc++/78870 support std::filesystem on Windows
401 * config.h.in: Regenerate.
402 * configure: Regenerate.
403 * configure.ac: Check for link, readlink and symlink.
404 * include/bits/fs_path.h (path::operator/=(const path&)): Move
405 definition out of class body.
406 (path::is_absolute(), path::_M_append(path)): Likewise.
407 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
408 (operator>>(basic_istream, path&)): Likewise.
409 (u8path): Reorder definitions and fix Windows implementation.
410 (path::is_absolute()): Define inline and fix for Windows.
411 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
412 Define POSIX version inline.
413 (path::_M_append(path)): Define inline.
414 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
415 definition out of class body.
416 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
418 (operator>>(basic_istream, path&)): Likewise.
419 (path::is_absolute()): Define inline and fix for Windows.
420 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
421 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
422 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
423 Define as adaptors for Windows functions/types or as
424 using-declarations for POSIX functions/types.
425 (_Dir_base, get_file_type): Qualify names to use declarations from
426 __gnu_posix namespace.
427 (_Dir_base::is_dor_or_dotdot): New helper functions.
428 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
429 names to use declarations from __gnu_posix namespace.
430 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
431 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
432 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
433 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
434 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
435 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
436 Define as adaptors for Windows functions/types or as
437 using-declarations for POSIX functions/types.
438 (stat_type, do_copy_file): Qualify names to use declarations from
439 __gnu_posix namespace.
440 (do_space): Declare new function.
441 (make_file_type): Only use S_ISLNK if defined.
442 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
443 path::value_type not char.
444 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
445 names to use declarations from __gnu_posix namespace.
446 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
447 add implementation for Windows.
448 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
449 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
450 [!_PC_PATH_MAX]: Don't use pathconf.
451 [PATH_MAX]: Use if defined.
452 (filesystem::current_path(const path&, error_code&))
453 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
454 (filesystem::last_write_time, filesystem::permissions): Use names
456 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
457 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
458 implementation for Windows.
459 (filesystem::rename, filesystem::resize_file): Use names from
461 (filesystem::space): Use do_space.
462 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
463 (filesystem::status, filesystem::symlink_status): Use names from
465 (filesystem::temp_directory_path): Add implementation for Windows.
466 * src/filesystem/path.cc (dot): Define constant.
467 (path::replace_extension): Use dot.
468 (path::_M_find_extension): Likewise. Use path::string_type not
470 (path::_M_split_cmpts): Use dot.
471 (filesystem_error::_M_get_what): Use u8string() not native().
472 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
473 Qualify names to use declarations from __gnu_posix namespace.
474 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
476 (filesystem::absolute(const path&, error_code&)): Add implementation
478 (char_ptr, filesystem::canonical): Use path::value_type not char.
479 (do_copy_file): Use names from __gnu_posix.
480 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
482 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
483 names to use declarations from __gnu_posix namespace.
484 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
485 add implementation for Windows.
486 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
487 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
488 [!_PC_PATH_MAX]: Don't use pathconf.
489 [PATH_MAX]: Use if defined.
490 (filesystem::current_path(const path&, error_code&))
491 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
492 (filesystem::last_write_time, filesystem::permissions): Use names
494 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
495 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
496 implementation for Windows.
497 (filesystem::rename, filesystem::resize_file): Use names from
500 (filesystem::space): Use do_space.
501 (filesystem::status, filesystem::symlink_status): Use names from
503 (filesystem::temp_directory_path): Add implementation for Windows.
504 * src/filesystem/std-path.cc
505 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
507 (dot): Define constant.
508 (path::replace_extension, is_dot): Use dot.
509 (path::lexically_normal): Check _M_type instead of calling
510 non-existent function.
511 (path::_M_find_extension): Use dot. Use path::string_type not
513 (path::_M_split_cmpts): Use dot.
514 (filesystem_error::_M_get_what): Use u8string() not native().
515 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
517 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
519 * testsuite/27_io/filesystem/operations/absolute.cc: Use
520 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
521 * testsuite/27_io/filesystem/operations/canonical.cc: Use
522 path::string() to get narrow string, not path::native().
523 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
524 with std::filesystem::path not std::basic_string.
525 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
526 * testsuite/27_io/filesystem/operations/exists.cc: Use
527 __gnu_test::root_path() instead of "/".
528 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
529 fstreams with std::filesystem::path not std::basic_string.
530 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
531 path::string() to get narrow string.
532 * testsuite/27_io/filesystem/operations/space.cc: Check results for
533 errors, expect sensible values otherwise.
534 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
535 helpers for adjusting the environment on Windows.
536 * testsuite/27_io/filesystem/path/append/path.cc: Test
537 Windows-specific behaviour.
538 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
539 of path::string_type objects.
540 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
541 string to wide string on Windows.
542 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
543 for backslash as root-directory.
544 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
545 path::string() to get narrow string.
546 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
548 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
550 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
551 different definintion of absolute paths on Windows.
552 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
554 * testsuite/experimental/filesystem/operations/absolute.cc: Test
556 * testsuite/experimental/filesystem/operations/copy.cc: Construct
557 fstreams with NTCTS not std::basic_string.
558 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
559 * testsuite/experimental/filesystem/operations/exists.cc: Use
560 __gnu_test::root_path() instead of "/".
561 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
562 fstreams with NTCTS not std::basic_string.
563 * testsuite/experimental/filesystem/operations/last_write_time.cc:
564 Use path::string() to get narrow string.
565 * testsuite/experimental/filesystem/operations/space.cc: Use
566 __gnu_test::root_path() instead of "/".
567 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
568 Add helpers for adjusting the environment on Windows.
569 * testsuite/experimental/filesystem/path/append/path.cc: Use
570 path::string() to get narrow strings for comparisons.
571 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
572 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
574 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
575 * testsuite/experimental/filesystem/path/native/string.cc: Use
576 string_type not std::string.
577 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
578 Adjust for different definintion of absolute paths on Windows.
579 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
581 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
584 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
587 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
588 uint_least16_t and uint_least32_t.
589 (__make_unsigned<wchar_t>): Define unconditionally.
590 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
592 (__make_unsigned_selector_base): New type to provide helper templates.
593 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
594 __make_unsigned_selector_base helpers.
595 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
596 (__make_signed_selector<_Tp, true, false>): Remove intermediate
598 (__make_signed<wchar_t>, __make_signed<char16_t>)
599 (__make_signed<char32_t>)): Define unconditionally.
600 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
601 wchar_t, char16_t and char32_t are transformed correctly.
602 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
604 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
605 wchar_t, char16_t and char32_t are transformed correctly.
606 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
609 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
611 * include/std/variant (__erased_dtor): Qualify call to __get.
613 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
615 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
616 (_Rb_tree(const allocator_type&)): Use latter.
617 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
618 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
619 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
620 * include/bits/stl_multimap.h
621 (multimap(const allocator_type&)): Likewise.
622 (multimap(initializer_list<value_type>, const allocator_type&)):
624 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
626 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
627 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
628 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
629 * include/bits/stl_multiset.h
630 (multiset(const allocator_type&)): Likewise.
631 (multiset(initializer_list<value_type>, const allocator_type&)):
633 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
636 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
639 * src/c++11/debug.cc: Remove backtrace usage.
641 2018-05-24 Maya Rashish <coypu@sdf.org>
644 * crossconfig.m4: Test for aligned_alloc on netbsd.
645 * configure: Regenerate.
647 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
651 * include/bits/atomic_base.h (__atomic_base::value_type)
652 (__atomic_base::difference_type): Add new typedefs.
653 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
654 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
655 (atomic<T*>::operator++, atomic<T*>::operator--)
656 (atomic<T*>::operator+=, atomic<T*>::operator-=)
657 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
658 to enforce C++17 requirement on pointer arithmetic.
659 (__atomic_val_t, __atomic_diff_t): New alias templates.
660 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
661 (atomic_compare_exchange_weak_explicit)
662 (atomic_compare_exchange_strong_explicit, atomic_store)
663 (atomic_exchange, atomic_compare_exchange_weak)
664 (atomic_compare_exchange_strong): Use __atomic_val_t to make
665 scalar parameters be non-deduced contexts.
666 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
667 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
668 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
670 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
671 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
672 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
673 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
674 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
676 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
677 * testsuite/29_atomics/atomic/69769.cc: New test.
678 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
679 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
680 Disable test for C++17 and later.
681 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
682 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
683 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
686 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
688 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
689 template to alias template.
690 (path::__value_type_is_char): Use remove_const_t.
691 (path:_S_string_from_iter): New helper function.
692 (path::_S_convert(InputIter, __null_terminated))
693 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
694 Use _S_string_from_iter.
695 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
697 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
698 Change from class template to alias template.
699 (path::__value_type_is_char): Use remove_const.
700 (path:_S_string_from_iter): New helper function.
701 (path::_S_convert(InputIter, __null_terminated))
702 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
703 Use _S_string_from_iter.
704 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
706 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
707 string equality, not path equivalence.
708 * testsuite/27_io/filesystem/path/construct/format.cc: Check
709 construction from std::string and std::wstring and input iterators.
710 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
711 construction from iterators.
712 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
713 exact string equality, not path equivalence.
714 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
715 construction from iterators.
717 * include/bits/fs_path.h (path::_M_type): Change default member
718 initializer to _Filename.
719 (path::begin): Create past-the-end iterator for empty path.
720 * src/filesystem/std-path.cc (path::remove_filename()): Remove
722 (path::has_relative_path()): Return false for empty filenames.
723 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
724 Fix offset of empty final component.
725 * testsuite/27_io/filesystem/path/itr/components.cc: New.
726 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
728 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
730 Add support for opening file streams from wide character strings.
731 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
732 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
734 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
735 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
736 Declare new overload.
737 * configure.ac: Check for _wfopen.
738 * crossconfig.m4: Likewise.
739 * configure: Regenerate.
740 * config.h.in: Regenerate.
741 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
742 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
744 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
745 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
746 Declare new overload.
747 [_GLIBCXX_HAVE__WFOPEN]
748 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
749 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
750 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
751 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
752 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
753 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
755 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
756 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
757 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
758 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
759 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
760 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
761 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
763 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
766 * include/bits/stl_tree.h
767 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
770 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
772 * src/filesystem/std-ops.cc (absolute): Report an error for empty
774 (weakly_canonical(const path&)): Do not call canonical on empty path.
775 (weakly_canonical(const path&, error_code&)): Likewise.
776 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
779 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
780 dg-require-filesystem-ts.
783 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
784 initialize base class to avoid warnings.
786 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
788 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
789 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
790 little_endian element in bitmask.
791 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
792 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
794 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
796 * include/bits/stl_tree.h
797 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
798 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
799 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
800 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
801 * include/debug/map.h
802 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
803 * include/debug/multimap.h
804 (multimap(multimap&&, const_allocator_type&)): Likewise.
805 * include/debug/set.h
806 (set(set&&, const_allocator_type&)): Likewise.
807 * include/debug/multiset.h
808 (multiset(multiset&&, const_allocator_type&)): Likewise.
809 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
811 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
813 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
815 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
817 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
819 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
821 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
823 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
826 2018-05-18 Jason Merrill <jason@redhat.com>
828 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
829 for conversion to const_iterator. Add defaulted copy ops.
830 * libsupc++/new (bad_alloc): Add defaulted copy ops.
831 * libsupc++/exception.h (exception): Add defaulted copy ops.
832 * include/std/system_error (system_error): Add defaulted copy ops.
833 * include/std/stdexcept (domain_error, invalid_argument)
834 (length_error, out_of_range, range_error, overflow_error)
835 (underflow_error): Add defaulted copy ops.
836 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
838 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
839 * include/ext/throw_allocator.h (condition_base): Add defaulted
840 default and copy ctor and copy assignment.
842 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
845 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
846 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
847 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
848 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
850 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
852 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
853 braces around body of do-while.
854 * testsuite/28_regex/basic_regex/85098.cc: New
856 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
859 * src/filesystem/path.cc (path::preferred_separator): Add used
861 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
864 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
865 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
866 Refactor to separate non-throwing and throwing implementations.
867 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
868 if constructing the object throws.
870 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
873 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
874 (linear_congruential_engine, mersenne_twister_engine)
875 (subtract_with_carry_engine, discard_block_engine)
876 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
877 constrain function templates taking seed sequences.
878 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
879 (mersenne_twister_engine::seed(_Sseq&))
880 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
882 * include/ext/random (simd_fast_mersenne_twister_engine): Use
883 __is_seed_seq to constrain function templates taking seed sequences.
884 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
885 Change return type to match declaration.
886 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
888 * testsuite/26_numerics/random/independent_bits_engine/cons/
890 * testsuite/26_numerics/random/linear_congruential_engine/cons/
892 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
894 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
895 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
897 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
899 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
903 * include/bits/fs_path.h (path::is_absolute()): Use same definition
904 for all operating systems.
905 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
906 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
907 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
908 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
910 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
911 unused <vector> header.
912 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
913 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
914 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
915 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
916 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
918 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
920 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
921 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
922 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
923 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
924 * testsuite/experimental/filesystem/path/decompose/extension.cc:
926 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
927 * testsuite/experimental/filesystem/path/query/has_extension.cc:
929 * testsuite/experimental/filesystem/path/query/has_filename.cc:
931 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
933 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
935 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
937 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
939 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
941 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
942 * testsuite/experimental/filesystem/path/query/is_relative.cc:
946 * include/bits/fs_path.h (path::operator/=, path::append): Construct
947 temporary path before calling _M_append.
948 (path::_M_append): Change parameter to path and implement C++17
950 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
951 and more examples from the standard.
952 * testsuite/27_io/filesystem/path/append/source.cc: New.
953 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
954 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
956 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
957 __invoke to prevent ADL.
959 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
962 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
963 exceptions from _M_terminate_output().
964 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
965 exceptions from close().
966 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
968 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
969 (__valarray_get_storage): Call operator new directly. Remove ignored
970 top-level restrict qualifier and add malloc attribute instead.
971 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
974 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
975 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
978 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
980 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
982 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
985 * testsuite/20_util/variant/80165.cc: New.
987 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
989 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
990 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
991 of C++11 containers with Debug Mode support.
992 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
993 * doc/html/*: Regenerate.
995 2018-05-10 Jason Merrill <jason@redhat.com>
997 * include/bits/regex_compiler.h (_S_cache_size): Change from
998 function to variable.
1000 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1002 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1003 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1004 argument defaulted to +1. Doxy comments on same.
1005 * testsuite/special_functions/02_assoc_legendre/
1006 check_value.cc: Regen.
1007 * testsuite/tr1/5_numerical_facilities/special_functions/
1008 02_assoc_legendre/check_value.cc: Regen.
1010 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1013 * include/bits/c++config.h (__replacement_assert): Add linkage
1015 * include/bits/std_abs.h: Add comment to closing brace of block.
1016 * include/c_global/cstddef: Add linkage specification.
1017 * include/c_global/cstring: Likewise.
1018 * include/c_global/cwchar: Likewise.
1020 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1022 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1024 (_Safe_iterator<>::_S_constant()): ...that.
1025 * include/debug/safe_local_iterator.h
1026 (_Safe_local_iterator<>::_M_constant()): Rename in...
1027 (_Safe_local_iterator<>::_S_constant()): ...that.
1028 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1029 (_Iterator_state::__rbegin): New.
1030 (_Iterator_state::__rmiddle): New.
1031 (_Iterator_state::__rend): New.
1032 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1033 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1035 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1036 _Is_iterator)): Likewise.
1037 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1038 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1039 _Is_iterator)): New.
1040 (_Parameter(std::reverse_iterator<> const&, const char*,
1041 _Is_iterator)): New.
1042 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1043 const char*, _Is_iterator)): New.
1044 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1046 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1047 _Is_iterator)): New.
1048 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1049 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1050 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1052 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1054 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1055 Use constexpr if in C++17 mode.
1056 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1057 Copy from const object.
1058 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1060 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1062 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1063 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1066 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1067 * include/debug/functions.h (__check_valid_range): Use latter.
1068 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1070 * include/debug/deque
1071 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1072 * include/debug/forward_list
1073 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1075 * include/debug/list
1076 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1077 * include/debug/list
1078 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1079 * include/debug/map.h
1080 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1081 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1083 * include/debug/multimap.h
1084 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1085 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1086 const _Alloc&)): Likewise.
1087 * include/debug/set.h
1088 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1089 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1091 * include/debug/multiset.h
1092 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1093 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1094 const _Alloc&)): Likewise.
1095 * include/debug/string
1096 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1098 * include/debug/unordered_map
1099 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1101 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1102 const _Alloc&)): Likewise.
1103 * include/debug/unordered_set
1104 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1106 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1107 const _Alloc&)): Likewise.
1108 * include/debug/vector
1109 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1111 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1112 (_Error_formatter(const char*, unsigned int)): Adapt.
1113 (_Error_formatter::_M_at): Rename in...
1114 (_Error_formatter::_S_at): ...that and adapt.
1115 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1116 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1117 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1120 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1122 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1123 Use normal std::vector even in Debug Mode.
1126 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1127 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1128 * include/Makefile.in: Regenerate.
1129 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1130 within conditional block.
1132 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1134 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1135 C++17 Filesystem implementation also needs -lstdc++fs.
1138 * include/bits/fs_path.h (operator/): Permit copy elision.
1139 * include/experimental/bits/fs_path.h (operator/): Likewise.
1141 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1143 Moar PR libstdc++/80506
1144 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1145 Fix magic number used in loop condition.
1147 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1149 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1150 * include/std/optional (_Optional_payload): Add noexcept to default
1151 constructor. Re-indent.
1152 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1153 constructor for copying disengaged payloads.
1154 (_Optional_payload<_Tp, true, false, true>): Likewise.
1155 (_Optional_payload<_Tp, true, true, false>): Likewise.
1156 (_Optional_payload<_Tp, true, false, false>): Likewise.
1157 * testsuite/20_util/optional/cons/85642.cc: New.
1158 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1160 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1163 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1164 inline definitions instead of using-declarations.
1165 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1166 * testsuite/tr1/5_numerical_facilities/special_functions/
1167 07_conf_hyperg/compile_cxx17.cc: New.
1168 * testsuite/tr1/5_numerical_facilities/special_functions/
1169 17_hyperg/compile_cxx17.cc: New.
1172 * include/std/variant (visit): Qualify std::get call.
1174 PR libstdc++/85632 use uintmax_t for arithmetic
1175 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1176 arithmetic in result type.
1177 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1178 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1179 is greater than free space.
1180 * testsuite/experimental/filesystem/operations/space.cc: New.
1182 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1183 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1185 * testsuite/20_util/remove_cvref/value.cc: New.
1186 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1188 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1189 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1190 (append(const basic_string&, size_type, size_type)
1191 (assign(const basic_string&, size_type, size_type)
1192 (insert(size_type, const basic_string&, size_type, size_type)
1193 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1194 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1195 Add default arguments (LWG 2268).
1196 [_GLIBCXX_USE_CXX11_ABI=0]
1197 (append(const basic_string&, size_type, size_type)
1198 (assign(const basic_string&, size_type, size_type)
1199 (insert(size_type, const basic_string&, size_type, size_type)
1200 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1201 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1203 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1206 * include/std/thread (thread::__not_same): New SFINAE helper.
1207 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1208 first argument is not a std::thread. Add static assertion to check
1209 INVOKE expression is valid.
1210 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1211 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1212 __invoke_result for return types and remove exception specifications.
1213 * testsuite/30_threads/thread/cons/84535.cc: New.
1215 * include/std/future (__async_result_of): Use __invoke_result instead
1218 * include/std/any (any_cast): Use __remove_cvref_t.
1219 * include/std/tuple (__make_tuple): Likewise.
1220 * include/std/type_traits (__remove_cvref_t): Define.
1221 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1222 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1223 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1225 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1227 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1228 ensure overloaded comma not used.
1229 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1230 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1231 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1232 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1233 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1234 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1235 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1237 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1240 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1241 indices to unsigned.
1242 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1243 as failure. Refactor error handling.
1244 * testsuite/27_io/ios_base/storage/68197.cc: New.
1248 * include/bits/gslice_array.h (gslice_array): Define default
1249 constructor as deleted, as per C++11 standard.
1250 * include/bits/mask_array.h (mask_array): Likewise.
1251 * include/bits/slice_array.h (slice_array): Likewise.
1252 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1253 to namespace __detail.
1254 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1256 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1257 of data members in closure objects.
1258 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1259 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1261 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1262 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1263 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1264 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1265 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1266 using-declarations to namespace std.
1267 * testsuite/26_numerics/valarray/83860.cc: New.
1269 * testsuite/backward/strstream_move.cc: Remove duplicate function
1273 * include/backward/strstream (strstreambuf): Define move constructor
1274 and move assignment operator.
1275 (istrstream, ostrstream, strstream): Likewise.
1276 * testsuite/backward/strstream_move.cc: New.
1278 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1281 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1282 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1283 * configure: Regenerate.
1284 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1285 based on ENABLE_FLOAT128.
1286 * include/Makefile.in: Regenerate.
1287 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1288 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1289 _GLIBCXX_USE_FLOAT128.
1291 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1293 * configure: Regenerated.
1295 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1297 * configure: Regenerated.
1299 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1300 Jakub Jelinek <jakub@redhat.com>
1303 * src/c++11/Makefile.am: Don't generate debuginfo again for
1304 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1305 * src/c++11/Makefile.in: Regenerate.
1307 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1310 * testsuite/30_threads/thread/cons/terminate.cc
1311 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1313 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1316 * configure: Regenerate.
1318 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1320 * testsuite/experimental/filesystem/file_status/1.cc: Add
1321 -DUSE_FILESYSTEM_TS to dg-options.
1322 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1324 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1325 * testsuite/experimental/filesystem/iterators/
1326 recursive_directory_iterator.cc: Likewise.
1327 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1328 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1329 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1330 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1331 * testsuite/experimental/filesystem/operations/create_directories.cc:
1333 * testsuite/experimental/filesystem/operations/create_directory.cc:
1335 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1337 * testsuite/experimental/filesystem/operations/current_path.cc:
1339 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1340 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1341 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1342 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1343 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1345 * testsuite/experimental/filesystem/operations/permissions.cc:
1347 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1349 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1350 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1351 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1352 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1354 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1355 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1356 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1357 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1358 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1359 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1360 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1361 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1362 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1363 * testsuite/experimental/filesystem/path/construct/default.cc:
1365 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1366 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1367 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1369 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1371 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1373 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1375 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1377 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1379 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1381 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1383 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1384 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1386 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1387 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1388 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1390 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1392 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1394 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1396 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1397 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1398 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1400 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1401 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1403 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1405 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1407 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1409 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1411 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1413 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1415 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1416 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1419 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
1421 * src/c++11/Makefile.am: Fix sed command.
1422 * src/c++11/Makefile.in: Regenerate.
1424 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1425 handle mangled names starting with double underscores on darwin.
1426 * src/c++11/Makefile.in: Regenerate.
1428 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
1430 * src/c++11/Makefile.am: Fix comment.
1431 * src/c++11/Makefile.in: Regenerate.
1432 * src/c++11/cxx11-ios_failure.cc: Fix comment.
1433 * src/c++98/ios_failure.cc: Likewise.
1435 * src/c++11/ios.cc: Remove redundant macro definition.
1437 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
1439 * doc/xml/manual/abi.xml: Document header locations in recent
1441 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1442 * doc/xml/manual/spine.xml: Update copyright years.
1443 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1444 undefined behaviour.
1445 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1446 * doc/html/*: Regenerate.
1448 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1450 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1451 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1452 * doc/xml/manual/containers.xml: Likewise.
1453 * doc/xml/manual/debug_mode.xml: Likewise.
1454 * doc/xml/manual/extensions.xml: Likewise.
1455 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1456 * doc/xml/manual/using.xml: Likewise.
1457 * doc/xml/manual/utilities.xml: Likewise.
1460 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1461 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1462 * src/c++11/Makefile.in: Regenerate.
1463 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1465 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1466 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1467 * src/c++98/ios_failure.cc (__construct_ios_failure)
1468 (__destroy_ios_failure, is_ios_failure_handler): New functions.
1469 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1470 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1471 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1472 handler types, to always catch std::ios_base::failure.
1473 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1474 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1475 exceptions_failbit.cc: Likewise.
1476 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1477 exceptions_failbit.cc: Likewise.
1478 * testsuite/27_io/basic_istream/extractors_other/char/
1479 exceptions_null.cc: Likewise.
1480 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1481 exceptions_null.cc: Likewise.
1482 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1483 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1484 * testsuite/27_io/basic_ostream/inserters_other/char/
1485 exceptions_null.cc: Likewise.
1486 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1487 exceptions_null.cc: Likewise.
1488 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1490 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
1492 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1493 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1495 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
1498 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1500 * testsuite/20_util/variant/85183.cc: New.
1502 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
1504 * include/std/variant (__get): Qualify calls to avoid ADL.
1505 (__select_index): Adjust whitespace.
1506 (variant): Add using-declaration to workaround Clang bug.
1508 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
1511 * include/bits/stl_function.h (greater::__not_overloaded)
1512 (less::__not_overloaded, greater_equal::__not_overloaded)
1513 (less_equal::__not_overloaded): Fix ambiguous specializations.
1514 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1515 tests for type with overloaded operators.
1517 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1520 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1521 xfail execution on 32-bit Solaris/x86.
1523 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
1525 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1526 VERIFY instead of assert.
1527 * testsuite/20_util/hash/84998.cc: New test.
1528 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1529 copy of test adjusted for Debug Mode.
1530 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1533 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
1536 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1537 * include/std/bitset: Likewise.
1538 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1540 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1541 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1542 * include/bits/stl_set.h (std::set<>): Likewise.
1543 * include/bits/unordered_map.h (std::unordered_map<>): Fix
1544 _Hash_merge_helper friend declaration.
1545 (std::unordered_multimap<>): Likewise.
1546 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1547 (std::unordered_multiset<>): Likewise.
1549 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1551 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1552 trailing slash for domain level link.
1553 * doc/xml/faq.xml: Ditto.
1554 * doc/xml/manual/appendix_free.xml (software): Ditto.
1555 * doc/xml/manual/intro.xml: Ditto.
1556 * doc/xml/manual/spine.xml: Ditto.
1557 * doc/xml/spine.xml: Ditto.
1559 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1561 * doc/xml/manual/documentation_hacking.xml: Adjust link to
1564 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
1566 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1567 to compile as C++98.
1569 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
1572 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1573 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1574 to ensure total order for pointers.
1575 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1576 Add operator() overloads for pointer arguments and make generic
1577 overloads dispatch to new _S_cmp functions when comparisons would
1578 use built-in operators for pointers.
1579 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1581 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1585 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1586 * configure: Regenerate.
1587 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1588 (aligned_alloc): Add using-declaration.
1589 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1591 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
1593 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1594 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1597 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
1600 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1601 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1603 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1604 src/filesystem/std-ops.cc (create_dir): Likewise.
1606 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
1608 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1609 (StdListIteratorPrinter): Inherit from latter.
1610 (StdFwdListIteratorPrinter): New, inherit from latter.
1611 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1612 when iterator has no associated container.
1613 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1614 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1616 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1617 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1619 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1622 * include/std/optional (_Optional_payload): Split into multiple
1623 specializations that can handle different cases of trivial or
1624 non-trivial assignment operators.
1625 * testsuite/20_util/optional/84601.cc: New.
1626 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1628 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
1631 * include/bits/parse_numbers.h (_Number_help): Add partial
1632 specialization to handle digit separators. Adjust partial
1633 specialization for recursion temrination to require _Pow == 1ULL.
1634 * testsuite/20_util/duration/literals/84671.cc: New
1636 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
1638 Implement the missing bits of LWG 2769
1639 * include/std/any (any_cast(const any&)): Add static_assert.
1640 (any_cast(any&)): Likewise.
1641 (any_cast(any&&)): Likewise, and remove the handling
1642 for copyable-but-not-movable type.
1643 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1644 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1647 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
1650 * include/std/thread (thread::__make_invoker): Construct tuple
1651 directly instead of using make_tuple.
1652 * testsuite/30_threads/async/84532.cc: New.
1653 * testsuite/30_threads/thread/84532.cc: New.
1655 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
1657 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1658 (template<> __aligned_buffer): Define as __aligned_membuf alias.
1660 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1663 * configure: Regenerate.
1665 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
1668 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1669 * configure: Regenerate.
1670 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1672 * include/Makefile.in: Regenerate.
1674 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
1677 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1678 Add -ffloat-store to options for m68k and ia32.
1680 * doc/xml/faq.xml: Update copyright years.
1681 * doc/html/*: Regenerate.
1684 * include/std/any (any::__do_emplace): Only set _M_manager after
1685 constructing the contained object.
1686 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1687 * testsuite/20_util/any/modifiers/83658.cc: New test.
1689 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
1692 * include/c_global/cstddef (__byte_operand): Define primary template.
1693 * testsuite/18_support/byte/81076.cc: New test.
1695 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
1697 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1698 dg-options and dg-add-options order.
1699 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1700 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1702 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1703 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1705 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1707 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1708 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1710 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1712 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
1714 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
1716 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
1718 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
1720 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
1722 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
1724 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
1725 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
1726 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
1727 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
1728 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
1729 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
1730 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
1731 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
1732 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
1734 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
1736 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
1738 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
1741 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
1743 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
1744 include linux/types.h when checking linux/random.h header.
1745 * config.h.in: Regenerate.
1747 * src/c++11/random.cc: Conditionally include linux/types.h.
1749 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
1751 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
1753 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
1756 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
1757 pattern with exact match for std::cerr.
1759 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1762 * include/bits/random.h (chi_squared_distribution::param): Update
1763 gamma distribution parameter.
1764 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
1768 * include/std/type_traits (has_unique_object_representations_v): Add
1770 * testsuite/20_util/has_unique_object_representations/value.cc: Check
1773 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1775 Make optional conditionally
1776 trivially_{copy,move}_{constructible,assignable}
1777 * include/std/optional (_Optional_payload): Fix the comment in
1778 the class head and turn into a primary and one specialization.
1779 (_Optional_payload::_M_engaged): Strike the NSDMI.
1780 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
1782 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
1784 (_Optional_payload<_Tp, false>::_M_get): Likewise.
1785 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
1786 (_Optional_base_impl): Likewise.
1787 (_Optional_base): Turn into a primary and three specializations.
1788 (optional(nullopt)): Change the base init.
1789 * testsuite/20_util/optional/assignment/8.cc: New.
1790 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
1791 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1793 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1796 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
1797 (get_template_arg_list): New.
1798 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
1800 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
1801 of strings and regular expressions.
1802 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
1803 (FilteringTypePrinter): Add docstring. Match using startswith. Use
1804 strip_inline_namespaces instead of strip_versioned_namespace.
1805 (add_one_type_printer): Prepend namespace to match argument.
1806 (register_type_printers): Add type printers for char16_t and char32_t
1807 string types and for types using cxx11 ABI. Update calls to
1808 add_one_template_type_printer to provide default argument dicts.
1809 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
1810 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
1811 basic_string<unsigned char> and basic_string<signed char>.
1812 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
1813 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
1815 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
1818 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1820 2018-01-13 Tim Shen <timshen@google.com>
1823 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
1824 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
1825 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
1827 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1830 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
1831 Remove dg-xfail-run-if.
1833 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
1835 * include/bits/forward_list.h
1836 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
1837 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
1838 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
1839 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
1840 (_Fwd_list_impl()): Add noexcept qualification.
1841 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
1842 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
1843 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
1844 (_Fwd_list_base()): Default.
1845 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
1846 (_Fwd_list_base(_Fwd_list_base&&)): Default.
1847 (forward_list<>()): Default.
1848 (forward_list<>(forward_list&&)): Default.
1849 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
1850 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
1851 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
1852 * include/bits/forward_list.tcc
1853 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
1854 _M_impl._M_head move assignment.
1855 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
1856 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
1858 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
1861 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
1862 (UniquePointerPrinter): Print correct template argument, not type of
1864 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
1866 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
1868 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
1869 weak_ptr of array types.
1871 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
1874 * include/bits/hashtable_policy.h
1875 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
1877 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
1878 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
1879 Add false_type parameter.
1880 (_Insert_base::insert): Adapt.
1881 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
1883 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
1884 Add __n_elt parameter, defaulted to 1.
1885 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
1886 policy _M_need_rehash.
1887 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
1888 produce only 1 rehash if necessary.
1889 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
1890 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
1892 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
1893 Jonathan Wakely <jwakely@redhat.com>
1895 PR libstdc++/59253 (partial)
1896 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
1897 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
1898 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
1900 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
1901 of unique_ptr printer.
1902 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
1903 output of shared_ptr printer.
1905 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
1908 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
1909 unnecessary symlink_status call.
1910 (remove_all(const path&, error_code&)): Use filesystem::remove.
1911 * src/filesystem/std-ops.cc: Likewise.
1914 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
1918 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
1919 report an error for ENOENT.
1920 (remove_all(const path&)): Fix type of result variable.
1921 (remove_all(const path&, error_code&)): Use non-throwing increment
1922 for directory iterator. Call POSIX remove directly to avoid redundant
1923 calls to symlink_status. Do not report errors for ENOENT.
1924 * src/filesystem/std-ops.cc: Likewise.
1925 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
1927 * testsuite/experimental/filesystem/operations/remove_all.cc:
1930 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
1933 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
1934 redundant call to ec.clear().
1935 (remove_all(const path&, error_code&))): Do not return an error for
1937 * src/filesystem/std-ops.cc: Likewise.
1938 * testsuite/27_io/filesystem/operations/remove.cc: New test.
1939 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
1940 results for non-existent paths.
1941 * testsuite/experimental/filesystem/operations/remove.cc: New test.
1942 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
1943 expected results for non-existent paths.
1945 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
1946 check status_known once.
1947 * include/experimental/bits/fs_ops.h: Likewise.
1950 * include/std/functional (__is_byte_like): New trait.
1951 (__is_std_equal_to): Remove.
1952 (__boyer_moore_base_t): Use __is_byte_like instead of
1954 * include/experimental/functional (__is_std_equal_to): Remove.
1955 (__boyer_moore_base_t): Use __is_byte_like instead of
1957 * testsuite/20_util/function_objects/83607.cc: New test.
1959 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
1961 Protect optional's deduction guide with the feature macro
1962 * include/std/optional: Use the feature macro.
1964 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1966 Update copyright years.
1968 Copyright (C) 2018 Free Software Foundation, Inc.
1970 Copying and distribution of this file, with or without modification,
1971 are permitted in any medium without royalty provided the copyright
1972 notice and this notice are preserved.