1 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
4 Move back to <utility>.
5 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
8 P0935R0 Eradicating unnecessarily explicit default constructors
9 * include/backward/strstream (strstreambuf): Add non-explicit default
11 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
13 * include/bits/regex.h (match_results): Likewise.
14 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
16 * testsuite/22_locale/conversions/string/1.cc: Likewise.
17 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
18 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
20 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
21 macro from <utility> and change type to long.
22 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
23 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
26 P0935R0 Eradicating unnecessarily explicit default constructors
27 * include/bits/random.h (uniform_real_distribution::param_type)
28 (normal_distribution::param_type, lognormal_distribution::param_type)
29 (gamma_distribution::param_type, chi_squared_distribution::param_type)
30 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
31 (student_t_distribution::param_type)
32 (bernoulli_distribution::param_type)
33 (binomial_distribution::param_type)
34 (geometric_distribution::param_type)
35 (negative_binomial_distribution::param_type)
36 (poisson_distribution::param_type)
37 (exponential_distribution::param_type)
38 (weibull_distribution::param_type)
39 (extreme_value_distribution::param_type): Add non-explicit default
40 constructors. Remove default argument for first parameter of explicit
42 * include/bits/uniform_int_dist.h
43 (uniform_int_distribution::param_type): Likewise.
45 (beta_distribution::param_type, rice_distribution::param_type)
46 (nakagami_distribution::param_type, pareto_distribution::param_type)
47 (k_distribution::param_type, arcsine_distribution::param_type)
48 (hoyt_distribution::param_type, triangular_distribution::param_type)
49 (von_mises_distribution::param_type)
50 (hypergeometric_distribution::param_type)
51 (logistic_distribution::param_type)
52 (uniform_inside_sphere_distribution::param_type): Likewise.
53 (uniform_on_sphere_distribution::param_type): Make default constructor
55 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
56 Test param_type for non-explicit default constructor.
57 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
59 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
61 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
63 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
65 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
67 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
69 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
71 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
73 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
75 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
77 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
79 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
81 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
83 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
85 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
87 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
89 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
91 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
93 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
95 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
96 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
97 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
98 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
100 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
101 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
102 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
103 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
105 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
106 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
107 * testsuite/ext/random/triangular_distribution/cons/default.cc:
109 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
111 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
113 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
116 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
117 Jonathan Wakely <jwakely@redhat.com>
120 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
121 Default-construct new elements before moving existing ones.
122 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
125 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
128 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
130 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
131 Use node allocator to create and destroy elements.
132 (forward_list::_Tp_alloc_type): Remove unused typedef.
133 (forward_list::_Alloc_traits): Use allocator_traits instead of
134 __gnu_cxx::__alloc_traits.
136 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
138 * include/debug/helper_functions.h
139 (__gnu_debug::_Safe_iterator<>): Add declaration.
140 (__can_advance(_Ite, _Size)): New.
141 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
142 * include/debug/functions.h
143 (__gnu_debug::_Safe_iterator<>): Remove declaration.
144 * include/debug/stl_iterator.h
145 (__can_advance(const _Safe_iterator<>&)): New definition.
146 * include/debug/stl_iterator.h
147 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
148 (__can_advance(const std::move_iterator<>&, _Size)): New.
149 * include/debug/macros.h (__glibcxx_check_can_increment): New.
150 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
151 * include/bits/stl_algobase.h (fill_n): Use latter.
152 * testsuite/25_algorithms/fill_n/2.cc: New.
153 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
154 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
155 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
156 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
158 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
159 (__glibcxx_requires_can_decrement_range): New.
161 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
163 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
164 (__glibcxx_check_can_decrement_range): New.
165 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
166 __glibcxx_requires_can_increment_range.
167 (std::move(_II, _II, _OI)): Likewise.
168 (std::copy_backward(_BI, _BI, _BI2)): Use
169 __glibcxx_requires_can_decrement_range.
170 (std::move_backward(_BI, _BI, _BI2)): Likewise.
171 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
172 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
173 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
174 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
175 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
176 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
178 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
180 P0935R0 Eradicating unnecessarily explicit default constructors
181 * include/bits/random.h (linear_congruential_engine)
182 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
183 (uniform_real_distribution, normal_distribution)
184 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
185 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
186 (bernoulli_distribution, binomial_distribution,geometric_distribution)
187 (negative_binomial_distribution, exponential_distribution)
188 (weibull_distribution, extreme_value_distribution): Add non-explicit
189 default constructors. Remove default argument for first parameter of
190 explicit constructors.
191 (piecewise_constant_distribution, piecewise_linear_distribution):
192 Make default constructor non-explicit.
193 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
194 non-explicit default constructors. Remove default argument for first
195 parameter of explicit constructor.
197 (simd_fast_mersenne_twister_engine, beta_distribution)
198 (rice_distribution, nakagami_distribution, pareto_distribution)
199 (k_distribution, arcsine_distribution, hoyt_distribution)
200 (triangular_distribution, von_mises_distribution)
201 (hypergeometric_distribution, logistic_distribution)
202 (uniform_inside_sphere_distribution): Likewise.
203 (uniform_on_sphere_distribution): Make default constructor
205 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
206 Test for non-explicit default constructor. Fix references to standard.
207 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
209 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
211 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
213 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
215 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
217 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
219 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
221 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
223 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
225 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
227 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
229 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
231 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
233 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
235 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
237 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
239 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
241 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
243 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
245 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
246 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
247 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
248 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
250 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
251 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
252 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
253 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
255 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
256 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
257 * testsuite/ext/random/triangular_distribution/cons/default.cc:
259 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
261 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
263 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
265 * testsuite/util/testsuite_common_types.h
266 (implicitly_default_constructible): New helper.
268 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
270 * include/bits/ios_base.h (ios::Init::Init(const Init&))
271 (ios::Init::operator=): Define as defaulted.
272 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
274 * include/bits/stream_iterator.h (istream_iterator::operator=)
275 (ostream_iterator::operator=): Likewise.
276 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
278 * include/std/bitset (bitset::reference::reference(const reference&)):
280 * include/std/complex (complex<float>::complex(const complex&))
281 (complex<double>::complex(const complex&))
282 (complex<long double>::complex(const complex&)): Likewise.
284 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
286 * include/bits/regex.h (sub_match): Add noexcept to default
287 constructor and length observer.
288 (match_results): Add noexcept to default constructor and observers
289 with no preconditions. Define destructor as defaulted.
290 (operator==, operator!=, swap): Add noexcept.
291 (regex_iterator): Add default member initializers and define default
292 constructor and destructor as defaulted. Add noexcept to equality
293 and dereference operators.
295 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
298 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
299 (_Safe_iterator_base::_M_detach_single()): Likewise.
300 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
301 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
303 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
305 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
308 2018-06-06 Jakub Jelinek <jakub@redhat.com>
311 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
312 rather than __cpp_transactional_memory >= 201505L.
314 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
317 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
318 Define new partial specialization.
319 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
321 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
322 value not reference for iteration.
323 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
325 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
326 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
329 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
331 * include/std/type_traits: Fix comment typos.
333 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
335 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
336 * testsuite/experimental/filesystem/operations/read_symlink.cc:
339 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
341 * include/bits/stl_tempbuf.h
342 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
343 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
344 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
345 * include/bits/stl_algo.h (__stable_partition): Adapt.
346 (__inplace_merge): Adapt.
347 (__stable_sort): Adapt.
349 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
352 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
353 unconditionally. Remove redundant declaration.
354 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
357 * include/bits/postypes.h (fpos): Define special members as defaulted.
360 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
361 the static variable correctly.
363 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
365 PR libstdc++/78870 support std::filesystem on Windows
366 * config.h.in: Regenerate.
367 * configure: Regenerate.
368 * configure.ac: Check for link, readlink and symlink.
369 * include/bits/fs_path.h (path::operator/=(const path&)): Move
370 definition out of class body.
371 (path::is_absolute(), path::_M_append(path)): Likewise.
372 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
373 (operator>>(basic_istream, path&)): Likewise.
374 (u8path): Reorder definitions and fix Windows implementation.
375 (path::is_absolute()): Define inline and fix for Windows.
376 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
377 Define POSIX version inline.
378 (path::_M_append(path)): Define inline.
379 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
380 definition out of class body.
381 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
383 (operator>>(basic_istream, path&)): Likewise.
384 (path::is_absolute()): Define inline and fix for Windows.
385 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
386 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
387 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
388 Define as adaptors for Windows functions/types or as
389 using-declarations for POSIX functions/types.
390 (_Dir_base, get_file_type): Qualify names to use declarations from
391 __gnu_posix namespace.
392 (_Dir_base::is_dor_or_dotdot): New helper functions.
393 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
394 names to use declarations from __gnu_posix namespace.
395 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
396 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
397 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
398 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
399 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
400 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
401 Define as adaptors for Windows functions/types or as
402 using-declarations for POSIX functions/types.
403 (stat_type, do_copy_file): Qualify names to use declarations from
404 __gnu_posix namespace.
405 (do_space): Declare new function.
406 (make_file_type): Only use S_ISLNK if defined.
407 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
408 path::value_type not char.
409 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
410 names to use declarations from __gnu_posix namespace.
411 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
412 add implementation for Windows.
413 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
414 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
415 [!_PC_PATH_MAX]: Don't use pathconf.
416 [PATH_MAX]: Use if defined.
417 (filesystem::current_path(const path&, error_code&))
418 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
419 (filesystem::last_write_time, filesystem::permissions): Use names
421 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
422 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
423 implementation for Windows.
424 (filesystem::rename, filesystem::resize_file): Use names from
426 (filesystem::space): Use do_space.
427 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
428 (filesystem::status, filesystem::symlink_status): Use names from
430 (filesystem::temp_directory_path): Add implementation for Windows.
431 * src/filesystem/path.cc (dot): Define constant.
432 (path::replace_extension): Use dot.
433 (path::_M_find_extension): Likewise. Use path::string_type not
435 (path::_M_split_cmpts): Use dot.
436 (filesystem_error::_M_get_what): Use u8string() not native().
437 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
438 Qualify names to use declarations from __gnu_posix namespace.
439 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
441 (filesystem::absolute(const path&, error_code&)): Add implementation
443 (char_ptr, filesystem::canonical): Use path::value_type not char.
444 (do_copy_file): Use names from __gnu_posix.
445 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
447 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
448 names to use declarations from __gnu_posix namespace.
449 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
450 add implementation for Windows.
451 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
452 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
453 [!_PC_PATH_MAX]: Don't use pathconf.
454 [PATH_MAX]: Use if defined.
455 (filesystem::current_path(const path&, error_code&))
456 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
457 (filesystem::last_write_time, filesystem::permissions): Use names
459 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
460 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
461 implementation for Windows.
462 (filesystem::rename, filesystem::resize_file): Use names from
465 (filesystem::space): Use do_space.
466 (filesystem::status, filesystem::symlink_status): Use names from
468 (filesystem::temp_directory_path): Add implementation for Windows.
469 * src/filesystem/std-path.cc
470 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
472 (dot): Define constant.
473 (path::replace_extension, is_dot): Use dot.
474 (path::lexically_normal): Check _M_type instead of calling
475 non-existent function.
476 (path::_M_find_extension): Use dot. Use path::string_type not
478 (path::_M_split_cmpts): Use dot.
479 (filesystem_error::_M_get_what): Use u8string() not native().
480 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
482 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
484 * testsuite/27_io/filesystem/operations/absolute.cc: Use
485 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
486 * testsuite/27_io/filesystem/operations/canonical.cc: Use
487 path::string() to get narrow string, not path::native().
488 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
489 with std::filesystem::path not std::basic_string.
490 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
491 * testsuite/27_io/filesystem/operations/exists.cc: Use
492 __gnu_test::root_path() instead of "/".
493 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
494 fstreams with std::filesystem::path not std::basic_string.
495 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
496 path::string() to get narrow string.
497 * testsuite/27_io/filesystem/operations/space.cc: Check results for
498 errors, expect sensible values otherwise.
499 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
500 helpers for adjusting the environment on Windows.
501 * testsuite/27_io/filesystem/path/append/path.cc: Test
502 Windows-specific behaviour.
503 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
504 of path::string_type objects.
505 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
506 string to wide string on Windows.
507 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
508 for backslash as root-directory.
509 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
510 path::string() to get narrow string.
511 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
513 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
515 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
516 different definintion of absolute paths on Windows.
517 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
519 * testsuite/experimental/filesystem/operations/absolute.cc: Test
521 * testsuite/experimental/filesystem/operations/copy.cc: Construct
522 fstreams with NTCTS not std::basic_string.
523 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
524 * testsuite/experimental/filesystem/operations/exists.cc: Use
525 __gnu_test::root_path() instead of "/".
526 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
527 fstreams with NTCTS not std::basic_string.
528 * testsuite/experimental/filesystem/operations/last_write_time.cc:
529 Use path::string() to get narrow string.
530 * testsuite/experimental/filesystem/operations/space.cc: Use
531 __gnu_test::root_path() instead of "/".
532 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
533 Add helpers for adjusting the environment on Windows.
534 * testsuite/experimental/filesystem/path/append/path.cc: Use
535 path::string() to get narrow strings for comparisons.
536 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
537 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
539 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
540 * testsuite/experimental/filesystem/path/native/string.cc: Use
541 string_type not std::string.
542 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
543 Adjust for different definintion of absolute paths on Windows.
544 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
546 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
549 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
552 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
553 uint_least16_t and uint_least32_t.
554 (__make_unsigned<wchar_t>): Define unconditionally.
555 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
557 (__make_unsigned_selector_base): New type to provide helper templates.
558 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
559 __make_unsigned_selector_base helpers.
560 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
561 (__make_signed_selector<_Tp, true, false>): Remove intermediate
563 (__make_signed<wchar_t>, __make_signed<char16_t>)
564 (__make_signed<char32_t>)): Define unconditionally.
565 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
566 wchar_t, char16_t and char32_t are transformed correctly.
567 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
569 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
570 wchar_t, char16_t and char32_t are transformed correctly.
571 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
574 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
576 * include/std/variant (__erased_dtor): Qualify call to __get.
578 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
580 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
581 (_Rb_tree(const allocator_type&)): Use latter.
582 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
583 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
584 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
585 * include/bits/stl_multimap.h
586 (multimap(const allocator_type&)): Likewise.
587 (multimap(initializer_list<value_type>, const allocator_type&)):
589 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
591 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
592 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
593 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
594 * include/bits/stl_multiset.h
595 (multiset(const allocator_type&)): Likewise.
596 (multiset(initializer_list<value_type>, const allocator_type&)):
598 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
601 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
604 * src/c++11/debug.cc: Remove backtrace usage.
606 2018-05-24 Maya Rashish <coypu@sdf.org>
609 * crossconfig.m4: Test for aligned_alloc on netbsd.
610 * configure: Regenerate.
612 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
616 * include/bits/atomic_base.h (__atomic_base::value_type)
617 (__atomic_base::difference_type): Add new typedefs.
618 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
619 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
620 (atomic<T*>::operator++, atomic<T*>::operator--)
621 (atomic<T*>::operator+=, atomic<T*>::operator-=)
622 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
623 to enforce C++17 requirement on pointer arithmetic.
624 (__atomic_val_t, __atomic_diff_t): New alias templates.
625 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
626 (atomic_compare_exchange_weak_explicit)
627 (atomic_compare_exchange_strong_explicit, atomic_store)
628 (atomic_exchange, atomic_compare_exchange_weak)
629 (atomic_compare_exchange_strong): Use __atomic_val_t to make
630 scalar parameters be non-deduced contexts.
631 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
632 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
633 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
635 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
636 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
637 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
638 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
639 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
641 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
642 * testsuite/29_atomics/atomic/69769.cc: New test.
643 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
644 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
645 Disable test for C++17 and later.
646 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
647 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
648 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
651 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
653 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
654 template to alias template.
655 (path::__value_type_is_char): Use remove_const_t.
656 (path:_S_string_from_iter): New helper function.
657 (path::_S_convert(InputIter, __null_terminated))
658 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
659 Use _S_string_from_iter.
660 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
662 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
663 Change from class template to alias template.
664 (path::__value_type_is_char): Use remove_const.
665 (path:_S_string_from_iter): New helper function.
666 (path::_S_convert(InputIter, __null_terminated))
667 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
668 Use _S_string_from_iter.
669 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
671 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
672 string equality, not path equivalence.
673 * testsuite/27_io/filesystem/path/construct/format.cc: Check
674 construction from std::string and std::wstring and input iterators.
675 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
676 construction from iterators.
677 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
678 exact string equality, not path equivalence.
679 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
680 construction from iterators.
682 * include/bits/fs_path.h (path::_M_type): Change default member
683 initializer to _Filename.
684 (path::begin): Create past-the-end iterator for empty path.
685 * src/filesystem/std-path.cc (path::remove_filename()): Remove
687 (path::has_relative_path()): Return false for empty filenames.
688 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
689 Fix offset of empty final component.
690 * testsuite/27_io/filesystem/path/itr/components.cc: New.
691 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
693 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
695 Add support for opening file streams from wide character strings.
696 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
697 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
699 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
700 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
701 Declare new overload.
702 * configure.ac: Check for _wfopen.
703 * crossconfig.m4: Likewise.
704 * configure: Regenerate.
705 * config.h.in: Regenerate.
706 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
707 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
709 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
710 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
711 Declare new overload.
712 [_GLIBCXX_HAVE__WFOPEN]
713 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
714 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
715 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
716 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
717 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
718 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
720 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
721 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
722 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
723 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
724 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
725 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
726 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
728 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
731 * include/bits/stl_tree.h
732 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
735 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
737 * src/filesystem/std-ops.cc (absolute): Report an error for empty
739 (weakly_canonical(const path&)): Do not call canonical on empty path.
740 (weakly_canonical(const path&, error_code&)): Likewise.
741 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
744 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
745 dg-require-filesystem-ts.
748 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
749 initialize base class to avoid warnings.
751 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
753 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
754 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
755 little_endian element in bitmask.
756 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
757 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
759 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
761 * include/bits/stl_tree.h
762 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
763 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
764 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
765 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
766 * include/debug/map.h
767 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
768 * include/debug/multimap.h
769 (multimap(multimap&&, const_allocator_type&)): Likewise.
770 * include/debug/set.h
771 (set(set&&, const_allocator_type&)): Likewise.
772 * include/debug/multiset.h
773 (multiset(multiset&&, const_allocator_type&)): Likewise.
774 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
776 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
778 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
780 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
782 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
784 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
786 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
788 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
791 2018-05-18 Jason Merrill <jason@redhat.com>
793 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
794 for conversion to const_iterator. Add defaulted copy ops.
795 * libsupc++/new (bad_alloc): Add defaulted copy ops.
796 * libsupc++/exception.h (exception): Add defaulted copy ops.
797 * include/std/system_error (system_error): Add defaulted copy ops.
798 * include/std/stdexcept (domain_error, invalid_argument)
799 (length_error, out_of_range, range_error, overflow_error)
800 (underflow_error): Add defaulted copy ops.
801 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
803 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
804 * include/ext/throw_allocator.h (condition_base): Add defaulted
805 default and copy ctor and copy assignment.
807 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
810 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
811 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
812 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
813 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
815 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
817 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
818 braces around body of do-while.
819 * testsuite/28_regex/basic_regex/85098.cc: New
821 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
824 * src/filesystem/path.cc (path::preferred_separator): Add used
826 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
829 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
830 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
831 Refactor to separate non-throwing and throwing implementations.
832 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
833 if constructing the object throws.
835 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
838 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
839 (linear_congruential_engine, mersenne_twister_engine)
840 (subtract_with_carry_engine, discard_block_engine)
841 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
842 constrain function templates taking seed sequences.
843 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
844 (mersenne_twister_engine::seed(_Sseq&))
845 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
847 * include/ext/random (simd_fast_mersenne_twister_engine): Use
848 __is_seed_seq to constrain function templates taking seed sequences.
849 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
850 Change return type to match declaration.
851 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
853 * testsuite/26_numerics/random/independent_bits_engine/cons/
855 * testsuite/26_numerics/random/linear_congruential_engine/cons/
857 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
859 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
860 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
862 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
864 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
868 * include/bits/fs_path.h (path::is_absolute()): Use same definition
869 for all operating systems.
870 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
871 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
872 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
873 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
875 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
876 unused <vector> header.
877 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
878 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
879 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
880 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
881 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
883 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
885 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
886 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
887 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
888 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
889 * testsuite/experimental/filesystem/path/decompose/extension.cc:
891 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
892 * testsuite/experimental/filesystem/path/query/has_extension.cc:
894 * testsuite/experimental/filesystem/path/query/has_filename.cc:
896 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
898 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
900 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
902 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
904 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
906 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
907 * testsuite/experimental/filesystem/path/query/is_relative.cc:
911 * include/bits/fs_path.h (path::operator/=, path::append): Construct
912 temporary path before calling _M_append.
913 (path::_M_append): Change parameter to path and implement C++17
915 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
916 and more examples from the standard.
917 * testsuite/27_io/filesystem/path/append/source.cc: New.
918 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
919 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
921 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
922 __invoke to prevent ADL.
924 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
927 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
928 exceptions from _M_terminate_output().
929 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
930 exceptions from close().
931 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
933 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
934 (__valarray_get_storage): Call operator new directly. Remove ignored
935 top-level restrict qualifier and add malloc attribute instead.
936 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
939 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
940 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
943 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
945 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
947 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
950 * testsuite/20_util/variant/80165.cc: New.
952 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
954 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
955 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
956 of C++11 containers with Debug Mode support.
957 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
958 * doc/html/*: Regenerate.
960 2018-05-10 Jason Merrill <jason@redhat.com>
962 * include/bits/regex_compiler.h (_S_cache_size): Change from
963 function to variable.
965 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
967 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
968 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
969 argument defaulted to +1. Doxy comments on same.
970 * testsuite/special_functions/02_assoc_legendre/
971 check_value.cc: Regen.
972 * testsuite/tr1/5_numerical_facilities/special_functions/
973 02_assoc_legendre/check_value.cc: Regen.
975 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
978 * include/bits/c++config.h (__replacement_assert): Add linkage
980 * include/bits/std_abs.h: Add comment to closing brace of block.
981 * include/c_global/cstddef: Add linkage specification.
982 * include/c_global/cstring: Likewise.
983 * include/c_global/cwchar: Likewise.
985 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
987 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
989 (_Safe_iterator<>::_S_constant()): ...that.
990 * include/debug/safe_local_iterator.h
991 (_Safe_local_iterator<>::_M_constant()): Rename in...
992 (_Safe_local_iterator<>::_S_constant()): ...that.
993 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
994 (_Iterator_state::__rbegin): New.
995 (_Iterator_state::__rmiddle): New.
996 (_Iterator_state::__rend): New.
997 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
998 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1000 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1001 _Is_iterator)): Likewise.
1002 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1003 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1004 _Is_iterator)): New.
1005 (_Parameter(std::reverse_iterator<> const&, const char*,
1006 _Is_iterator)): New.
1007 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1008 const char*, _Is_iterator)): New.
1009 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1011 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1012 _Is_iterator)): New.
1013 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1014 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1015 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1017 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1019 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1020 Use constexpr if in C++17 mode.
1021 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1022 Copy from const object.
1023 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1025 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1027 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1028 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1031 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1032 * include/debug/functions.h (__check_valid_range): Use latter.
1033 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1035 * include/debug/deque
1036 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1037 * include/debug/forward_list
1038 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1040 * include/debug/list
1041 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1042 * include/debug/list
1043 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1044 * include/debug/map.h
1045 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1046 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1048 * include/debug/multimap.h
1049 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1050 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1051 const _Alloc&)): Likewise.
1052 * include/debug/set.h
1053 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1054 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1056 * include/debug/multiset.h
1057 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1058 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1059 const _Alloc&)): Likewise.
1060 * include/debug/string
1061 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1063 * include/debug/unordered_map
1064 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1066 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1067 const _Alloc&)): Likewise.
1068 * include/debug/unordered_set
1069 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1071 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1072 const _Alloc&)): Likewise.
1073 * include/debug/vector
1074 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1076 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1077 (_Error_formatter(const char*, unsigned int)): Adapt.
1078 (_Error_formatter::_M_at): Rename in...
1079 (_Error_formatter::_S_at): ...that and adapt.
1080 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1081 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1082 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1085 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1087 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1088 Use normal std::vector even in Debug Mode.
1091 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1092 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1093 * include/Makefile.in: Regenerate.
1094 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1095 within conditional block.
1097 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1099 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1100 C++17 Filesystem implementation also needs -lstdc++fs.
1103 * include/bits/fs_path.h (operator/): Permit copy elision.
1104 * include/experimental/bits/fs_path.h (operator/): Likewise.
1106 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1108 Moar PR libstdc++/80506
1109 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1110 Fix magic number used in loop condition.
1112 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1114 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1115 * include/std/optional (_Optional_payload): Add noexcept to default
1116 constructor. Re-indent.
1117 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1118 constructor for copying disengaged payloads.
1119 (_Optional_payload<_Tp, true, false, true>): Likewise.
1120 (_Optional_payload<_Tp, true, true, false>): Likewise.
1121 (_Optional_payload<_Tp, true, false, false>): Likewise.
1122 * testsuite/20_util/optional/cons/85642.cc: New.
1123 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1125 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1128 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1129 inline definitions instead of using-declarations.
1130 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1131 * testsuite/tr1/5_numerical_facilities/special_functions/
1132 07_conf_hyperg/compile_cxx17.cc: New.
1133 * testsuite/tr1/5_numerical_facilities/special_functions/
1134 17_hyperg/compile_cxx17.cc: New.
1137 * include/std/variant (visit): Qualify std::get call.
1139 PR libstdc++/85632 use uintmax_t for arithmetic
1140 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1141 arithmetic in result type.
1142 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1143 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1144 is greater than free space.
1145 * testsuite/experimental/filesystem/operations/space.cc: New.
1147 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1148 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1150 * testsuite/20_util/remove_cvref/value.cc: New.
1151 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1153 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1154 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1155 (append(const basic_string&, size_type, size_type)
1156 (assign(const basic_string&, size_type, size_type)
1157 (insert(size_type, const basic_string&, size_type, size_type)
1158 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1159 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1160 Add default arguments (LWG 2268).
1161 [_GLIBCXX_USE_CXX11_ABI=0]
1162 (append(const basic_string&, size_type, size_type)
1163 (assign(const basic_string&, size_type, size_type)
1164 (insert(size_type, const basic_string&, size_type, size_type)
1165 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1166 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1168 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1171 * include/std/thread (thread::__not_same): New SFINAE helper.
1172 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1173 first argument is not a std::thread. Add static assertion to check
1174 INVOKE expression is valid.
1175 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1176 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1177 __invoke_result for return types and remove exception specifications.
1178 * testsuite/30_threads/thread/cons/84535.cc: New.
1180 * include/std/future (__async_result_of): Use __invoke_result instead
1183 * include/std/any (any_cast): Use __remove_cvref_t.
1184 * include/std/tuple (__make_tuple): Likewise.
1185 * include/std/type_traits (__remove_cvref_t): Define.
1186 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1187 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1188 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1190 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1192 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1193 ensure overloaded comma not used.
1194 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1195 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1196 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1197 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1198 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1199 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1200 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1202 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1205 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1206 indices to unsigned.
1207 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1208 as failure. Refactor error handling.
1209 * testsuite/27_io/ios_base/storage/68197.cc: New.
1213 * include/bits/gslice_array.h (gslice_array): Define default
1214 constructor as deleted, as per C++11 standard.
1215 * include/bits/mask_array.h (mask_array): Likewise.
1216 * include/bits/slice_array.h (slice_array): Likewise.
1217 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1218 to namespace __detail.
1219 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1221 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1222 of data members in closure objects.
1223 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1224 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1226 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1227 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1228 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1229 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1230 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1231 using-declarations to namespace std.
1232 * testsuite/26_numerics/valarray/83860.cc: New.
1234 * testsuite/backward/strstream_move.cc: Remove duplicate function
1238 * include/backward/strstream (strstreambuf): Define move constructor
1239 and move assignment operator.
1240 (istrstream, ostrstream, strstream): Likewise.
1241 * testsuite/backward/strstream_move.cc: New.
1243 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1246 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1247 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1248 * configure: Regenerate.
1249 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1250 based on ENABLE_FLOAT128.
1251 * include/Makefile.in: Regenerate.
1252 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1253 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1254 _GLIBCXX_USE_FLOAT128.
1256 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1258 * configure: Regenerated.
1260 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1262 * configure: Regenerated.
1264 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1265 Jakub Jelinek <jakub@redhat.com>
1268 * src/c++11/Makefile.am: Don't generate debuginfo again for
1269 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1270 * src/c++11/Makefile.in: Regenerate.
1272 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1275 * testsuite/30_threads/thread/cons/terminate.cc
1276 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1278 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1281 * configure: Regenerate.
1283 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1285 * testsuite/experimental/filesystem/file_status/1.cc: Add
1286 -DUSE_FILESYSTEM_TS to dg-options.
1287 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1289 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1290 * testsuite/experimental/filesystem/iterators/
1291 recursive_directory_iterator.cc: Likewise.
1292 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1293 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1294 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1295 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1296 * testsuite/experimental/filesystem/operations/create_directories.cc:
1298 * testsuite/experimental/filesystem/operations/create_directory.cc:
1300 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1302 * testsuite/experimental/filesystem/operations/current_path.cc:
1304 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1305 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1306 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1307 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1308 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1310 * testsuite/experimental/filesystem/operations/permissions.cc:
1312 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1314 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1315 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1316 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1317 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1319 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1320 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1321 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1322 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1323 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1324 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1325 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1326 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1327 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1328 * testsuite/experimental/filesystem/path/construct/default.cc:
1330 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1331 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1332 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1334 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1336 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1338 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1340 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1342 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1344 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1346 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1348 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1349 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1351 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1352 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1353 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1355 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1357 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1359 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1361 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1362 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1363 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1365 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1366 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1368 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1370 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1372 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1374 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1376 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1378 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1380 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1381 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1384 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
1386 * src/c++11/Makefile.am: Fix sed command.
1387 * src/c++11/Makefile.in: Regenerate.
1389 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1390 handle mangled names starting with double underscores on darwin.
1391 * src/c++11/Makefile.in: Regenerate.
1393 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
1395 * src/c++11/Makefile.am: Fix comment.
1396 * src/c++11/Makefile.in: Regenerate.
1397 * src/c++11/cxx11-ios_failure.cc: Fix comment.
1398 * src/c++98/ios_failure.cc: Likewise.
1400 * src/c++11/ios.cc: Remove redundant macro definition.
1402 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
1404 * doc/xml/manual/abi.xml: Document header locations in recent
1406 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1407 * doc/xml/manual/spine.xml: Update copyright years.
1408 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1409 undefined behaviour.
1410 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1411 * doc/html/*: Regenerate.
1413 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1415 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1416 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1417 * doc/xml/manual/containers.xml: Likewise.
1418 * doc/xml/manual/debug_mode.xml: Likewise.
1419 * doc/xml/manual/extensions.xml: Likewise.
1420 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1421 * doc/xml/manual/using.xml: Likewise.
1422 * doc/xml/manual/utilities.xml: Likewise.
1425 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1426 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1427 * src/c++11/Makefile.in: Regenerate.
1428 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1430 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1431 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1432 * src/c++98/ios_failure.cc (__construct_ios_failure)
1433 (__destroy_ios_failure, is_ios_failure_handler): New functions.
1434 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1435 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1436 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1437 handler types, to always catch std::ios_base::failure.
1438 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1439 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1440 exceptions_failbit.cc: Likewise.
1441 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1442 exceptions_failbit.cc: Likewise.
1443 * testsuite/27_io/basic_istream/extractors_other/char/
1444 exceptions_null.cc: Likewise.
1445 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1446 exceptions_null.cc: Likewise.
1447 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1448 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1449 * testsuite/27_io/basic_ostream/inserters_other/char/
1450 exceptions_null.cc: Likewise.
1451 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1452 exceptions_null.cc: Likewise.
1453 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1455 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
1457 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1458 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1460 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
1463 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1465 * testsuite/20_util/variant/85183.cc: New.
1467 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
1469 * include/std/variant (__get): Qualify calls to avoid ADL.
1470 (__select_index): Adjust whitespace.
1471 (variant): Add using-declaration to workaround Clang bug.
1473 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
1476 * include/bits/stl_function.h (greater::__not_overloaded)
1477 (less::__not_overloaded, greater_equal::__not_overloaded)
1478 (less_equal::__not_overloaded): Fix ambiguous specializations.
1479 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1480 tests for type with overloaded operators.
1482 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1485 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1486 xfail execution on 32-bit Solaris/x86.
1488 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
1490 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1491 VERIFY instead of assert.
1492 * testsuite/20_util/hash/84998.cc: New test.
1493 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1494 copy of test adjusted for Debug Mode.
1495 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1498 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
1501 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1502 * include/std/bitset: Likewise.
1503 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1505 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1506 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1507 * include/bits/stl_set.h (std::set<>): Likewise.
1508 * include/bits/unordered_map.h (std::unordered_map<>): Fix
1509 _Hash_merge_helper friend declaration.
1510 (std::unordered_multimap<>): Likewise.
1511 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1512 (std::unordered_multiset<>): Likewise.
1514 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1516 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1517 trailing slash for domain level link.
1518 * doc/xml/faq.xml: Ditto.
1519 * doc/xml/manual/appendix_free.xml (software): Ditto.
1520 * doc/xml/manual/intro.xml: Ditto.
1521 * doc/xml/manual/spine.xml: Ditto.
1522 * doc/xml/spine.xml: Ditto.
1524 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1526 * doc/xml/manual/documentation_hacking.xml: Adjust link to
1529 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
1531 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1532 to compile as C++98.
1534 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
1537 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1538 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1539 to ensure total order for pointers.
1540 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1541 Add operator() overloads for pointer arguments and make generic
1542 overloads dispatch to new _S_cmp functions when comparisons would
1543 use built-in operators for pointers.
1544 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1546 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1550 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1551 * configure: Regenerate.
1552 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1553 (aligned_alloc): Add using-declaration.
1554 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1556 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
1558 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1559 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1562 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
1565 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1566 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1568 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1569 src/filesystem/std-ops.cc (create_dir): Likewise.
1571 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
1573 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1574 (StdListIteratorPrinter): Inherit from latter.
1575 (StdFwdListIteratorPrinter): New, inherit from latter.
1576 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1577 when iterator has no associated container.
1578 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1579 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1581 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1582 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1584 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
1587 * include/std/optional (_Optional_payload): Split into multiple
1588 specializations that can handle different cases of trivial or
1589 non-trivial assignment operators.
1590 * testsuite/20_util/optional/84601.cc: New.
1591 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1593 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
1596 * include/bits/parse_numbers.h (_Number_help): Add partial
1597 specialization to handle digit separators. Adjust partial
1598 specialization for recursion temrination to require _Pow == 1ULL.
1599 * testsuite/20_util/duration/literals/84671.cc: New
1601 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
1603 Implement the missing bits of LWG 2769
1604 * include/std/any (any_cast(const any&)): Add static_assert.
1605 (any_cast(any&)): Likewise.
1606 (any_cast(any&&)): Likewise, and remove the handling
1607 for copyable-but-not-movable type.
1608 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1609 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1612 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
1615 * include/std/thread (thread::__make_invoker): Construct tuple
1616 directly instead of using make_tuple.
1617 * testsuite/30_threads/async/84532.cc: New.
1618 * testsuite/30_threads/thread/84532.cc: New.
1620 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
1622 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1623 (template<> __aligned_buffer): Define as __aligned_membuf alias.
1625 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
1628 * configure: Regenerate.
1630 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
1633 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1634 * configure: Regenerate.
1635 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1637 * include/Makefile.in: Regenerate.
1639 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
1642 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1643 Add -ffloat-store to options for m68k and ia32.
1645 * doc/xml/faq.xml: Update copyright years.
1646 * doc/html/*: Regenerate.
1649 * include/std/any (any::__do_emplace): Only set _M_manager after
1650 constructing the contained object.
1651 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1652 * testsuite/20_util/any/modifiers/83658.cc: New test.
1654 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
1657 * include/c_global/cstddef (__byte_operand): Define primary template.
1658 * testsuite/18_support/byte/81076.cc: New test.
1660 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
1662 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1663 dg-options and dg-add-options order.
1664 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1665 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1667 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1668 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1670 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1672 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1673 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1675 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1677 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
1679 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
1681 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
1683 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
1685 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
1687 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
1689 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
1690 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
1691 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
1692 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
1693 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
1694 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
1695 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
1696 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
1697 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
1699 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
1701 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
1703 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
1706 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
1708 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
1709 include linux/types.h when checking linux/random.h header.
1710 * config.h.in: Regenerate.
1712 * src/c++11/random.cc: Conditionally include linux/types.h.
1714 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
1716 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
1718 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
1721 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
1722 pattern with exact match for std::cerr.
1724 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1727 * include/bits/random.h (chi_squared_distribution::param): Update
1728 gamma distribution parameter.
1729 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
1733 * include/std/type_traits (has_unique_object_representations_v): Add
1735 * testsuite/20_util/has_unique_object_representations/value.cc: Check
1738 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
1740 Make optional conditionally
1741 trivially_{copy,move}_{constructible,assignable}
1742 * include/std/optional (_Optional_payload): Fix the comment in
1743 the class head and turn into a primary and one specialization.
1744 (_Optional_payload::_M_engaged): Strike the NSDMI.
1745 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
1747 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
1749 (_Optional_payload<_Tp, false>::_M_get): Likewise.
1750 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
1751 (_Optional_base_impl): Likewise.
1752 (_Optional_base): Turn into a primary and three specializations.
1753 (optional(nullopt)): Change the base init.
1754 * testsuite/20_util/optional/assignment/8.cc: New.
1755 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
1756 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1758 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
1761 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
1762 (get_template_arg_list): New.
1763 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
1765 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
1766 of strings and regular expressions.
1767 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
1768 (FilteringTypePrinter): Add docstring. Match using startswith. Use
1769 strip_inline_namespaces instead of strip_versioned_namespace.
1770 (add_one_type_printer): Prepend namespace to match argument.
1771 (register_type_printers): Add type printers for char16_t and char32_t
1772 string types and for types using cxx11 ABI. Update calls to
1773 add_one_template_type_printer to provide default argument dicts.
1774 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
1775 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
1776 basic_string<unsigned char> and basic_string<signed char>.
1777 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
1778 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
1780 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
1783 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1785 2018-01-13 Tim Shen <timshen@google.com>
1788 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
1789 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
1790 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
1792 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1795 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
1796 Remove dg-xfail-run-if.
1798 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
1800 * include/bits/forward_list.h
1801 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
1802 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
1803 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
1804 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
1805 (_Fwd_list_impl()): Add noexcept qualification.
1806 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
1807 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
1808 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
1809 (_Fwd_list_base()): Default.
1810 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
1811 (_Fwd_list_base(_Fwd_list_base&&)): Default.
1812 (forward_list<>()): Default.
1813 (forward_list<>(forward_list&&)): Default.
1814 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
1815 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
1816 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
1817 * include/bits/forward_list.tcc
1818 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
1819 _M_impl._M_head move assignment.
1820 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
1821 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
1823 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
1826 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
1827 (UniquePointerPrinter): Print correct template argument, not type of
1829 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
1831 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
1833 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
1834 weak_ptr of array types.
1836 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
1839 * include/bits/hashtable_policy.h
1840 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
1842 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
1843 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
1844 Add false_type parameter.
1845 (_Insert_base::insert): Adapt.
1846 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
1848 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
1849 Add __n_elt parameter, defaulted to 1.
1850 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
1851 policy _M_need_rehash.
1852 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
1853 produce only 1 rehash if necessary.
1854 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
1855 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
1857 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
1858 Jonathan Wakely <jwakely@redhat.com>
1860 PR libstdc++/59253 (partial)
1861 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
1862 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
1863 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
1865 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
1866 of unique_ptr printer.
1867 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
1868 output of shared_ptr printer.
1870 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
1873 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
1874 unnecessary symlink_status call.
1875 (remove_all(const path&, error_code&)): Use filesystem::remove.
1876 * src/filesystem/std-ops.cc: Likewise.
1879 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
1883 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
1884 report an error for ENOENT.
1885 (remove_all(const path&)): Fix type of result variable.
1886 (remove_all(const path&, error_code&)): Use non-throwing increment
1887 for directory iterator. Call POSIX remove directly to avoid redundant
1888 calls to symlink_status. Do not report errors for ENOENT.
1889 * src/filesystem/std-ops.cc: Likewise.
1890 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
1892 * testsuite/experimental/filesystem/operations/remove_all.cc:
1895 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
1898 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
1899 redundant call to ec.clear().
1900 (remove_all(const path&, error_code&))): Do not return an error for
1902 * src/filesystem/std-ops.cc: Likewise.
1903 * testsuite/27_io/filesystem/operations/remove.cc: New test.
1904 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
1905 results for non-existent paths.
1906 * testsuite/experimental/filesystem/operations/remove.cc: New test.
1907 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
1908 expected results for non-existent paths.
1910 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
1911 check status_known once.
1912 * include/experimental/bits/fs_ops.h: Likewise.
1915 * include/std/functional (__is_byte_like): New trait.
1916 (__is_std_equal_to): Remove.
1917 (__boyer_moore_base_t): Use __is_byte_like instead of
1919 * include/experimental/functional (__is_std_equal_to): Remove.
1920 (__boyer_moore_base_t): Use __is_byte_like instead of
1922 * testsuite/20_util/function_objects/83607.cc: New test.
1924 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
1926 Protect optional's deduction guide with the feature macro
1927 * include/std/optional: Use the feature macro.
1929 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1931 Update copyright years.
1933 Copyright (C) 2018 Free Software Foundation, Inc.
1935 Copying and distribution of this file, with or without modification,
1936 are permitted in any medium without royalty provided the copyright
1937 notice and this notice are preserved.