1 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
3 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
4 * include/Makefile.am: Add new header.
5 * include/Makefile.in: Regenerate.
6 * include/precompiled/stdc++.h: Include new header.
7 * include/std/bit: New header.
8 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
9 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
11 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
12 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
13 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
14 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
16 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
17 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
18 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
19 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
20 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
21 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
22 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
23 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
24 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
25 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
27 * include/bits/alloc_traits.h: Remove redundant preprocessor
30 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
32 * include/bits/stl_algobase.h (__niter_wrap): New.
33 (__copy_move_a2(_II, _II, _OI)): Use latter.
34 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
35 (fill_n(_OI, _Size, const _Tp&)): Likewise.
36 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
37 * include/debug/stl_iterator.h
38 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
39 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
40 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
41 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
43 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
45 P0758R1 Implicit conversion traits
46 * include/std/type_traits [__cplusplus > 201703]
47 (__is_convertible_helper::__is_nothrow_type): Define new member.
48 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
50 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
51 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
53 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
54 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
55 * testsuite/20_util/is_nothrow_convertible/requirements/
56 explicit_instantiation.cc: New.
57 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
60 P0887R1 The identity metafunction
61 * include/std/type_traits (type_identity, type_identity_t): Define
63 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
64 * testsuite/20_util/type_identity/requirements/
65 explicit_instantiation.cc:New.
66 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
68 * include/bits/regex.h (sub_match::operator string_type): Call str().
69 (sub_match::compare): Use _M_str() instead of str().
70 (sub_match::_M_compare): New public function.
71 (sub_match::__string_view): New helper type.
72 (sub_match::_M_str): New overloaded functions to avoid creating a
73 string_type object when not needed.
74 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
75 Use sub_match::_M_compare instead of creating string_type objects.
77 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
78 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
80 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
82 * include/std/type_traits (__enable_if_t): Define for C++11.
83 * testsuite/28_regex/sub_match/compare.cc: New.
84 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
86 (input_iterator_wrapper): Use remove_cv for value_type argument of
87 std::iterator base class.
89 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
91 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
92 Add whitespace to dejagnu directive.
93 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
95 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
97 * include/bits/stl_vector.h
98 (struct _Vector_base<>::_Vector_impl_data): New.
99 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
100 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
101 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
102 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
103 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
104 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
105 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
106 (_Vector_base()): Default.
107 (_Vector_base(_Vector_base&&)): Default.
108 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
109 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
110 (_Vector_base::_M_create_storage(size_t)): Make protected.
112 (vector(vector&&)): Default.
113 (vector(vector&&, const allocator_type&, true_type)): New.
114 (vector(vector&&, const allocator_type&, false_type)): New.
115 (vector(vector&&, const allocator_type&)): Use latters.
116 (vector(_InputIte, _InputIte, const allocator_type&)): Call
117 _M_range_initialize directly.
118 * include/debug/vector
119 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
120 * testsuite/23_containers/vector/allocator/default_init.cc: New.
121 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
124 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
126 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
127 (__is_byte<byte>): Define specialization for std::byte.
130 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
131 Declare explicit instantiations of COW empty reps and I/O functions.
133 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
135 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
137 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
139 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
141 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
144 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
147 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
148 Replace dict comprehension.
151 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
154 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
156 * testsuite/23_containers/vector/cons/86292.cc: New.
158 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
160 * include/experimental/algorithm (sample, shuffle): Add new overloads
161 using per-thread random number engine.
162 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
163 dependencies by using __gnu_test::test_container.
164 * testsuite/experimental/algorithm/sample-2.cc: New.
165 * testsuite/experimental/algorithm/shuffle.cc: New.
167 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
169 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
170 different size_t mangling on 32-bit targets.
173 * include/experimental/memory_resource
174 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
175 enough for result of left shift.
178 * include/bits/basic_string.tcc:
179 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
180 (basic_string<char>::_Rep::_S_empty_rep_storage)
181 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
182 instantiation declarations.
183 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
184 explicit instantiation declarations.
185 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
186 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
188 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
191 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
192 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
193 * configure: Regenerate.
194 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
195 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
196 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
197 (basic_string::insert(iterator, initializer_list<C>)): Suppress
199 * include/debug/string (basic_string::insert(iterator, C)): Change
200 first parameter to const_iterator.
201 (basic_string::insert(iterator, size_type, C)): Likewise. Change
202 return type to iterator.
203 (basic_string::insert(iterator, InputIterator, InputIterator)):
205 (basic_string::insert(iterator, initializer_list<C>)): Change first
206 parameter to const_iterator and return type to iterator.
207 * src/c++11/string-inst.cc: Extend comment.
208 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
210 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
212 * testsuite/util/testsuite_abi.cc: Add new symbol version.
214 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
217 * include/experimental/memory_resource
218 (__resource_adaptor_imp::do_deallocate): Add missing return.
219 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
220 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
221 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
222 __gnu_cxx::malloc_allocator.
225 * include/experimental/memory_resource (__resource_adaptor_common):
227 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
228 pointer from unaligned, and vice versa.
229 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
230 allocated pointer to meet alignment request.
231 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
232 original pointer for deallocation.
233 (__resource_adaptor_imp::do_is_equal): Reformat.
234 (__resource_adaptor_imp::_S_aligned_size): Remove.
235 (__resource_adaptor_imp::_S_supported): Remove.
236 (new_delete_resource): Use __gnu_cxx::new_allocator.
237 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
238 extended alignments and use debug_allocator to check for matching
239 allocate/deallocate pairs.
241 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
243 * include/debug/safe_iterator.h
244 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
245 Compare __x base iterator with a value-initialized iterator of the
248 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
251 * include/experimental/memory_resource (__resource_adaptor_imp): Add
252 static assertions to enforce requirements on pointer types.
253 (__resource_adaptor_imp::get_allocator()): Add noexcept.
254 (new_delete_resource, null_memory_resource): Return address of an
255 object with dynamic storage duration.
256 (__null_memory_resource): Remove.
257 * testsuite/experimental/memory_resource/70966.cc: New.
259 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
260 missed from recent commit.
262 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
264 * include/std/utility: Remove unused <exception> header.
266 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
268 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
269 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
270 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
271 a specialization of std::pair.
272 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
273 pair elements are constructed correctly.
275 LWG 2989 hide path iostream operators from normal lookup
276 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
278 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
280 LWG 3050 Fix cv-qualification of convertibility constraints
281 * include/std/chrono (duration, operator*, operator/, operator%): Use
282 const-qualified type as source type in is_convertible constraints.
283 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
284 * testsuite/20_util/duration/cons/dr3050.cc: New.
285 * testsuite/20_util/duration/literals/range.cc: Rename to...
286 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
289 2018-06-18 Maya Rashish <coypu@sdf.org>
291 * crossconfig.m4: Handle OpenBSD just like NetBSD.
292 * configure: Rebuilt.
294 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
296 P0754R2 <version> header
297 * include/Makefile.am: Add new header.
298 * include/Makefile.in: Regenerate.
299 * include/bits/c++config: Change doxygen comment to suggest <version>
301 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
302 unconditionally. Add C++17 and C++20 headers.
303 * include/std/version: New header.
304 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
305 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
306 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
307 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
308 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
309 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
310 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
312 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
313 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
314 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
315 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
316 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
317 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
318 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
320 * testsuite/18_support/headers/version/macros.cc: New.
321 * testsuite/18_support/headers/version/macros.cc: New.
323 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
324 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
326 * config.h.in: Regenerate.
327 * configure: Regenerate.
328 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
330 LWG 3035. std::allocator's constructors should be constexpr
331 * include/bits/allocator.h (allocator): Add constexpr to constructors
332 for C++2a. Replace dynamic exception specifications with NOTHROW
334 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
336 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
337 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
338 to constructors for C++2a.
339 * include/ext/new_allocator.h (new_allocator): Likewise.
341 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
343 LWG 3076 basic_string CTAD ambiguity
344 * doc/xml/manual/intro.xml: Document LWG 3076 change.
345 * include/bits/basic_string.h
346 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
347 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
348 template constrained by _RequireAllocator.
349 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
350 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
352 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
354 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
357 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
360 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
361 (basic_string::data()): Unshare string.
362 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
365 * include/std/string_view (basic_string_view(const CharT*)): Remove
366 check for null pointer and add nonnull attribute.
367 (compare(const CharT*), compare(size_type, size_type, const CharT*))
368 (find(const CharT*, size_type), rfind(const CharT*, size_type))
369 (find_first_of(const CharT*, size_type))
370 (find_last_of(const CharT*, size_type))
371 (find_first_not_of(const CharT*, size_type))
372 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
373 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
374 * testsuite/21_strings/basic_string_view/operations/compare/char/
376 * testsuite/21_strings/basic_string_view/operations/find/char/
378 * testsuite/21_strings/basic_string_view/operations/rfind/char/
382 * include/bits/random.h (random_device(const string&)): Remove
385 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
386 define for C++17 and above.
388 LWG 2993 reference_wrapper<T> conversion from T&&
389 * doc/xml/manual/intro.xml: Document LWG 2993 change.
390 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
391 (reference_wrapper(_Tp&&)): Remove.
392 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
394 (reference_wrapper): Add deduction guide.
395 * testsuite/20_util/reference_wrapper/deduction.cc: New.
396 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
398 LWG 3039 Unnecessary decay in thread and packaged_task
399 * include/std/future (__constrain_pkgdtask): Replace with ...
400 (packaged_task::__not_same): New alias template, using
401 __remove_cvref_t instead of decay.
402 * include/std/thread (thread::__not_same): Add comment.
404 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
406 LWG 3075 basic_string needs deduction guides from basic_string_view
407 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
408 deduction from string views.
409 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
412 LWG 3074 make scalar types non-deduced in valarray non-member functions
413 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
414 scalar parameters to be a non-deduced context.
415 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
417 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
418 * testsuite/26_numerics/valarray/transcend.cc: New.
420 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
421 Move back to <utility>.
422 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
425 P0935R0 Eradicating unnecessarily explicit default constructors
426 * include/backward/strstream (strstreambuf): Add non-explicit default
428 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
430 * include/bits/regex.h (match_results): Likewise.
431 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
433 * testsuite/22_locale/conversions/string/1.cc: Likewise.
434 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
435 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
437 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
438 macro from <utility> and change type to long.
439 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
440 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
443 P0935R0 Eradicating unnecessarily explicit default constructors
444 * include/bits/random.h (uniform_real_distribution::param_type)
445 (normal_distribution::param_type, lognormal_distribution::param_type)
446 (gamma_distribution::param_type, chi_squared_distribution::param_type)
447 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
448 (student_t_distribution::param_type)
449 (bernoulli_distribution::param_type)
450 (binomial_distribution::param_type)
451 (geometric_distribution::param_type)
452 (negative_binomial_distribution::param_type)
453 (poisson_distribution::param_type)
454 (exponential_distribution::param_type)
455 (weibull_distribution::param_type)
456 (extreme_value_distribution::param_type): Add non-explicit default
457 constructors. Remove default argument for first parameter of explicit
459 * include/bits/uniform_int_dist.h
460 (uniform_int_distribution::param_type): Likewise.
462 (beta_distribution::param_type, rice_distribution::param_type)
463 (nakagami_distribution::param_type, pareto_distribution::param_type)
464 (k_distribution::param_type, arcsine_distribution::param_type)
465 (hoyt_distribution::param_type, triangular_distribution::param_type)
466 (von_mises_distribution::param_type)
467 (hypergeometric_distribution::param_type)
468 (logistic_distribution::param_type)
469 (uniform_inside_sphere_distribution::param_type): Likewise.
470 (uniform_on_sphere_distribution::param_type): Make default constructor
472 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
473 Test param_type for non-explicit default constructor.
474 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
476 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
478 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
480 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
482 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
484 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
486 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
488 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
490 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
492 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
494 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
496 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
498 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
500 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
502 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
504 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
506 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
508 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
510 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
512 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
513 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
514 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
515 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
517 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
518 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
519 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
520 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
522 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
523 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
524 * testsuite/ext/random/triangular_distribution/cons/default.cc:
526 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
528 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
530 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
533 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
534 Jonathan Wakely <jwakely@redhat.com>
537 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
538 Default-construct new elements before moving existing ones.
539 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
542 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
545 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
547 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
548 Use node allocator to create and destroy elements.
549 (forward_list::_Tp_alloc_type): Remove unused typedef.
550 (forward_list::_Alloc_traits): Use allocator_traits instead of
551 __gnu_cxx::__alloc_traits.
553 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
555 * include/debug/helper_functions.h
556 (__gnu_debug::_Safe_iterator<>): Add declaration.
557 (__can_advance(_Ite, _Size)): New.
558 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
559 * include/debug/functions.h
560 (__gnu_debug::_Safe_iterator<>): Remove declaration.
561 * include/debug/stl_iterator.h
562 (__can_advance(const _Safe_iterator<>&)): New definition.
563 * include/debug/stl_iterator.h
564 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
565 (__can_advance(const std::move_iterator<>&, _Size)): New.
566 * include/debug/macros.h (__glibcxx_check_can_increment): New.
567 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
568 * include/bits/stl_algobase.h (fill_n): Use latter.
569 * testsuite/25_algorithms/fill_n/2.cc: New.
570 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
571 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
572 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
573 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
575 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
576 (__glibcxx_requires_can_decrement_range): New.
578 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
580 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
581 (__glibcxx_check_can_decrement_range): New.
582 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
583 __glibcxx_requires_can_increment_range.
584 (std::move(_II, _II, _OI)): Likewise.
585 (std::copy_backward(_BI, _BI, _BI2)): Use
586 __glibcxx_requires_can_decrement_range.
587 (std::move_backward(_BI, _BI, _BI2)): Likewise.
588 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
589 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
590 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
591 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
592 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
593 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
595 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
597 P0935R0 Eradicating unnecessarily explicit default constructors
598 * include/bits/random.h (linear_congruential_engine)
599 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
600 (uniform_real_distribution, normal_distribution)
601 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
602 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
603 (bernoulli_distribution, binomial_distribution,geometric_distribution)
604 (negative_binomial_distribution, exponential_distribution)
605 (weibull_distribution, extreme_value_distribution): Add non-explicit
606 default constructors. Remove default argument for first parameter of
607 explicit constructors.
608 (piecewise_constant_distribution, piecewise_linear_distribution):
609 Make default constructor non-explicit.
610 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
611 non-explicit default constructors. Remove default argument for first
612 parameter of explicit constructor.
614 (simd_fast_mersenne_twister_engine, beta_distribution)
615 (rice_distribution, nakagami_distribution, pareto_distribution)
616 (k_distribution, arcsine_distribution, hoyt_distribution)
617 (triangular_distribution, von_mises_distribution)
618 (hypergeometric_distribution, logistic_distribution)
619 (uniform_inside_sphere_distribution): Likewise.
620 (uniform_on_sphere_distribution): Make default constructor
622 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
623 Test for non-explicit default constructor. Fix references to standard.
624 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
626 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
628 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
630 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
632 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
634 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
636 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
638 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
640 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
642 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
644 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
646 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
648 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
650 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
652 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
654 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
656 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
658 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
660 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
662 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
663 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
664 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
665 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
667 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
668 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
669 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
670 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
672 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
673 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
674 * testsuite/ext/random/triangular_distribution/cons/default.cc:
676 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
678 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
680 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
682 * testsuite/util/testsuite_common_types.h
683 (implicitly_default_constructible): New helper.
685 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
687 * include/bits/ios_base.h (ios::Init::Init(const Init&))
688 (ios::Init::operator=): Define as defaulted.
689 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
691 * include/bits/stream_iterator.h (istream_iterator::operator=)
692 (ostream_iterator::operator=): Likewise.
693 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
695 * include/std/bitset (bitset::reference::reference(const reference&)):
697 * include/std/complex (complex<float>::complex(const complex&))
698 (complex<double>::complex(const complex&))
699 (complex<long double>::complex(const complex&)): Likewise.
701 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
703 * include/bits/regex.h (sub_match): Add noexcept to default
704 constructor and length observer.
705 (match_results): Add noexcept to default constructor and observers
706 with no preconditions. Define destructor as defaulted.
707 (operator==, operator!=, swap): Add noexcept.
708 (regex_iterator): Add default member initializers and define default
709 constructor and destructor as defaulted. Add noexcept to equality
710 and dereference operators.
712 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
715 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
716 (_Safe_iterator_base::_M_detach_single()): Likewise.
717 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
718 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
720 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
722 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
725 2018-06-06 Jakub Jelinek <jakub@redhat.com>
728 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
729 rather than __cpp_transactional_memory >= 201505L.
731 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
734 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
735 Define new partial specialization.
736 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
738 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
739 value not reference for iteration.
740 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
742 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
743 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
746 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
748 * include/std/type_traits: Fix comment typos.
750 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
752 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
753 * testsuite/experimental/filesystem/operations/read_symlink.cc:
756 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
758 * include/bits/stl_tempbuf.h
759 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
760 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
761 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
762 * include/bits/stl_algo.h (__stable_partition): Adapt.
763 (__inplace_merge): Adapt.
764 (__stable_sort): Adapt.
766 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
769 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
770 unconditionally. Remove redundant declaration.
771 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
774 * include/bits/postypes.h (fpos): Define special members as defaulted.
777 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
778 the static variable correctly.
780 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
782 PR libstdc++/78870 support std::filesystem on Windows
783 * config.h.in: Regenerate.
784 * configure: Regenerate.
785 * configure.ac: Check for link, readlink and symlink.
786 * include/bits/fs_path.h (path::operator/=(const path&)): Move
787 definition out of class body.
788 (path::is_absolute(), path::_M_append(path)): Likewise.
789 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
790 (operator>>(basic_istream, path&)): Likewise.
791 (u8path): Reorder definitions and fix Windows implementation.
792 (path::is_absolute()): Define inline and fix for Windows.
793 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
794 Define POSIX version inline.
795 (path::_M_append(path)): Define inline.
796 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
797 definition out of class body.
798 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
800 (operator>>(basic_istream, path&)): Likewise.
801 (path::is_absolute()): Define inline and fix for Windows.
802 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
803 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
804 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
805 Define as adaptors for Windows functions/types or as
806 using-declarations for POSIX functions/types.
807 (_Dir_base, get_file_type): Qualify names to use declarations from
808 __gnu_posix namespace.
809 (_Dir_base::is_dor_or_dotdot): New helper functions.
810 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
811 names to use declarations from __gnu_posix namespace.
812 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
813 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
814 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
815 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
816 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
817 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
818 Define as adaptors for Windows functions/types or as
819 using-declarations for POSIX functions/types.
820 (stat_type, do_copy_file): Qualify names to use declarations from
821 __gnu_posix namespace.
822 (do_space): Declare new function.
823 (make_file_type): Only use S_ISLNK if defined.
824 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
825 path::value_type not char.
826 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
827 names to use declarations from __gnu_posix namespace.
828 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
829 add implementation for Windows.
830 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
831 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
832 [!_PC_PATH_MAX]: Don't use pathconf.
833 [PATH_MAX]: Use if defined.
834 (filesystem::current_path(const path&, error_code&))
835 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
836 (filesystem::last_write_time, filesystem::permissions): Use names
838 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
839 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
840 implementation for Windows.
841 (filesystem::rename, filesystem::resize_file): Use names from
843 (filesystem::space): Use do_space.
844 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
845 (filesystem::status, filesystem::symlink_status): Use names from
847 (filesystem::temp_directory_path): Add implementation for Windows.
848 * src/filesystem/path.cc (dot): Define constant.
849 (path::replace_extension): Use dot.
850 (path::_M_find_extension): Likewise. Use path::string_type not
852 (path::_M_split_cmpts): Use dot.
853 (filesystem_error::_M_get_what): Use u8string() not native().
854 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
855 Qualify names to use declarations from __gnu_posix namespace.
856 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
858 (filesystem::absolute(const path&, error_code&)): Add implementation
860 (char_ptr, filesystem::canonical): Use path::value_type not char.
861 (do_copy_file): Use names from __gnu_posix.
862 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
864 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
865 names to use declarations from __gnu_posix namespace.
866 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
867 add implementation for Windows.
868 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
869 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
870 [!_PC_PATH_MAX]: Don't use pathconf.
871 [PATH_MAX]: Use if defined.
872 (filesystem::current_path(const path&, error_code&))
873 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
874 (filesystem::last_write_time, filesystem::permissions): Use names
876 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
877 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
878 implementation for Windows.
879 (filesystem::rename, filesystem::resize_file): Use names from
882 (filesystem::space): Use do_space.
883 (filesystem::status, filesystem::symlink_status): Use names from
885 (filesystem::temp_directory_path): Add implementation for Windows.
886 * src/filesystem/std-path.cc
887 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
889 (dot): Define constant.
890 (path::replace_extension, is_dot): Use dot.
891 (path::lexically_normal): Check _M_type instead of calling
892 non-existent function.
893 (path::_M_find_extension): Use dot. Use path::string_type not
895 (path::_M_split_cmpts): Use dot.
896 (filesystem_error::_M_get_what): Use u8string() not native().
897 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
899 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
901 * testsuite/27_io/filesystem/operations/absolute.cc: Use
902 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
903 * testsuite/27_io/filesystem/operations/canonical.cc: Use
904 path::string() to get narrow string, not path::native().
905 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
906 with std::filesystem::path not std::basic_string.
907 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
908 * testsuite/27_io/filesystem/operations/exists.cc: Use
909 __gnu_test::root_path() instead of "/".
910 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
911 fstreams with std::filesystem::path not std::basic_string.
912 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
913 path::string() to get narrow string.
914 * testsuite/27_io/filesystem/operations/space.cc: Check results for
915 errors, expect sensible values otherwise.
916 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
917 helpers for adjusting the environment on Windows.
918 * testsuite/27_io/filesystem/path/append/path.cc: Test
919 Windows-specific behaviour.
920 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
921 of path::string_type objects.
922 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
923 string to wide string on Windows.
924 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
925 for backslash as root-directory.
926 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
927 path::string() to get narrow string.
928 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
930 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
932 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
933 different definintion of absolute paths on Windows.
934 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
936 * testsuite/experimental/filesystem/operations/absolute.cc: Test
938 * testsuite/experimental/filesystem/operations/copy.cc: Construct
939 fstreams with NTCTS not std::basic_string.
940 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
941 * testsuite/experimental/filesystem/operations/exists.cc: Use
942 __gnu_test::root_path() instead of "/".
943 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
944 fstreams with NTCTS not std::basic_string.
945 * testsuite/experimental/filesystem/operations/last_write_time.cc:
946 Use path::string() to get narrow string.
947 * testsuite/experimental/filesystem/operations/space.cc: Use
948 __gnu_test::root_path() instead of "/".
949 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
950 Add helpers for adjusting the environment on Windows.
951 * testsuite/experimental/filesystem/path/append/path.cc: Use
952 path::string() to get narrow strings for comparisons.
953 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
954 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
956 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
957 * testsuite/experimental/filesystem/path/native/string.cc: Use
958 string_type not std::string.
959 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
960 Adjust for different definintion of absolute paths on Windows.
961 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
963 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
966 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
969 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
970 uint_least16_t and uint_least32_t.
971 (__make_unsigned<wchar_t>): Define unconditionally.
972 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
974 (__make_unsigned_selector_base): New type to provide helper templates.
975 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
976 __make_unsigned_selector_base helpers.
977 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
978 (__make_signed_selector<_Tp, true, false>): Remove intermediate
980 (__make_signed<wchar_t>, __make_signed<char16_t>)
981 (__make_signed<char32_t>)): Define unconditionally.
982 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
983 wchar_t, char16_t and char32_t are transformed correctly.
984 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
986 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
987 wchar_t, char16_t and char32_t are transformed correctly.
988 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
991 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
993 * include/std/variant (__erased_dtor): Qualify call to __get.
995 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
997 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
998 (_Rb_tree(const allocator_type&)): Use latter.
999 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
1000 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
1001 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1002 * include/bits/stl_multimap.h
1003 (multimap(const allocator_type&)): Likewise.
1004 (multimap(initializer_list<value_type>, const allocator_type&)):
1006 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
1008 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
1009 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
1010 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1011 * include/bits/stl_multiset.h
1012 (multiset(const allocator_type&)): Likewise.
1013 (multiset(initializer_list<value_type>, const allocator_type&)):
1015 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
1018 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
1021 * src/c++11/debug.cc: Remove backtrace usage.
1023 2018-05-24 Maya Rashish <coypu@sdf.org>
1026 * crossconfig.m4: Test for aligned_alloc on netbsd.
1027 * configure: Regenerate.
1029 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1033 * include/bits/atomic_base.h (__atomic_base::value_type)
1034 (__atomic_base::difference_type): Add new typedefs.
1035 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
1036 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
1037 (atomic<T*>::operator++, atomic<T*>::operator--)
1038 (atomic<T*>::operator+=, atomic<T*>::operator-=)
1039 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
1040 to enforce C++17 requirement on pointer arithmetic.
1041 (__atomic_val_t, __atomic_diff_t): New alias templates.
1042 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
1043 (atomic_compare_exchange_weak_explicit)
1044 (atomic_compare_exchange_strong_explicit, atomic_store)
1045 (atomic_exchange, atomic_compare_exchange_weak)
1046 (atomic_compare_exchange_strong): Use __atomic_val_t to make
1047 scalar parameters be non-deduced contexts.
1048 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1049 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
1050 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
1052 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
1053 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
1054 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
1055 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1056 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
1058 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
1059 * testsuite/29_atomics/atomic/69769.cc: New test.
1060 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
1061 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
1062 Disable test for C++17 and later.
1063 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
1064 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
1065 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
1068 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
1070 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
1071 template to alias template.
1072 (path::__value_type_is_char): Use remove_const_t.
1073 (path:_S_string_from_iter): New helper function.
1074 (path::_S_convert(InputIter, __null_terminated))
1075 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1076 Use _S_string_from_iter.
1077 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
1078 rep for COW strings.
1079 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1080 Change from class template to alias template.
1081 (path::__value_type_is_char): Use remove_const.
1082 (path:_S_string_from_iter): New helper function.
1083 (path::_S_convert(InputIter, __null_terminated))
1084 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1085 Use _S_string_from_iter.
1086 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
1088 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
1089 string equality, not path equivalence.
1090 * testsuite/27_io/filesystem/path/construct/format.cc: Check
1091 construction from std::string and std::wstring and input iterators.
1092 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
1093 construction from iterators.
1094 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1095 exact string equality, not path equivalence.
1096 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1097 construction from iterators.
1099 * include/bits/fs_path.h (path::_M_type): Change default member
1100 initializer to _Filename.
1101 (path::begin): Create past-the-end iterator for empty path.
1102 * src/filesystem/std-path.cc (path::remove_filename()): Remove
1104 (path::has_relative_path()): Return false for empty filenames.
1105 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1106 Fix offset of empty final component.
1107 * testsuite/27_io/filesystem/path/itr/components.cc: New.
1108 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1110 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1112 Add support for opening file streams from wide character strings.
1113 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1114 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1115 Define new overload.
1116 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1117 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1118 Declare new overload.
1119 * configure.ac: Check for _wfopen.
1120 * crossconfig.m4: Likewise.
1121 * configure: Regenerate.
1122 * config.h.in: Regenerate.
1123 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1124 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1125 Define new overload.
1126 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1127 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1128 Declare new overload.
1129 [_GLIBCXX_HAVE__WFOPEN]
1130 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1131 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1132 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1133 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1134 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1135 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1137 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1138 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1139 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1140 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1141 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1142 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1143 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1145 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
1148 * include/bits/stl_tree.h
1149 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1152 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1154 * src/filesystem/std-ops.cc (absolute): Report an error for empty
1156 (weakly_canonical(const path&)): Do not call canonical on empty path.
1157 (weakly_canonical(const path&, error_code&)): Likewise.
1158 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1161 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1162 dg-require-filesystem-ts.
1165 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1166 initialize base class to avoid warnings.
1168 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
1170 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1171 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1172 little_endian element in bitmask.
1173 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1174 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1176 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
1178 * include/bits/stl_tree.h
1179 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1180 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1181 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1182 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1183 * include/debug/map.h
1184 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1185 * include/debug/multimap.h
1186 (multimap(multimap&&, const_allocator_type&)): Likewise.
1187 * include/debug/set.h
1188 (set(set&&, const_allocator_type&)): Likewise.
1189 * include/debug/multiset.h
1190 (multiset(multiset&&, const_allocator_type&)): Likewise.
1191 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1193 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1195 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1197 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1199 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1201 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1203 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1205 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1208 2018-05-18 Jason Merrill <jason@redhat.com>
1210 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1211 for conversion to const_iterator. Add defaulted copy ops.
1212 * libsupc++/new (bad_alloc): Add defaulted copy ops.
1213 * libsupc++/exception.h (exception): Add defaulted copy ops.
1214 * include/std/system_error (system_error): Add defaulted copy ops.
1215 * include/std/stdexcept (domain_error, invalid_argument)
1216 (length_error, out_of_range, range_error, overflow_error)
1217 (underflow_error): Add defaulted copy ops.
1218 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1220 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1221 * include/ext/throw_allocator.h (condition_base): Add defaulted
1222 default and copy ctor and copy assignment.
1224 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
1227 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1228 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1229 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1230 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1232 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1234 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1235 braces around body of do-while.
1236 * testsuite/28_regex/basic_regex/85098.cc: New
1238 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
1241 * src/filesystem/path.cc (path::preferred_separator): Add used
1243 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1246 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1247 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1248 Refactor to separate non-throwing and throwing implementations.
1249 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1250 if constructing the object throws.
1252 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
1255 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1256 (linear_congruential_engine, mersenne_twister_engine)
1257 (subtract_with_carry_engine, discard_block_engine)
1258 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1259 constrain function templates taking seed sequences.
1260 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1261 (mersenne_twister_engine::seed(_Sseq&))
1262 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1264 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1265 __is_seed_seq to constrain function templates taking seed sequences.
1266 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1267 Change return type to match declaration.
1268 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1270 * testsuite/26_numerics/random/independent_bits_engine/cons/
1272 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1274 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1276 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1277 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1279 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1281 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1285 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1286 for all operating systems.
1287 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1288 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1289 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1290 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1292 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1293 unused <vector> header.
1294 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1295 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1296 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1297 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1298 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1300 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1302 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1303 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1304 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1305 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1306 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1308 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1309 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1311 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1313 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1315 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1317 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1319 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1321 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1323 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1324 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1328 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1329 temporary path before calling _M_append.
1330 (path::_M_append): Change parameter to path and implement C++17
1332 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1333 and more examples from the standard.
1334 * testsuite/27_io/filesystem/path/append/source.cc: New.
1335 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1336 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1338 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1339 __invoke to prevent ADL.
1341 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
1344 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1345 exceptions from _M_terminate_output().
1346 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1347 exceptions from close().
1348 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1350 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1351 (__valarray_get_storage): Call operator new directly. Remove ignored
1352 top-level restrict qualifier and add malloc attribute instead.
1353 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1356 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1357 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1360 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1362 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1364 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1367 * testsuite/20_util/variant/80165.cc: New.
1369 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1371 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1372 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1373 of C++11 containers with Debug Mode support.
1374 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1375 * doc/html/*: Regenerate.
1377 2018-05-10 Jason Merrill <jason@redhat.com>
1379 * include/bits/regex_compiler.h (_S_cache_size): Change from
1380 function to variable.
1382 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1384 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1385 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1386 argument defaulted to +1. Doxy comments on same.
1387 * testsuite/special_functions/02_assoc_legendre/
1388 check_value.cc: Regen.
1389 * testsuite/tr1/5_numerical_facilities/special_functions/
1390 02_assoc_legendre/check_value.cc: Regen.
1392 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1395 * include/bits/c++config.h (__replacement_assert): Add linkage
1397 * include/bits/std_abs.h: Add comment to closing brace of block.
1398 * include/c_global/cstddef: Add linkage specification.
1399 * include/c_global/cstring: Likewise.
1400 * include/c_global/cwchar: Likewise.
1402 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1404 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1406 (_Safe_iterator<>::_S_constant()): ...that.
1407 * include/debug/safe_local_iterator.h
1408 (_Safe_local_iterator<>::_M_constant()): Rename in...
1409 (_Safe_local_iterator<>::_S_constant()): ...that.
1410 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1411 (_Iterator_state::__rbegin): New.
1412 (_Iterator_state::__rmiddle): New.
1413 (_Iterator_state::__rend): New.
1414 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1415 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1417 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1418 _Is_iterator)): Likewise.
1419 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1420 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1421 _Is_iterator)): New.
1422 (_Parameter(std::reverse_iterator<> const&, const char*,
1423 _Is_iterator)): New.
1424 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1425 const char*, _Is_iterator)): New.
1426 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1428 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1429 _Is_iterator)): New.
1430 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1431 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1432 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1434 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1436 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1437 Use constexpr if in C++17 mode.
1438 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1439 Copy from const object.
1440 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1442 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1444 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1445 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1448 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1449 * include/debug/functions.h (__check_valid_range): Use latter.
1450 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1452 * include/debug/deque
1453 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1454 * include/debug/forward_list
1455 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1457 * include/debug/list
1458 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1459 * include/debug/list
1460 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1461 * include/debug/map.h
1462 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1463 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1465 * include/debug/multimap.h
1466 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1467 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1468 const _Alloc&)): Likewise.
1469 * include/debug/set.h
1470 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1471 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1473 * include/debug/multiset.h
1474 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1475 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1476 const _Alloc&)): Likewise.
1477 * include/debug/string
1478 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1480 * include/debug/unordered_map
1481 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1483 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1484 const _Alloc&)): Likewise.
1485 * include/debug/unordered_set
1486 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1488 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1489 const _Alloc&)): Likewise.
1490 * include/debug/vector
1491 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1493 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1494 (_Error_formatter(const char*, unsigned int)): Adapt.
1495 (_Error_formatter::_M_at): Rename in...
1496 (_Error_formatter::_S_at): ...that and adapt.
1497 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1498 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1499 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1502 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1504 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1505 Use normal std::vector even in Debug Mode.
1508 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1509 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1510 * include/Makefile.in: Regenerate.
1511 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1512 within conditional block.
1514 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1516 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1517 C++17 Filesystem implementation also needs -lstdc++fs.
1520 * include/bits/fs_path.h (operator/): Permit copy elision.
1521 * include/experimental/bits/fs_path.h (operator/): Likewise.
1523 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1525 Moar PR libstdc++/80506
1526 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1527 Fix magic number used in loop condition.
1529 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1531 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1532 * include/std/optional (_Optional_payload): Add noexcept to default
1533 constructor. Re-indent.
1534 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1535 constructor for copying disengaged payloads.
1536 (_Optional_payload<_Tp, true, false, true>): Likewise.
1537 (_Optional_payload<_Tp, true, true, false>): Likewise.
1538 (_Optional_payload<_Tp, true, false, false>): Likewise.
1539 * testsuite/20_util/optional/cons/85642.cc: New.
1540 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1542 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1545 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1546 inline definitions instead of using-declarations.
1547 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1548 * testsuite/tr1/5_numerical_facilities/special_functions/
1549 07_conf_hyperg/compile_cxx17.cc: New.
1550 * testsuite/tr1/5_numerical_facilities/special_functions/
1551 17_hyperg/compile_cxx17.cc: New.
1554 * include/std/variant (visit): Qualify std::get call.
1556 PR libstdc++/85632 use uintmax_t for arithmetic
1557 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1558 arithmetic in result type.
1559 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1560 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1561 is greater than free space.
1562 * testsuite/experimental/filesystem/operations/space.cc: New.
1564 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1565 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1567 * testsuite/20_util/remove_cvref/value.cc: New.
1568 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1570 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1571 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1572 (append(const basic_string&, size_type, size_type)
1573 (assign(const basic_string&, size_type, size_type)
1574 (insert(size_type, const basic_string&, size_type, size_type)
1575 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1576 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1577 Add default arguments (LWG 2268).
1578 [_GLIBCXX_USE_CXX11_ABI=0]
1579 (append(const basic_string&, size_type, size_type)
1580 (assign(const basic_string&, size_type, size_type)
1581 (insert(size_type, const basic_string&, size_type, size_type)
1582 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1583 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1585 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1588 * include/std/thread (thread::__not_same): New SFINAE helper.
1589 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1590 first argument is not a std::thread. Add static assertion to check
1591 INVOKE expression is valid.
1592 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1593 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1594 __invoke_result for return types and remove exception specifications.
1595 * testsuite/30_threads/thread/cons/84535.cc: New.
1597 * include/std/future (__async_result_of): Use __invoke_result instead
1600 * include/std/any (any_cast): Use __remove_cvref_t.
1601 * include/std/tuple (__make_tuple): Likewise.
1602 * include/std/type_traits (__remove_cvref_t): Define.
1603 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1604 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1605 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1607 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1609 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1610 ensure overloaded comma not used.
1611 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1612 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1613 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1614 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1615 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1616 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1617 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1619 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1622 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1623 indices to unsigned.
1624 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1625 as failure. Refactor error handling.
1626 * testsuite/27_io/ios_base/storage/68197.cc: New.
1630 * include/bits/gslice_array.h (gslice_array): Define default
1631 constructor as deleted, as per C++11 standard.
1632 * include/bits/mask_array.h (mask_array): Likewise.
1633 * include/bits/slice_array.h (slice_array): Likewise.
1634 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1635 to namespace __detail.
1636 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1638 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1639 of data members in closure objects.
1640 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1641 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1643 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1644 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1645 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1646 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1647 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1648 using-declarations to namespace std.
1649 * testsuite/26_numerics/valarray/83860.cc: New.
1651 * testsuite/backward/strstream_move.cc: Remove duplicate function
1655 * include/backward/strstream (strstreambuf): Define move constructor
1656 and move assignment operator.
1657 (istrstream, ostrstream, strstream): Likewise.
1658 * testsuite/backward/strstream_move.cc: New.
1660 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1663 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1664 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1665 * configure: Regenerate.
1666 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1667 based on ENABLE_FLOAT128.
1668 * include/Makefile.in: Regenerate.
1669 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1670 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1671 _GLIBCXX_USE_FLOAT128.
1673 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1675 * configure: Regenerated.
1677 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1679 * configure: Regenerated.
1681 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1682 Jakub Jelinek <jakub@redhat.com>
1685 * src/c++11/Makefile.am: Don't generate debuginfo again for
1686 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1687 * src/c++11/Makefile.in: Regenerate.
1689 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1692 * testsuite/30_threads/thread/cons/terminate.cc
1693 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1695 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1698 * configure: Regenerate.
1700 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1702 * testsuite/experimental/filesystem/file_status/1.cc: Add
1703 -DUSE_FILESYSTEM_TS to dg-options.
1704 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1706 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1707 * testsuite/experimental/filesystem/iterators/
1708 recursive_directory_iterator.cc: Likewise.
1709 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1710 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1711 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1712 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1713 * testsuite/experimental/filesystem/operations/create_directories.cc:
1715 * testsuite/experimental/filesystem/operations/create_directory.cc:
1717 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1719 * testsuite/experimental/filesystem/operations/current_path.cc:
1721 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1722 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1723 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1724 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1725 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1727 * testsuite/experimental/filesystem/operations/permissions.cc:
1729 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1731 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1732 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1733 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1734 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1736 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1737 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1738 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1739 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1740 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1741 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1742 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1743 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1744 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1745 * testsuite/experimental/filesystem/path/construct/default.cc:
1747 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1748 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1749 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1751 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1753 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1755 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1757 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1759 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1761 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1763 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1765 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1766 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1768 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1769 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1770 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1772 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1774 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1776 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1778 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1779 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1780 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1782 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1783 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1785 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1787 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1789 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1791 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1793 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1795 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1797 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1798 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1801 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
1803 * src/c++11/Makefile.am: Fix sed command.
1804 * src/c++11/Makefile.in: Regenerate.
1806 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1807 handle mangled names starting with double underscores on darwin.
1808 * src/c++11/Makefile.in: Regenerate.
1810 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
1812 * src/c++11/Makefile.am: Fix comment.
1813 * src/c++11/Makefile.in: Regenerate.
1814 * src/c++11/cxx11-ios_failure.cc: Fix comment.
1815 * src/c++98/ios_failure.cc: Likewise.
1817 * src/c++11/ios.cc: Remove redundant macro definition.
1819 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
1821 * doc/xml/manual/abi.xml: Document header locations in recent
1823 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1824 * doc/xml/manual/spine.xml: Update copyright years.
1825 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1826 undefined behaviour.
1827 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1828 * doc/html/*: Regenerate.
1830 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
1832 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1833 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1834 * doc/xml/manual/containers.xml: Likewise.
1835 * doc/xml/manual/debug_mode.xml: Likewise.
1836 * doc/xml/manual/extensions.xml: Likewise.
1837 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1838 * doc/xml/manual/using.xml: Likewise.
1839 * doc/xml/manual/utilities.xml: Likewise.
1842 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1843 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1844 * src/c++11/Makefile.in: Regenerate.
1845 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1847 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1848 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1849 * src/c++98/ios_failure.cc (__construct_ios_failure)
1850 (__destroy_ios_failure, is_ios_failure_handler): New functions.
1851 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1852 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1853 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1854 handler types, to always catch std::ios_base::failure.
1855 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1856 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1857 exceptions_failbit.cc: Likewise.
1858 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1859 exceptions_failbit.cc: Likewise.
1860 * testsuite/27_io/basic_istream/extractors_other/char/
1861 exceptions_null.cc: Likewise.
1862 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1863 exceptions_null.cc: Likewise.
1864 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1865 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1866 * testsuite/27_io/basic_ostream/inserters_other/char/
1867 exceptions_null.cc: Likewise.
1868 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1869 exceptions_null.cc: Likewise.
1870 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1872 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
1874 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1875 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1877 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
1880 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1882 * testsuite/20_util/variant/85183.cc: New.
1884 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
1886 * include/std/variant (__get): Qualify calls to avoid ADL.
1887 (__select_index): Adjust whitespace.
1888 (variant): Add using-declaration to workaround Clang bug.
1890 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
1893 * include/bits/stl_function.h (greater::__not_overloaded)
1894 (less::__not_overloaded, greater_equal::__not_overloaded)
1895 (less_equal::__not_overloaded): Fix ambiguous specializations.
1896 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1897 tests for type with overloaded operators.
1899 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1902 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1903 xfail execution on 32-bit Solaris/x86.
1905 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
1907 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1908 VERIFY instead of assert.
1909 * testsuite/20_util/hash/84998.cc: New test.
1910 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1911 copy of test adjusted for Debug Mode.
1912 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1915 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
1918 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1919 * include/std/bitset: Likewise.
1920 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1922 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1923 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1924 * include/bits/stl_set.h (std::set<>): Likewise.
1925 * include/bits/unordered_map.h (std::unordered_map<>): Fix
1926 _Hash_merge_helper friend declaration.
1927 (std::unordered_multimap<>): Likewise.
1928 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1929 (std::unordered_multiset<>): Likewise.
1931 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1933 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1934 trailing slash for domain level link.
1935 * doc/xml/faq.xml: Ditto.
1936 * doc/xml/manual/appendix_free.xml (software): Ditto.
1937 * doc/xml/manual/intro.xml: Ditto.
1938 * doc/xml/manual/spine.xml: Ditto.
1939 * doc/xml/spine.xml: Ditto.
1941 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
1943 * doc/xml/manual/documentation_hacking.xml: Adjust link to
1946 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
1948 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1949 to compile as C++98.
1951 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
1954 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1955 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1956 to ensure total order for pointers.
1957 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1958 Add operator() overloads for pointer arguments and make generic
1959 overloads dispatch to new _S_cmp functions when comparisons would
1960 use built-in operators for pointers.
1961 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1963 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
1967 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1968 * configure: Regenerate.
1969 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1970 (aligned_alloc): Add using-declaration.
1971 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1973 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
1975 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1976 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1979 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
1982 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1983 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1985 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1986 src/filesystem/std-ops.cc (create_dir): Likewise.
1988 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
1990 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1991 (StdListIteratorPrinter): Inherit from latter.
1992 (StdFwdListIteratorPrinter): New, inherit from latter.
1993 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1994 when iterator has no associated container.
1995 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1996 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1998 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1999 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
2001 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2004 * include/std/optional (_Optional_payload): Split into multiple
2005 specializations that can handle different cases of trivial or
2006 non-trivial assignment operators.
2007 * testsuite/20_util/optional/84601.cc: New.
2008 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2010 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
2013 * include/bits/parse_numbers.h (_Number_help): Add partial
2014 specialization to handle digit separators. Adjust partial
2015 specialization for recursion temrination to require _Pow == 1ULL.
2016 * testsuite/20_util/duration/literals/84671.cc: New
2018 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
2020 Implement the missing bits of LWG 2769
2021 * include/std/any (any_cast(const any&)): Add static_assert.
2022 (any_cast(any&)): Likewise.
2023 (any_cast(any&&)): Likewise, and remove the handling
2024 for copyable-but-not-movable type.
2025 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
2026 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
2029 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
2032 * include/std/thread (thread::__make_invoker): Construct tuple
2033 directly instead of using make_tuple.
2034 * testsuite/30_threads/async/84532.cc: New.
2035 * testsuite/30_threads/thread/84532.cc: New.
2037 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
2039 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
2040 (template<> __aligned_buffer): Define as __aligned_membuf alias.
2042 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
2045 * configure: Regenerate.
2047 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
2050 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
2051 * configure: Regenerate.
2052 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
2054 * include/Makefile.in: Regenerate.
2056 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
2059 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2060 Add -ffloat-store to options for m68k and ia32.
2062 * doc/xml/faq.xml: Update copyright years.
2063 * doc/html/*: Regenerate.
2066 * include/std/any (any::__do_emplace): Only set _M_manager after
2067 constructing the contained object.
2068 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
2069 * testsuite/20_util/any/modifiers/83658.cc: New test.
2071 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
2074 * include/c_global/cstddef (__byte_operand): Define primary template.
2075 * testsuite/18_support/byte/81076.cc: New test.
2077 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
2079 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
2080 dg-options and dg-add-options order.
2081 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
2082 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
2084 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
2085 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
2087 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
2089 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
2090 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
2092 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
2094 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2096 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2098 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2100 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2102 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2104 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2106 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2107 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2108 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2109 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2110 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2111 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2112 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2113 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2114 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2116 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2118 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2120 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2123 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
2125 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
2126 include linux/types.h when checking linux/random.h header.
2127 * config.h.in: Regenerate.
2129 * src/c++11/random.cc: Conditionally include linux/types.h.
2131 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
2133 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2135 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
2138 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2139 pattern with exact match for std::cerr.
2141 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2144 * include/bits/random.h (chi_squared_distribution::param): Update
2145 gamma distribution parameter.
2146 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2150 * include/std/type_traits (has_unique_object_representations_v): Add
2152 * testsuite/20_util/has_unique_object_representations/value.cc: Check
2155 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
2157 Make optional conditionally
2158 trivially_{copy,move}_{constructible,assignable}
2159 * include/std/optional (_Optional_payload): Fix the comment in
2160 the class head and turn into a primary and one specialization.
2161 (_Optional_payload::_M_engaged): Strike the NSDMI.
2162 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2164 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2166 (_Optional_payload<_Tp, false>::_M_get): Likewise.
2167 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2168 (_Optional_base_impl): Likewise.
2169 (_Optional_base): Turn into a primary and three specializations.
2170 (optional(nullopt)): Change the base init.
2171 * testsuite/20_util/optional/assignment/8.cc: New.
2172 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2173 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2175 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2178 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2179 (get_template_arg_list): New.
2180 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2182 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2183 of strings and regular expressions.
2184 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2185 (FilteringTypePrinter): Add docstring. Match using startswith. Use
2186 strip_inline_namespaces instead of strip_versioned_namespace.
2187 (add_one_type_printer): Prepend namespace to match argument.
2188 (register_type_printers): Add type printers for char16_t and char32_t
2189 string types and for types using cxx11 ABI. Update calls to
2190 add_one_template_type_printer to provide default argument dicts.
2191 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2192 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2193 basic_string<unsigned char> and basic_string<signed char>.
2194 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2195 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2197 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
2200 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2202 2018-01-13 Tim Shen <timshen@google.com>
2205 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2206 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2207 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2209 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2212 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2213 Remove dg-xfail-run-if.
2215 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
2217 * include/bits/forward_list.h
2218 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2219 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2220 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2221 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2222 (_Fwd_list_impl()): Add noexcept qualification.
2223 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2224 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2225 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2226 (_Fwd_list_base()): Default.
2227 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2228 (_Fwd_list_base(_Fwd_list_base&&)): Default.
2229 (forward_list<>()): Default.
2230 (forward_list<>(forward_list&&)): Default.
2231 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2232 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2233 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2234 * include/bits/forward_list.tcc
2235 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2236 _M_impl._M_head move assignment.
2237 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2238 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2240 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
2243 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2244 (UniquePointerPrinter): Print correct template argument, not type of
2246 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2248 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2250 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2251 weak_ptr of array types.
2253 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
2256 * include/bits/hashtable_policy.h
2257 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2259 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2260 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2261 Add false_type parameter.
2262 (_Insert_base::insert): Adapt.
2263 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2265 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2266 Add __n_elt parameter, defaulted to 1.
2267 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2268 policy _M_need_rehash.
2269 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2270 produce only 1 rehash if necessary.
2271 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2272 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2274 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2275 Jonathan Wakely <jwakely@redhat.com>
2277 PR libstdc++/59253 (partial)
2278 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2279 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2280 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2282 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2283 of unique_ptr printer.
2284 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2285 output of shared_ptr printer.
2287 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
2290 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2291 unnecessary symlink_status call.
2292 (remove_all(const path&, error_code&)): Use filesystem::remove.
2293 * src/filesystem/std-ops.cc: Likewise.
2296 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2300 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2301 report an error for ENOENT.
2302 (remove_all(const path&)): Fix type of result variable.
2303 (remove_all(const path&, error_code&)): Use non-throwing increment
2304 for directory iterator. Call POSIX remove directly to avoid redundant
2305 calls to symlink_status. Do not report errors for ENOENT.
2306 * src/filesystem/std-ops.cc: Likewise.
2307 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2309 * testsuite/experimental/filesystem/operations/remove_all.cc:
2312 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
2315 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2316 redundant call to ec.clear().
2317 (remove_all(const path&, error_code&))): Do not return an error for
2319 * src/filesystem/std-ops.cc: Likewise.
2320 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2321 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2322 results for non-existent paths.
2323 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2324 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2325 expected results for non-existent paths.
2327 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2328 check status_known once.
2329 * include/experimental/bits/fs_ops.h: Likewise.
2332 * include/std/functional (__is_byte_like): New trait.
2333 (__is_std_equal_to): Remove.
2334 (__boyer_moore_base_t): Use __is_byte_like instead of
2336 * include/experimental/functional (__is_std_equal_to): Remove.
2337 (__boyer_moore_base_t): Use __is_byte_like instead of
2339 * testsuite/20_util/function_objects/83607.cc: New test.
2341 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2343 Protect optional's deduction guide with the feature macro
2344 * include/std/optional: Use the feature macro.
2346 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2348 Update copyright years.
2350 Copyright (C) 2018 Free Software Foundation, Inc.
2352 Copying and distribution of this file, with or without modification,
2353 are permitted in any medium without royalty provided the copyright
2354 notice and this notice are preserved.