1 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
3 * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
4 (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
5 (vector::_M_move_assign): Reorder the swaps.
7 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
10 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
11 same alignment for post-release allocation.
13 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
16 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
17 buffer being misaligned and so returned pointer not being at start.
19 * include/experimental/memory_resource: Include <cstddef> header.
21 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
22 * src/Makefile.am: Add comment.
23 * src/c++17/Makefile.in: Regenerate.
25 * include/Makefile.am: Add new <bits/unique_lock.h> header.
26 * include/Makefile.in: Regenerate.
27 * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
28 (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
29 (unique_lock): Move definition to ...
30 * include/bits/unique_lock.h: New header.
31 [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
32 [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
33 (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
34 (unique_lock::try_lock_for): Define only when <chrono> is usable.
35 * include/std/condition_variable: Include <bits/unique_lock.h>.
36 * include/std/mutex: Likewise.
38 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
40 * config/abi/pre/gnu.ver: Export new symbols.
41 * configure: Regenerate.
42 * include/Makefile.am: Add new <memory_resource> header.
43 * include/Makefile.in: Regenerate.
44 * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
45 * include/std/memory_resource: New header.
46 (memory_resource, polymorphic_allocator, new_delete_resource)
47 (null_memory_resource, set_default_resource, get_default_resource)
48 (pool_options, monotonic_buffer_resource): Define.
49 * src/Makefile.am: Add c++17 directory.
50 * src/Makefile.in: Regenerate.
51 * src/c++11/Makefile.am: Fix comment.
52 * src/c++17/Makefile.am: Add makefile for new sub-directory.
53 * src/c++17/Makefile.in: Generate.
54 * src/c++17/memory_resource.cc: New.
55 (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
56 (default_res, new_delete_resource, null_memory_resource)
57 (set_default_resource, get_default_resource): Define.
58 * testsuite/20_util/memory_resource/1.cc: New test.
59 * testsuite/20_util/memory_resource/2.cc: New test.
60 * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
61 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
62 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
63 * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
64 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
66 * testsuite/20_util/polymorphic_allocator/1.cc: New test.
67 * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
68 * testsuite/20_util/polymorphic_allocator/select.cc: New test.
69 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
70 Define concrete memory resource for testing.
71 (__gnu_test::default_resource_mgr): Define RAII helper for changing
75 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
76 parameter by reference, to avoid copying invalid iterators.
77 * testsuite/25_algorithms/copy/86658.cc: New test.
79 * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
80 local variables for number of digits instead of type aliases.
81 (__log2p1): Remove redundant branch also checked in __countl_zero.
83 * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
84 conditions. Add comments.
85 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
86 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
87 * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
89 * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
90 (__uses_allocator_helper): Check conditions directly instead of
91 using __is_erased_or_convertible.
93 * include/experimental/memory_resource: Adjust comments and
95 (__resource_adaptor_imp): Add second template parameter for type of
96 memory resource base class.
97 (memory_resource): Define default constructor, destructor, copy
98 constructor and copy assignment operator as defaulted.
101 * include/experimental/memory_resource (__get_default_resource): Use
102 placement new to create an object with dynamic storage duration.
104 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
107 * include/experimental/memory_resource
108 (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
109 (__resource_adaptor_common::__guaranteed_alignment): New helper to
110 give maximum alignment an allocator guarantees. Specialize for known
111 allocators using new and malloc.
112 (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
113 (__resource_adaptor_imp::do_deallocate): Likewise.
114 * testsuite/experimental/memory_resource/new_delete_resource.cc:
115 Check that new and delete are called with expected sizes.
117 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
120 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
123 2018-07-20 Fangrui Song <maskray@google.com>
125 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
126 _GLIBCXX_VISIBILITY(default).
128 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
131 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
133 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
135 * include/std/type_traits (__is_member_object_pointer_helper): Use
136 __not_<is_function<_Tp>>::type instead of integral_constant.
137 (__is_member_function_pointer_helper): Likewise for
138 is_function<_Tp>::type.
139 (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
140 (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
141 (is_trivially_constructible): Remove redundant use of
143 (__is_trivially_copy_assignable_impl): Remove redundant use of
145 (__is_trivially_move_assignable_impl): Remove redundant use of
147 (is_trivially_destructible): Use __bool_constant.
148 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
149 tests for scalar types.
151 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
153 * include/bits/stl_algobase.h (__copy_move_a): Used
154 __is_trivially_copyable.
155 (__copy_move_backward_a): Likewise.
156 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
159 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
162 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
163 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
164 * configure: Regenerate.
165 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
166 * doc/Makefile.in: Regenerate.
167 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
168 * include/Makefile.in: Regenerate.
169 * libsupc++/Makefile.in: Regenerate.
170 * po/Makefile.in: Regenerate.
171 * python/Makefile.in: Regenerate.
172 * src/Makefile.in: Regenerate.
173 * src/c++11/Makefile.in: Regenerate.
174 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
175 from -Wabi=2 that don't affect exported symbols.
176 * src/c++98/Makefile.in: Regenerate.
177 * src/filesystem/Makefile.in: Regenerate.
178 * testsuite/Makefile.in: Regenerate.
180 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
181 (_Async_state_common::_M_join): Simplify use of std::call_once and
182 corresponding explicit instantiation.
183 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
184 (__bind_simple): Remove definitions and explicit instantiation that
185 are not required by exported symbols.
187 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
189 * scripts/create_testsuite_files: Fix typo in comment.
192 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
193 non-standard partial specialization.
194 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
195 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
196 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
198 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
200 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
201 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
202 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
204 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
206 * include/debug/functions.h (__gnu_debug::__check_string): Move...
207 * include/debug/string (__gnu_debug::__check_string): ... here.
208 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
209 (__glibcxx_check_string_n_constructor): New.
210 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
212 (__glibcxx_check_string_constructor): New.
213 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
215 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
216 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
218 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
220 PR libstdc++/84928 use std::move in <numeric> algorithms
221 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
222 conditionally move, according to __cplusplus value.
223 (accumulate, inner_product, partial_sum, adjacent_difference): Use
225 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
226 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
227 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
228 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
230 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
232 P0935R0 Eradicating unnecessarily explicit default constructors
233 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
234 default constructor symbols.
235 * include/std/sstream (basic_stringbuf, basic_istringstream)
236 (basic_ostringstream, basic_stringstream): Remove default arguments
237 from explicit constructors taking ios_base::openmode and add separate
238 non-explicit default constructors.
239 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
240 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
241 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
242 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
243 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
245 * include/std/variant (__accepted_index): Use void_t.
247 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
250 * config/abi/pre/gnu.ver: Export move constructors and move
251 assignment operators for std::logic_error and std::runtime_error.
252 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
253 _GLIBCXX_USE_NOEXCEPT.
254 (logic_error, runtime_error): Declare move constructors and move
255 assignment operators. When not declared already, define copy
256 constructors and copy assignment operators as explicit-defaulted.
257 (domain_error, invalid_argument, length_error, out_of_range)
258 (overflow_error, underflow_error): Define move constructors and move
259 assignment operators as explicitly-defaulted.
260 * libsupc++/exception.h (exception): Likewise.
261 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
262 move constructors and move assignment operators as defaulted.
263 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
264 assignment operators are defined.
266 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
268 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
270 * testsuite/21_strings/basic_string/requirements/
271 explicit_instantiation/debug.cc: Likewise.
274 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
275 (basic_string::assign(basic_string&&)): Add conditional noexcept
276 depending on the allocator's is_always_equal property (LWG 2063).
277 * testsuite/21_strings/basic_string/modifiers/assign/char/
278 move_assign.cc: Check for non-throwing exception specification.
279 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
280 move_assign.cc: Likewise.
283 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
284 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
285 Add GLIBCXX_NOEXCEPT.
286 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
287 to depend on the allocator's is_always_equal property (LWG 2063).
288 (basic_string::swap(basic_string&)): Likewise.
289 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
290 (basic_string::swap(basic_string&)): Likewise.
291 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
292 Check is_nothrow_move_assignable.
293 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
294 Check is_nothrow_move_assignable.
295 * testsuite/21_strings/basic_string/cons/char/
296 noexcept_move_construct.cc: Likewise.
297 * testsuite/21_strings/basic_string/cons/wchar_t/
298 noexcept_move_construct.cc: Likewise.
300 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
302 P0646R1 Improving the Return Value of Erase-Like Algorithms I
303 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
305 (forward_list::__remove_return_type): Define typedef as size_type or
306 void, according to __cplusplus value.
307 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
308 empty, according to __cplusplus value.
309 (forward_list::remove, forward_list::unique): Use typedef and macro
310 to change return type and add abi-tag for C++2a.
311 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
312 typedef to change return type for C++2a.
313 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
314 (forward_list::remove, forward_list::remove_if<Pred>)
315 (forward_list::unique<BinPred>): Return number of removed elements
317 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
318 (list::remove, list::unique, list::remove_if<Predicate>)
319 (list::unique<BinaryPredicate>): Return number of removed elements
321 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
322 (list::__remove_return_type): Define typedef as size_type or
323 void, according to __cplusplus value.
324 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
325 empty, according to __cplusplus value.
326 (list::remove, list::unique): Use typedef and macro to change return
327 type and add abi-tag for C++2a.
328 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
329 typedef to change return type for C++2a.
330 * include/std/version (__cpp_lib_list_remove_return_type): Define.
331 * testsuite/23_containers/forward_list/operations/
332 remove_cxx20_return.cc: New.
333 * testsuite/23_containers/forward_list/operations/
334 unique_cxx20_return.cc: New.
336 P0458R2 Checking for Existence of an Element in Associative Containers
337 * include/bits/stl_map.h (map::contains): Add for C++2a.
338 * include/bits/stl_multimap.h (multimap::contains): Likewise.
339 * include/bits/stl_multiset.h (multiset::contains): Likewise.
340 * include/bits/stl_set.h (set::contains): Likewise.
341 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
342 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
343 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
344 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
345 * include/bits/unordered_map.h (unordered_map::contains)
346 (unordered_multimap::contains): Add for C++2a.
347 * include/bits/unordered_set.h (unordered_set::contains)
348 (unordered_multiset::contains): Likewise.
349 * testsuite/23_containers/map/operations/contains.cc: New.
350 * testsuite/23_containers/multimap/operations/contains.cc: New.
351 * testsuite/23_containers/multiset/operations/contains.cc: New.
352 * testsuite/23_containers/set/operations/contains.cc: New.
353 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
354 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
356 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
358 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
360 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
363 * include/debug/string
364 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
365 Use __glibcxx_check_insert_range.
366 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
367 __gnu_debug::string when _GLIBCXX_DEBUG.
368 * 21_strings/basic_string/init-list.cc: Likewise.
369 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
370 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
371 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
372 * 21_strings/basic_string/types/1.cc: Likewise.
374 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
376 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
377 target for std::random_device.
378 * testsuite/26_numerics/random/random_device/cons/default.cc:
380 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
381 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
382 * testsuite/experimental/random/randint.cc: Likewise.
383 * testsuite/lib/libstdc++.exp
384 (check_effective_target_random_device): New proc.
386 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
387 Jakub Jelinek <jakub@redhat.com>
389 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
391 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
394 * include/std/type_traits (is_trivially_constructible): Check
395 is_constructible before __is_trivially_constructible.
396 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
397 tests, including negative cases.
398 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
399 zero for dg-error lineno.
400 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
403 * include/std/bit (__rotl, __rotr): Avoid branch.
404 (_If_is_unsigned_integer): Use remove_cv_t.
405 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
407 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
409 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
410 * include/Makefile.am: Add new header.
411 * include/Makefile.in: Regenerate.
412 * include/precompiled/stdc++.h: Include new header.
413 * include/std/bit: New header.
414 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
415 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
417 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
418 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
419 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
420 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
422 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
423 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
424 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
425 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
426 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
427 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
428 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
429 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
430 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
431 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
433 * include/bits/alloc_traits.h: Remove redundant preprocessor
436 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
438 * include/bits/stl_algobase.h (__niter_wrap): New.
439 (__copy_move_a2(_II, _II, _OI)): Use latter.
440 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
441 (fill_n(_OI, _Size, const _Tp&)): Likewise.
442 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
443 * include/debug/stl_iterator.h
444 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
445 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
446 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
447 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
449 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
451 P0758R1 Implicit conversion traits
452 * include/std/type_traits [__cplusplus > 201703]
453 (__is_convertible_helper::__is_nothrow_type): Define new member.
454 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
456 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
457 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
459 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
460 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
461 * testsuite/20_util/is_nothrow_convertible/requirements/
462 explicit_instantiation.cc: New.
463 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
466 P0887R1 The identity metafunction
467 * include/std/type_traits (type_identity, type_identity_t): Define
469 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
470 * testsuite/20_util/type_identity/requirements/
471 explicit_instantiation.cc:New.
472 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
474 * include/bits/regex.h (sub_match::operator string_type): Call str().
475 (sub_match::compare): Use _M_str() instead of str().
476 (sub_match::_M_compare): New public function.
477 (sub_match::__string_view): New helper type.
478 (sub_match::_M_str): New overloaded functions to avoid creating a
479 string_type object when not needed.
480 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
481 Use sub_match::_M_compare instead of creating string_type objects.
482 Fix Doxygen comments.
483 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
484 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
486 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
488 * include/std/type_traits (__enable_if_t): Define for C++11.
489 * testsuite/28_regex/sub_match/compare.cc: New.
490 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
492 (input_iterator_wrapper): Use remove_cv for value_type argument of
493 std::iterator base class.
495 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
497 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
498 Add whitespace to dejagnu directive.
499 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
501 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
503 * include/bits/stl_vector.h
504 (struct _Vector_base<>::_Vector_impl_data): New.
505 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
506 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
507 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
508 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
509 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
510 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
511 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
512 (_Vector_base()): Default.
513 (_Vector_base(_Vector_base&&)): Default.
514 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
515 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
516 (_Vector_base::_M_create_storage(size_t)): Make protected.
518 (vector(vector&&)): Default.
519 (vector(vector&&, const allocator_type&, true_type)): New.
520 (vector(vector&&, const allocator_type&, false_type)): New.
521 (vector(vector&&, const allocator_type&)): Use latters.
522 (vector(_InputIte, _InputIte, const allocator_type&)): Call
523 _M_range_initialize directly.
524 * include/debug/vector
525 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
526 * testsuite/23_containers/vector/allocator/default_init.cc: New.
527 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
530 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
532 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
533 (__is_byte<byte>): Define specialization for std::byte.
536 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
537 Declare explicit instantiations of COW empty reps and I/O functions.
539 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
541 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
543 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
545 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
547 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
550 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
553 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
554 Replace dict comprehension.
557 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
560 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
562 * testsuite/23_containers/vector/cons/86292.cc: New.
564 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
566 * include/experimental/algorithm (sample, shuffle): Add new overloads
567 using per-thread random number engine.
568 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
569 dependencies by using __gnu_test::test_container.
570 * testsuite/experimental/algorithm/sample-2.cc: New.
571 * testsuite/experimental/algorithm/shuffle.cc: New.
573 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
575 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
576 different size_t mangling on 32-bit targets.
579 * include/experimental/memory_resource
580 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
581 enough for result of left shift.
584 * include/bits/basic_string.tcc:
585 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
586 (basic_string<char>::_Rep::_S_empty_rep_storage)
587 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
588 instantiation declarations.
589 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
590 explicit instantiation declarations.
591 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
592 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
594 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
597 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
598 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
599 * configure: Regenerate.
600 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
601 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
602 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
603 (basic_string::insert(iterator, initializer_list<C>)): Suppress
605 * include/debug/string (basic_string::insert(iterator, C)): Change
606 first parameter to const_iterator.
607 (basic_string::insert(iterator, size_type, C)): Likewise. Change
608 return type to iterator.
609 (basic_string::insert(iterator, InputIterator, InputIterator)):
611 (basic_string::insert(iterator, initializer_list<C>)): Change first
612 parameter to const_iterator and return type to iterator.
613 * src/c++11/string-inst.cc: Extend comment.
614 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
616 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
618 * testsuite/util/testsuite_abi.cc: Add new symbol version.
620 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
623 * include/experimental/memory_resource
624 (__resource_adaptor_imp::do_deallocate): Add missing return.
625 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
626 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
627 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
628 __gnu_cxx::malloc_allocator.
631 * include/experimental/memory_resource (__resource_adaptor_common):
633 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
634 pointer from unaligned, and vice versa.
635 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
636 allocated pointer to meet alignment request.
637 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
638 original pointer for deallocation.
639 (__resource_adaptor_imp::do_is_equal): Reformat.
640 (__resource_adaptor_imp::_S_aligned_size): Remove.
641 (__resource_adaptor_imp::_S_supported): Remove.
642 (new_delete_resource): Use __gnu_cxx::new_allocator.
643 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
644 extended alignments and use debug_allocator to check for matching
645 allocate/deallocate pairs.
647 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
649 * include/debug/safe_iterator.h
650 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
651 Compare __x base iterator with a value-initialized iterator of the
654 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
657 * include/experimental/memory_resource (__resource_adaptor_imp): Add
658 static assertions to enforce requirements on pointer types.
659 (__resource_adaptor_imp::get_allocator()): Add noexcept.
660 (new_delete_resource, null_memory_resource): Return address of an
661 object with dynamic storage duration.
662 (__null_memory_resource): Remove.
663 * testsuite/experimental/memory_resource/70966.cc: New.
665 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
666 missed from recent commit.
668 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
670 * include/std/utility: Remove unused <exception> header.
672 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
674 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
675 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
676 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
677 a specialization of std::pair.
678 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
679 pair elements are constructed correctly.
681 LWG 2989 hide path iostream operators from normal lookup
682 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
684 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
686 LWG 3050 Fix cv-qualification of convertibility constraints
687 * include/std/chrono (duration, operator*, operator/, operator%): Use
688 const-qualified type as source type in is_convertible constraints.
689 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
690 * testsuite/20_util/duration/cons/dr3050.cc: New.
691 * testsuite/20_util/duration/literals/range.cc: Rename to...
692 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
695 2018-06-18 Maya Rashish <coypu@sdf.org>
697 * crossconfig.m4: Handle OpenBSD just like NetBSD.
698 * configure: Rebuilt.
700 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
702 P0754R2 <version> header
703 * include/Makefile.am: Add new header.
704 * include/Makefile.in: Regenerate.
705 * include/bits/c++config: Change doxygen comment to suggest <version>
707 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
708 unconditionally. Add C++17 and C++20 headers.
709 * include/std/version: New header.
710 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
711 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
712 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
713 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
714 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
715 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
716 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
718 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
719 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
720 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
721 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
722 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
723 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
724 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
726 * testsuite/18_support/headers/version/macros.cc: New.
727 * testsuite/18_support/headers/version/macros.cc: New.
729 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
730 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
732 * config.h.in: Regenerate.
733 * configure: Regenerate.
734 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
736 LWG 3035. std::allocator's constructors should be constexpr
737 * include/bits/allocator.h (allocator): Add constexpr to constructors
738 for C++2a. Replace dynamic exception specifications with NOTHROW
740 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
742 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
743 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
744 to constructors for C++2a.
745 * include/ext/new_allocator.h (new_allocator): Likewise.
747 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
749 LWG 3076 basic_string CTAD ambiguity
750 * doc/xml/manual/intro.xml: Document LWG 3076 change.
751 * include/bits/basic_string.h
752 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
753 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
754 template constrained by _RequireAllocator.
755 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
756 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
758 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
760 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
763 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
766 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
767 (basic_string::data()): Unshare string.
768 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
771 * include/std/string_view (basic_string_view(const CharT*)): Remove
772 check for null pointer and add nonnull attribute.
773 (compare(const CharT*), compare(size_type, size_type, const CharT*))
774 (find(const CharT*, size_type), rfind(const CharT*, size_type))
775 (find_first_of(const CharT*, size_type))
776 (find_last_of(const CharT*, size_type))
777 (find_first_not_of(const CharT*, size_type))
778 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
779 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
780 * testsuite/21_strings/basic_string_view/operations/compare/char/
782 * testsuite/21_strings/basic_string_view/operations/find/char/
784 * testsuite/21_strings/basic_string_view/operations/rfind/char/
788 * include/bits/random.h (random_device(const string&)): Remove
791 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
792 define for C++17 and above.
794 LWG 2993 reference_wrapper<T> conversion from T&&
795 * doc/xml/manual/intro.xml: Document LWG 2993 change.
796 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
797 (reference_wrapper(_Tp&&)): Remove.
798 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
800 (reference_wrapper): Add deduction guide.
801 * testsuite/20_util/reference_wrapper/deduction.cc: New.
802 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
804 LWG 3039 Unnecessary decay in thread and packaged_task
805 * include/std/future (__constrain_pkgdtask): Replace with ...
806 (packaged_task::__not_same): New alias template, using
807 __remove_cvref_t instead of decay.
808 * include/std/thread (thread::__not_same): Add comment.
810 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
812 LWG 3075 basic_string needs deduction guides from basic_string_view
813 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
814 deduction from string views.
815 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
818 LWG 3074 make scalar types non-deduced in valarray non-member functions
819 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
820 scalar parameters to be a non-deduced context.
821 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
823 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
824 * testsuite/26_numerics/valarray/transcend.cc: New.
826 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
827 Move back to <utility>.
828 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
831 P0935R0 Eradicating unnecessarily explicit default constructors
832 * include/backward/strstream (strstreambuf): Add non-explicit default
834 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
836 * include/bits/regex.h (match_results): Likewise.
837 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
839 * testsuite/22_locale/conversions/string/1.cc: Likewise.
840 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
841 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
843 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
844 macro from <utility> and change type to long.
845 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
846 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
849 P0935R0 Eradicating unnecessarily explicit default constructors
850 * include/bits/random.h (uniform_real_distribution::param_type)
851 (normal_distribution::param_type, lognormal_distribution::param_type)
852 (gamma_distribution::param_type, chi_squared_distribution::param_type)
853 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
854 (student_t_distribution::param_type)
855 (bernoulli_distribution::param_type)
856 (binomial_distribution::param_type)
857 (geometric_distribution::param_type)
858 (negative_binomial_distribution::param_type)
859 (poisson_distribution::param_type)
860 (exponential_distribution::param_type)
861 (weibull_distribution::param_type)
862 (extreme_value_distribution::param_type): Add non-explicit default
863 constructors. Remove default argument for first parameter of explicit
865 * include/bits/uniform_int_dist.h
866 (uniform_int_distribution::param_type): Likewise.
868 (beta_distribution::param_type, rice_distribution::param_type)
869 (nakagami_distribution::param_type, pareto_distribution::param_type)
870 (k_distribution::param_type, arcsine_distribution::param_type)
871 (hoyt_distribution::param_type, triangular_distribution::param_type)
872 (von_mises_distribution::param_type)
873 (hypergeometric_distribution::param_type)
874 (logistic_distribution::param_type)
875 (uniform_inside_sphere_distribution::param_type): Likewise.
876 (uniform_on_sphere_distribution::param_type): Make default constructor
878 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
879 Test param_type for non-explicit default constructor.
880 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
882 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
884 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
886 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
888 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
890 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
892 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
894 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
896 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
898 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
900 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
902 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
904 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
906 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
908 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
910 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
912 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
914 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
916 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
918 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
919 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
920 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
921 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
923 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
924 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
925 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
926 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
928 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
929 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
930 * testsuite/ext/random/triangular_distribution/cons/default.cc:
932 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
934 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
936 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
939 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
940 Jonathan Wakely <jwakely@redhat.com>
943 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
944 Default-construct new elements before moving existing ones.
945 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
948 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
951 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
953 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
954 Use node allocator to create and destroy elements.
955 (forward_list::_Tp_alloc_type): Remove unused typedef.
956 (forward_list::_Alloc_traits): Use allocator_traits instead of
957 __gnu_cxx::__alloc_traits.
959 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
961 * include/debug/helper_functions.h
962 (__gnu_debug::_Safe_iterator<>): Add declaration.
963 (__can_advance(_Ite, _Size)): New.
964 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
965 * include/debug/functions.h
966 (__gnu_debug::_Safe_iterator<>): Remove declaration.
967 * include/debug/stl_iterator.h
968 (__can_advance(const _Safe_iterator<>&)): New definition.
969 * include/debug/stl_iterator.h
970 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
971 (__can_advance(const std::move_iterator<>&, _Size)): New.
972 * include/debug/macros.h (__glibcxx_check_can_increment): New.
973 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
974 * include/bits/stl_algobase.h (fill_n): Use latter.
975 * testsuite/25_algorithms/fill_n/2.cc: New.
976 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
977 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
978 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
979 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
981 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
982 (__glibcxx_requires_can_decrement_range): New.
984 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
986 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
987 (__glibcxx_check_can_decrement_range): New.
988 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
989 __glibcxx_requires_can_increment_range.
990 (std::move(_II, _II, _OI)): Likewise.
991 (std::copy_backward(_BI, _BI, _BI2)): Use
992 __glibcxx_requires_can_decrement_range.
993 (std::move_backward(_BI, _BI, _BI2)): Likewise.
994 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
995 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
996 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
997 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
998 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
999 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
1001 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
1003 P0935R0 Eradicating unnecessarily explicit default constructors
1004 * include/bits/random.h (linear_congruential_engine)
1005 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
1006 (uniform_real_distribution, normal_distribution)
1007 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
1008 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
1009 (bernoulli_distribution, binomial_distribution,geometric_distribution)
1010 (negative_binomial_distribution, exponential_distribution)
1011 (weibull_distribution, extreme_value_distribution): Add non-explicit
1012 default constructors. Remove default argument for first parameter of
1013 explicit constructors.
1014 (piecewise_constant_distribution, piecewise_linear_distribution):
1015 Make default constructor non-explicit.
1016 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
1017 non-explicit default constructors. Remove default argument for first
1018 parameter of explicit constructor.
1019 * include/ext/random
1020 (simd_fast_mersenne_twister_engine, beta_distribution)
1021 (rice_distribution, nakagami_distribution, pareto_distribution)
1022 (k_distribution, arcsine_distribution, hoyt_distribution)
1023 (triangular_distribution, von_mises_distribution)
1024 (hypergeometric_distribution, logistic_distribution)
1025 (uniform_inside_sphere_distribution): Likewise.
1026 (uniform_on_sphere_distribution): Make default constructor
1028 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
1029 Test for non-explicit default constructor. Fix references to standard.
1030 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
1032 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
1034 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
1036 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
1038 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
1040 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
1042 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
1044 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
1046 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
1048 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
1050 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
1052 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
1054 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
1056 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
1058 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
1060 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
1062 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
1064 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
1066 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
1068 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
1069 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
1070 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
1071 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
1073 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
1074 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
1075 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
1076 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
1078 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
1079 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
1080 * testsuite/ext/random/triangular_distribution/cons/default.cc:
1082 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
1084 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
1086 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
1088 * testsuite/util/testsuite_common_types.h
1089 (implicitly_default_constructible): New helper.
1091 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
1093 * include/bits/ios_base.h (ios::Init::Init(const Init&))
1094 (ios::Init::operator=): Define as defaulted.
1095 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
1097 * include/bits/stream_iterator.h (istream_iterator::operator=)
1098 (ostream_iterator::operator=): Likewise.
1099 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
1101 * include/std/bitset (bitset::reference::reference(const reference&)):
1103 * include/std/complex (complex<float>::complex(const complex&))
1104 (complex<double>::complex(const complex&))
1105 (complex<long double>::complex(const complex&)): Likewise.
1107 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
1109 * include/bits/regex.h (sub_match): Add noexcept to default
1110 constructor and length observer.
1111 (match_results): Add noexcept to default constructor and observers
1112 with no preconditions. Define destructor as defaulted.
1113 (operator==, operator!=, swap): Add noexcept.
1114 (regex_iterator): Add default member initializers and define default
1115 constructor and destructor as defaulted. Add noexcept to equality
1116 and dereference operators.
1118 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
1120 * src/c++11/debug.cc
1121 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
1122 (_Safe_iterator_base::_M_detach_single()): Likewise.
1123 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
1124 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
1126 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
1128 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
1129 move of const value.
1131 2018-06-06 Jakub Jelinek <jakub@redhat.com>
1134 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
1135 rather than __cpp_transactional_memory >= 201505L.
1137 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
1140 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
1141 Define new partial specialization.
1142 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
1144 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
1145 value not reference for iteration.
1146 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
1148 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
1149 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
1152 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
1154 * include/std/type_traits: Fix comment typos.
1156 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
1158 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1159 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1162 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
1164 * include/bits/stl_tempbuf.h
1165 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
1166 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
1167 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
1168 * include/bits/stl_algo.h (__stable_partition): Adapt.
1169 (__inplace_merge): Adapt.
1170 (__stable_sort): Adapt.
1172 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
1175 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
1176 unconditionally. Remove redundant declaration.
1177 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
1178 alignment-specifier.
1180 * include/bits/postypes.h (fpos): Define special members as defaulted.
1183 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
1184 the static variable correctly.
1186 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1188 PR libstdc++/78870 support std::filesystem on Windows
1189 * config.h.in: Regenerate.
1190 * configure: Regenerate.
1191 * configure.ac: Check for link, readlink and symlink.
1192 * include/bits/fs_path.h (path::operator/=(const path&)): Move
1193 definition out of class body.
1194 (path::is_absolute(), path::_M_append(path)): Likewise.
1195 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
1196 (operator>>(basic_istream, path&)): Likewise.
1197 (u8path): Reorder definitions and fix Windows implementation.
1198 (path::is_absolute()): Define inline and fix for Windows.
1199 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1200 Define POSIX version inline.
1201 (path::_M_append(path)): Define inline.
1202 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
1203 definition out of class body.
1204 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
1206 (operator>>(basic_istream, path&)): Likewise.
1207 (path::is_absolute()): Define inline and fix for Windows.
1208 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
1209 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
1210 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
1211 Define as adaptors for Windows functions/types or as
1212 using-declarations for POSIX functions/types.
1213 (_Dir_base, get_file_type): Qualify names to use declarations from
1214 __gnu_posix namespace.
1215 (_Dir_base::is_dor_or_dotdot): New helper functions.
1216 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
1217 names to use declarations from __gnu_posix namespace.
1218 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
1219 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
1220 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
1221 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
1222 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
1223 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
1224 Define as adaptors for Windows functions/types or as
1225 using-declarations for POSIX functions/types.
1226 (stat_type, do_copy_file): Qualify names to use declarations from
1227 __gnu_posix namespace.
1228 (do_space): Declare new function.
1229 (make_file_type): Only use S_ISLNK if defined.
1230 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
1231 path::value_type not char.
1232 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1233 names to use declarations from __gnu_posix namespace.
1234 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1235 add implementation for Windows.
1236 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1237 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1238 [!_PC_PATH_MAX]: Don't use pathconf.
1239 [PATH_MAX]: Use if defined.
1240 (filesystem::current_path(const path&, error_code&))
1241 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1242 (filesystem::last_write_time, filesystem::permissions): Use names
1244 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1245 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1246 implementation for Windows.
1247 (filesystem::rename, filesystem::resize_file): Use names from
1249 (filesystem::space): Use do_space.
1250 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
1251 (filesystem::status, filesystem::symlink_status): Use names from
1253 (filesystem::temp_directory_path): Add implementation for Windows.
1254 * src/filesystem/path.cc (dot): Define constant.
1255 (path::replace_extension): Use dot.
1256 (path::_M_find_extension): Likewise. Use path::string_type not
1258 (path::_M_split_cmpts): Use dot.
1259 (filesystem_error::_M_get_what): Use u8string() not native().
1260 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
1261 Qualify names to use declarations from __gnu_posix namespace.
1262 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
1264 (filesystem::absolute(const path&, error_code&)): Add implementation
1266 (char_ptr, filesystem::canonical): Use path::value_type not char.
1267 (do_copy_file): Use names from __gnu_posix.
1268 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
1270 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1271 names to use declarations from __gnu_posix namespace.
1272 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1273 add implementation for Windows.
1274 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1275 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1276 [!_PC_PATH_MAX]: Don't use pathconf.
1277 [PATH_MAX]: Use if defined.
1278 (filesystem::current_path(const path&, error_code&))
1279 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1280 (filesystem::last_write_time, filesystem::permissions): Use names
1282 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1283 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1284 implementation for Windows.
1285 (filesystem::rename, filesystem::resize_file): Use names from
1288 (filesystem::space): Use do_space.
1289 (filesystem::status, filesystem::symlink_status): Use names from
1291 (filesystem::temp_directory_path): Add implementation for Windows.
1292 * src/filesystem/std-path.cc
1293 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1295 (dot): Define constant.
1296 (path::replace_extension, is_dot): Use dot.
1297 (path::lexically_normal): Check _M_type instead of calling
1298 non-existent function.
1299 (path::_M_find_extension): Use dot. Use path::string_type not
1301 (path::_M_split_cmpts): Use dot.
1302 (filesystem_error::_M_get_what): Use u8string() not native().
1303 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
1305 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1307 * testsuite/27_io/filesystem/operations/absolute.cc: Use
1308 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
1309 * testsuite/27_io/filesystem/operations/canonical.cc: Use
1310 path::string() to get narrow string, not path::native().
1311 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
1312 with std::filesystem::path not std::basic_string.
1313 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1314 * testsuite/27_io/filesystem/operations/exists.cc: Use
1315 __gnu_test::root_path() instead of "/".
1316 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
1317 fstreams with std::filesystem::path not std::basic_string.
1318 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
1319 path::string() to get narrow string.
1320 * testsuite/27_io/filesystem/operations/space.cc: Check results for
1321 errors, expect sensible values otherwise.
1322 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
1323 helpers for adjusting the environment on Windows.
1324 * testsuite/27_io/filesystem/path/append/path.cc: Test
1325 Windows-specific behaviour.
1326 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
1327 of path::string_type objects.
1328 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
1329 string to wide string on Windows.
1330 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
1331 for backslash as root-directory.
1332 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
1333 path::string() to get narrow string.
1334 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
1336 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
1338 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
1339 different definintion of absolute paths on Windows.
1340 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1341 Do not use symlinks.
1342 * testsuite/experimental/filesystem/operations/absolute.cc: Test
1344 * testsuite/experimental/filesystem/operations/copy.cc: Construct
1345 fstreams with NTCTS not std::basic_string.
1346 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1347 * testsuite/experimental/filesystem/operations/exists.cc: Use
1348 __gnu_test::root_path() instead of "/".
1349 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
1350 fstreams with NTCTS not std::basic_string.
1351 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1352 Use path::string() to get narrow string.
1353 * testsuite/experimental/filesystem/operations/space.cc: Use
1354 __gnu_test::root_path() instead of "/".
1355 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1356 Add helpers for adjusting the environment on Windows.
1357 * testsuite/experimental/filesystem/path/append/path.cc: Use
1358 path::string() to get narrow strings for comparisons.
1359 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1360 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1362 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1363 * testsuite/experimental/filesystem/path/native/string.cc: Use
1364 string_type not std::string.
1365 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
1366 Adjust for different definintion of absolute paths on Windows.
1367 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
1369 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
1372 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
1375 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
1376 uint_least16_t and uint_least32_t.
1377 (__make_unsigned<wchar_t>): Define unconditionally.
1378 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
1380 (__make_unsigned_selector_base): New type to provide helper templates.
1381 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
1382 __make_unsigned_selector_base helpers.
1383 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
1384 (__make_signed_selector<_Tp, true, false>): Remove intermediate
1386 (__make_signed<wchar_t>, __make_signed<char16_t>)
1387 (__make_signed<char32_t>)): Define unconditionally.
1388 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
1389 wchar_t, char16_t and char32_t are transformed correctly.
1390 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
1392 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
1393 wchar_t, char16_t and char32_t are transformed correctly.
1394 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
1397 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
1399 * include/std/variant (__erased_dtor): Qualify call to __get.
1401 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
1403 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
1404 (_Rb_tree(const allocator_type&)): Use latter.
1405 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
1406 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
1407 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1408 * include/bits/stl_multimap.h
1409 (multimap(const allocator_type&)): Likewise.
1410 (multimap(initializer_list<value_type>, const allocator_type&)):
1412 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
1414 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
1415 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
1416 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1417 * include/bits/stl_multiset.h
1418 (multiset(const allocator_type&)): Likewise.
1419 (multiset(initializer_list<value_type>, const allocator_type&)):
1421 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
1424 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
1427 * src/c++11/debug.cc: Remove backtrace usage.
1429 2018-05-24 Maya Rashish <coypu@sdf.org>
1432 * crossconfig.m4: Test for aligned_alloc on netbsd.
1433 * configure: Regenerate.
1435 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1439 * include/bits/atomic_base.h (__atomic_base::value_type)
1440 (__atomic_base::difference_type): Add new typedefs.
1441 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
1442 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
1443 (atomic<T*>::operator++, atomic<T*>::operator--)
1444 (atomic<T*>::operator+=, atomic<T*>::operator-=)
1445 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
1446 to enforce C++17 requirement on pointer arithmetic.
1447 (__atomic_val_t, __atomic_diff_t): New alias templates.
1448 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
1449 (atomic_compare_exchange_weak_explicit)
1450 (atomic_compare_exchange_strong_explicit, atomic_store)
1451 (atomic_exchange, atomic_compare_exchange_weak)
1452 (atomic_compare_exchange_strong): Use __atomic_val_t to make
1453 scalar parameters be non-deduced contexts.
1454 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1455 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
1456 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
1458 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
1459 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
1460 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
1461 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1462 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
1464 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
1465 * testsuite/29_atomics/atomic/69769.cc: New test.
1466 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
1467 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
1468 Disable test for C++17 and later.
1469 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
1470 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
1471 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
1474 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
1476 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
1477 template to alias template.
1478 (path::__value_type_is_char): Use remove_const_t.
1479 (path:_S_string_from_iter): New helper function.
1480 (path::_S_convert(InputIter, __null_terminated))
1481 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1482 Use _S_string_from_iter.
1483 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
1484 rep for COW strings.
1485 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1486 Change from class template to alias template.
1487 (path::__value_type_is_char): Use remove_const.
1488 (path:_S_string_from_iter): New helper function.
1489 (path::_S_convert(InputIter, __null_terminated))
1490 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1491 Use _S_string_from_iter.
1492 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
1494 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
1495 string equality, not path equivalence.
1496 * testsuite/27_io/filesystem/path/construct/format.cc: Check
1497 construction from std::string and std::wstring and input iterators.
1498 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
1499 construction from iterators.
1500 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1501 exact string equality, not path equivalence.
1502 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1503 construction from iterators.
1505 * include/bits/fs_path.h (path::_M_type): Change default member
1506 initializer to _Filename.
1507 (path::begin): Create past-the-end iterator for empty path.
1508 * src/filesystem/std-path.cc (path::remove_filename()): Remove
1510 (path::has_relative_path()): Return false for empty filenames.
1511 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1512 Fix offset of empty final component.
1513 * testsuite/27_io/filesystem/path/itr/components.cc: New.
1514 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1516 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1518 Add support for opening file streams from wide character strings.
1519 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1520 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1521 Define new overload.
1522 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1523 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1524 Declare new overload.
1525 * configure.ac: Check for _wfopen.
1526 * crossconfig.m4: Likewise.
1527 * configure: Regenerate.
1528 * config.h.in: Regenerate.
1529 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1530 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1531 Define new overload.
1532 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1533 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1534 Declare new overload.
1535 [_GLIBCXX_HAVE__WFOPEN]
1536 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1537 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1538 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1539 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1540 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1541 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1543 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1544 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1545 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1546 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1547 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1548 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1549 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1551 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
1554 * include/bits/stl_tree.h
1555 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1558 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1560 * src/filesystem/std-ops.cc (absolute): Report an error for empty
1562 (weakly_canonical(const path&)): Do not call canonical on empty path.
1563 (weakly_canonical(const path&, error_code&)): Likewise.
1564 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1567 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1568 dg-require-filesystem-ts.
1571 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1572 initialize base class to avoid warnings.
1574 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
1576 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1577 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1578 little_endian element in bitmask.
1579 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1580 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1582 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
1584 * include/bits/stl_tree.h
1585 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1586 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1587 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1588 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1589 * include/debug/map.h
1590 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1591 * include/debug/multimap.h
1592 (multimap(multimap&&, const_allocator_type&)): Likewise.
1593 * include/debug/set.h
1594 (set(set&&, const_allocator_type&)): Likewise.
1595 * include/debug/multiset.h
1596 (multiset(multiset&&, const_allocator_type&)): Likewise.
1597 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1599 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1601 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1603 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1605 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1607 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1609 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1611 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1614 2018-05-18 Jason Merrill <jason@redhat.com>
1616 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1617 for conversion to const_iterator. Add defaulted copy ops.
1618 * libsupc++/new (bad_alloc): Add defaulted copy ops.
1619 * libsupc++/exception.h (exception): Add defaulted copy ops.
1620 * include/std/system_error (system_error): Add defaulted copy ops.
1621 * include/std/stdexcept (domain_error, invalid_argument)
1622 (length_error, out_of_range, range_error, overflow_error)
1623 (underflow_error): Add defaulted copy ops.
1624 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1626 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1627 * include/ext/throw_allocator.h (condition_base): Add defaulted
1628 default and copy ctor and copy assignment.
1630 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
1633 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1634 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1635 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1636 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1638 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1640 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1641 braces around body of do-while.
1642 * testsuite/28_regex/basic_regex/85098.cc: New
1644 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
1647 * src/filesystem/path.cc (path::preferred_separator): Add used
1649 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1652 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1653 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1654 Refactor to separate non-throwing and throwing implementations.
1655 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1656 if constructing the object throws.
1658 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
1661 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1662 (linear_congruential_engine, mersenne_twister_engine)
1663 (subtract_with_carry_engine, discard_block_engine)
1664 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1665 constrain function templates taking seed sequences.
1666 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1667 (mersenne_twister_engine::seed(_Sseq&))
1668 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1670 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1671 __is_seed_seq to constrain function templates taking seed sequences.
1672 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1673 Change return type to match declaration.
1674 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1676 * testsuite/26_numerics/random/independent_bits_engine/cons/
1678 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1680 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1682 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1683 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1685 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1687 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1691 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1692 for all operating systems.
1693 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1694 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1695 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1696 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1698 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1699 unused <vector> header.
1700 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1701 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1702 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1703 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1704 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1706 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1708 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1709 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1710 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1711 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1712 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1714 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1715 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1717 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1719 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1721 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1723 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1725 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1727 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1729 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1730 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1734 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1735 temporary path before calling _M_append.
1736 (path::_M_append): Change parameter to path and implement C++17
1738 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1739 and more examples from the standard.
1740 * testsuite/27_io/filesystem/path/append/source.cc: New.
1741 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1742 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1744 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1745 __invoke to prevent ADL.
1747 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
1750 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1751 exceptions from _M_terminate_output().
1752 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1753 exceptions from close().
1754 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1756 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1757 (__valarray_get_storage): Call operator new directly. Remove ignored
1758 top-level restrict qualifier and add malloc attribute instead.
1759 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1762 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1763 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1766 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1768 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1770 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1773 * testsuite/20_util/variant/80165.cc: New.
1775 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1777 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1778 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1779 of C++11 containers with Debug Mode support.
1780 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1781 * doc/html/*: Regenerate.
1783 2018-05-10 Jason Merrill <jason@redhat.com>
1785 * include/bits/regex_compiler.h (_S_cache_size): Change from
1786 function to variable.
1788 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1790 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1791 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1792 argument defaulted to +1. Doxy comments on same.
1793 * testsuite/special_functions/02_assoc_legendre/
1794 check_value.cc: Regen.
1795 * testsuite/tr1/5_numerical_facilities/special_functions/
1796 02_assoc_legendre/check_value.cc: Regen.
1798 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1801 * include/bits/c++config.h (__replacement_assert): Add linkage
1803 * include/bits/std_abs.h: Add comment to closing brace of block.
1804 * include/c_global/cstddef: Add linkage specification.
1805 * include/c_global/cstring: Likewise.
1806 * include/c_global/cwchar: Likewise.
1808 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1810 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1812 (_Safe_iterator<>::_S_constant()): ...that.
1813 * include/debug/safe_local_iterator.h
1814 (_Safe_local_iterator<>::_M_constant()): Rename in...
1815 (_Safe_local_iterator<>::_S_constant()): ...that.
1816 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1817 (_Iterator_state::__rbegin): New.
1818 (_Iterator_state::__rmiddle): New.
1819 (_Iterator_state::__rend): New.
1820 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1821 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1823 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1824 _Is_iterator)): Likewise.
1825 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1826 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1827 _Is_iterator)): New.
1828 (_Parameter(std::reverse_iterator<> const&, const char*,
1829 _Is_iterator)): New.
1830 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1831 const char*, _Is_iterator)): New.
1832 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1834 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1835 _Is_iterator)): New.
1836 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1837 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1838 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1840 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1842 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1843 Use constexpr if in C++17 mode.
1844 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1845 Copy from const object.
1846 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1848 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1850 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1851 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1854 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1855 * include/debug/functions.h (__check_valid_range): Use latter.
1856 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1858 * include/debug/deque
1859 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1860 * include/debug/forward_list
1861 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1863 * include/debug/list
1864 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1865 * include/debug/list
1866 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1867 * include/debug/map.h
1868 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1869 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1871 * include/debug/multimap.h
1872 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1873 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1874 const _Alloc&)): Likewise.
1875 * include/debug/set.h
1876 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1877 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1879 * include/debug/multiset.h
1880 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1881 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1882 const _Alloc&)): Likewise.
1883 * include/debug/string
1884 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1886 * include/debug/unordered_map
1887 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1889 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1890 const _Alloc&)): Likewise.
1891 * include/debug/unordered_set
1892 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1894 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1895 const _Alloc&)): Likewise.
1896 * include/debug/vector
1897 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1899 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1900 (_Error_formatter(const char*, unsigned int)): Adapt.
1901 (_Error_formatter::_M_at): Rename in...
1902 (_Error_formatter::_S_at): ...that and adapt.
1903 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1904 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1905 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1908 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1910 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1911 Use normal std::vector even in Debug Mode.
1914 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1915 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1916 * include/Makefile.in: Regenerate.
1917 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1918 within conditional block.
1920 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1922 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1923 C++17 Filesystem implementation also needs -lstdc++fs.
1926 * include/bits/fs_path.h (operator/): Permit copy elision.
1927 * include/experimental/bits/fs_path.h (operator/): Likewise.
1929 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1931 Moar PR libstdc++/80506
1932 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1933 Fix magic number used in loop condition.
1935 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1937 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1938 * include/std/optional (_Optional_payload): Add noexcept to default
1939 constructor. Re-indent.
1940 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1941 constructor for copying disengaged payloads.
1942 (_Optional_payload<_Tp, true, false, true>): Likewise.
1943 (_Optional_payload<_Tp, true, true, false>): Likewise.
1944 (_Optional_payload<_Tp, true, false, false>): Likewise.
1945 * testsuite/20_util/optional/cons/85642.cc: New.
1946 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1948 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1951 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1952 inline definitions instead of using-declarations.
1953 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1954 * testsuite/tr1/5_numerical_facilities/special_functions/
1955 07_conf_hyperg/compile_cxx17.cc: New.
1956 * testsuite/tr1/5_numerical_facilities/special_functions/
1957 17_hyperg/compile_cxx17.cc: New.
1960 * include/std/variant (visit): Qualify std::get call.
1962 PR libstdc++/85632 use uintmax_t for arithmetic
1963 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1964 arithmetic in result type.
1965 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1966 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1967 is greater than free space.
1968 * testsuite/experimental/filesystem/operations/space.cc: New.
1970 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1971 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1973 * testsuite/20_util/remove_cvref/value.cc: New.
1974 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1976 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1977 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1978 (append(const basic_string&, size_type, size_type)
1979 (assign(const basic_string&, size_type, size_type)
1980 (insert(size_type, const basic_string&, size_type, size_type)
1981 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1982 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1983 Add default arguments (LWG 2268).
1984 [_GLIBCXX_USE_CXX11_ABI=0]
1985 (append(const basic_string&, size_type, size_type)
1986 (assign(const basic_string&, size_type, size_type)
1987 (insert(size_type, const basic_string&, size_type, size_type)
1988 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1989 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1991 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1994 * include/std/thread (thread::__not_same): New SFINAE helper.
1995 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1996 first argument is not a std::thread. Add static assertion to check
1997 INVOKE expression is valid.
1998 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1999 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
2000 __invoke_result for return types and remove exception specifications.
2001 * testsuite/30_threads/thread/cons/84535.cc: New.
2003 * include/std/future (__async_result_of): Use __invoke_result instead
2006 * include/std/any (any_cast): Use __remove_cvref_t.
2007 * include/std/tuple (__make_tuple): Likewise.
2008 * include/std/type_traits (__remove_cvref_t): Define.
2009 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
2010 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
2011 * include/std/variant (__erased_hash): Use __remove_cvref_t.
2013 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
2015 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
2016 ensure overloaded comma not used.
2017 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
2018 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
2019 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
2020 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
2021 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
2022 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
2023 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
2025 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
2028 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
2029 indices to unsigned.
2030 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
2031 as failure. Refactor error handling.
2032 * testsuite/27_io/ios_base/storage/68197.cc: New.
2036 * include/bits/gslice_array.h (gslice_array): Define default
2037 constructor as deleted, as per C++11 standard.
2038 * include/bits/mask_array.h (mask_array): Likewise.
2039 * include/bits/slice_array.h (slice_array): Likewise.
2040 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
2041 to namespace __detail.
2042 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
2044 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
2045 of data members in closure objects.
2046 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
2047 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
2049 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
2050 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
2051 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
2052 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
2053 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
2054 using-declarations to namespace std.
2055 * testsuite/26_numerics/valarray/83860.cc: New.
2057 * testsuite/backward/strstream_move.cc: Remove duplicate function
2061 * include/backward/strstream (strstreambuf): Define move constructor
2062 and move assignment operator.
2063 (istrstream, ostrstream, strstream): Likewise.
2064 * testsuite/backward/strstream_move.cc: New.
2066 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
2069 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
2070 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
2071 * configure: Regenerate.
2072 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
2073 based on ENABLE_FLOAT128.
2074 * include/Makefile.in: Regenerate.
2075 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
2076 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
2077 _GLIBCXX_USE_FLOAT128.
2079 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2081 * configure: Regenerated.
2083 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2085 * configure: Regenerated.
2087 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
2088 Jakub Jelinek <jakub@redhat.com>
2091 * src/c++11/Makefile.am: Don't generate debuginfo again for
2092 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
2093 * src/c++11/Makefile.in: Regenerate.
2095 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
2098 * testsuite/30_threads/thread/cons/terminate.cc
2099 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
2101 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2104 * configure: Regenerate.
2106 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
2108 * testsuite/experimental/filesystem/file_status/1.cc: Add
2109 -DUSE_FILESYSTEM_TS to dg-options.
2110 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2112 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
2113 * testsuite/experimental/filesystem/iterators/
2114 recursive_directory_iterator.cc: Likewise.
2115 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
2116 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2117 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2118 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
2119 * testsuite/experimental/filesystem/operations/create_directories.cc:
2121 * testsuite/experimental/filesystem/operations/create_directory.cc:
2123 * testsuite/experimental/filesystem/operations/create_symlink.cc:
2125 * testsuite/experimental/filesystem/operations/current_path.cc:
2127 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
2128 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2129 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
2130 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2131 * testsuite/experimental/filesystem/operations/last_write_time.cc:
2133 * testsuite/experimental/filesystem/operations/permissions.cc:
2135 * testsuite/experimental/filesystem/operations/read_symlink.cc:
2137 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2138 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
2139 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
2140 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
2142 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
2143 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
2144 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
2145 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
2146 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
2147 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
2148 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
2149 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
2150 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
2151 * testsuite/experimental/filesystem/path/construct/default.cc:
2153 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
2154 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
2155 * testsuite/experimental/filesystem/path/construct/string_view.cc:
2157 * testsuite/experimental/filesystem/path/decompose/extension.cc:
2159 * testsuite/experimental/filesystem/path/decompose/filename.cc:
2161 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
2163 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
2165 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2167 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
2169 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
2171 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2172 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
2174 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
2175 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
2176 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
2178 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
2180 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
2182 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
2184 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
2185 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
2186 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
2188 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2189 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2191 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2193 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2195 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2197 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2199 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2201 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2203 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2204 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2207 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
2209 * src/c++11/Makefile.am: Fix sed command.
2210 * src/c++11/Makefile.in: Regenerate.
2212 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
2213 handle mangled names starting with double underscores on darwin.
2214 * src/c++11/Makefile.in: Regenerate.
2216 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
2218 * src/c++11/Makefile.am: Fix comment.
2219 * src/c++11/Makefile.in: Regenerate.
2220 * src/c++11/cxx11-ios_failure.cc: Fix comment.
2221 * src/c++98/ios_failure.cc: Likewise.
2223 * src/c++11/ios.cc: Remove redundant macro definition.
2225 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
2227 * doc/xml/manual/abi.xml: Document header locations in recent
2229 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
2230 * doc/xml/manual/spine.xml: Update copyright years.
2231 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
2232 undefined behaviour.
2233 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
2234 * doc/html/*: Regenerate.
2236 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
2238 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
2239 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2240 * doc/xml/manual/containers.xml: Likewise.
2241 * doc/xml/manual/debug_mode.xml: Likewise.
2242 * doc/xml/manual/extensions.xml: Likewise.
2243 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
2244 * doc/xml/manual/using.xml: Likewise.
2245 * doc/xml/manual/utilities.xml: Likewise.
2248 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
2249 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
2250 * src/c++11/Makefile.in: Regenerate.
2251 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
2253 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2254 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
2255 * src/c++98/ios_failure.cc (__construct_ios_failure)
2256 (__destroy_ios_failure, is_ios_failure_handler): New functions.
2257 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2258 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
2259 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
2260 handler types, to always catch std::ios_base::failure.
2261 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
2262 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
2263 exceptions_failbit.cc: Likewise.
2264 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
2265 exceptions_failbit.cc: Likewise.
2266 * testsuite/27_io/basic_istream/extractors_other/char/
2267 exceptions_null.cc: Likewise.
2268 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
2269 exceptions_null.cc: Likewise.
2270 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
2271 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
2272 * testsuite/27_io/basic_ostream/inserters_other/char/
2273 exceptions_null.cc: Likewise.
2274 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
2275 exceptions_null.cc: Likewise.
2276 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
2278 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
2280 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
2281 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
2283 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
2286 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
2288 * testsuite/20_util/variant/85183.cc: New.
2290 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
2292 * include/std/variant (__get): Qualify calls to avoid ADL.
2293 (__select_index): Adjust whitespace.
2294 (variant): Add using-declaration to workaround Clang bug.
2296 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
2299 * include/bits/stl_function.h (greater::__not_overloaded)
2300 (less::__not_overloaded, greater_equal::__not_overloaded)
2301 (less_equal::__not_overloaded): Fix ambiguous specializations.
2302 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
2303 tests for type with overloaded operators.
2305 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2308 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2309 xfail execution on 32-bit Solaris/x86.
2311 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
2313 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
2314 VERIFY instead of assert.
2315 * testsuite/20_util/hash/84998.cc: New test.
2316 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
2317 copy of test adjusted for Debug Mode.
2318 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
2321 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
2324 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
2325 * include/std/bitset: Likewise.
2326 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
2328 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
2329 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
2330 * include/bits/stl_set.h (std::set<>): Likewise.
2331 * include/bits/unordered_map.h (std::unordered_map<>): Fix
2332 _Hash_merge_helper friend declaration.
2333 (std::unordered_multimap<>): Likewise.
2334 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
2335 (std::unordered_multiset<>): Likewise.
2337 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2339 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
2340 trailing slash for domain level link.
2341 * doc/xml/faq.xml: Ditto.
2342 * doc/xml/manual/appendix_free.xml (software): Ditto.
2343 * doc/xml/manual/intro.xml: Ditto.
2344 * doc/xml/manual/spine.xml: Ditto.
2345 * doc/xml/spine.xml: Ditto.
2347 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2349 * doc/xml/manual/documentation_hacking.xml: Adjust link to
2352 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
2354 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
2355 to compile as C++98.
2357 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
2360 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
2361 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
2362 to ensure total order for pointers.
2363 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
2364 Add operator() overloads for pointer arguments and make generic
2365 overloads dispatch to new _S_cmp functions when comparisons would
2366 use built-in operators for pointers.
2367 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
2369 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
2373 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
2374 * configure: Regenerate.
2375 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
2376 (aligned_alloc): Add using-declaration.
2377 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
2379 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
2381 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
2382 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
2385 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
2388 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
2389 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
2391 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
2392 src/filesystem/std-ops.cc (create_dir): Likewise.
2394 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
2396 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
2397 (StdListIteratorPrinter): Inherit from latter.
2398 (StdFwdListIteratorPrinter): New, inherit from latter.
2399 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
2400 when iterator has no associated container.
2401 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
2402 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
2404 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
2405 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
2407 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2410 * include/std/optional (_Optional_payload): Split into multiple
2411 specializations that can handle different cases of trivial or
2412 non-trivial assignment operators.
2413 * testsuite/20_util/optional/84601.cc: New.
2414 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2416 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
2419 * include/bits/parse_numbers.h (_Number_help): Add partial
2420 specialization to handle digit separators. Adjust partial
2421 specialization for recursion temrination to require _Pow == 1ULL.
2422 * testsuite/20_util/duration/literals/84671.cc: New
2424 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
2426 Implement the missing bits of LWG 2769
2427 * include/std/any (any_cast(const any&)): Add static_assert.
2428 (any_cast(any&)): Likewise.
2429 (any_cast(any&&)): Likewise, and remove the handling
2430 for copyable-but-not-movable type.
2431 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
2432 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
2435 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
2438 * include/std/thread (thread::__make_invoker): Construct tuple
2439 directly instead of using make_tuple.
2440 * testsuite/30_threads/async/84532.cc: New.
2441 * testsuite/30_threads/thread/84532.cc: New.
2443 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
2445 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
2446 (template<> __aligned_buffer): Define as __aligned_membuf alias.
2448 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
2451 * configure: Regenerate.
2453 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
2456 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
2457 * configure: Regenerate.
2458 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
2460 * include/Makefile.in: Regenerate.
2462 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
2465 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2466 Add -ffloat-store to options for m68k and ia32.
2468 * doc/xml/faq.xml: Update copyright years.
2469 * doc/html/*: Regenerate.
2472 * include/std/any (any::__do_emplace): Only set _M_manager after
2473 constructing the contained object.
2474 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
2475 * testsuite/20_util/any/modifiers/83658.cc: New test.
2477 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
2480 * include/c_global/cstddef (__byte_operand): Define primary template.
2481 * testsuite/18_support/byte/81076.cc: New test.
2483 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
2485 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
2486 dg-options and dg-add-options order.
2487 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
2488 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
2490 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
2491 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
2493 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
2495 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
2496 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
2498 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
2500 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2502 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2504 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2506 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2508 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2510 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2512 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2513 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2514 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2515 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2516 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2517 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2518 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2519 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2520 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2522 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2524 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2526 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2529 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
2531 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
2532 include linux/types.h when checking linux/random.h header.
2533 * config.h.in: Regenerate.
2535 * src/c++11/random.cc: Conditionally include linux/types.h.
2537 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
2539 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2541 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
2544 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2545 pattern with exact match for std::cerr.
2547 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2550 * include/bits/random.h (chi_squared_distribution::param): Update
2551 gamma distribution parameter.
2552 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2556 * include/std/type_traits (has_unique_object_representations_v): Add
2558 * testsuite/20_util/has_unique_object_representations/value.cc: Check
2561 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
2563 Make optional conditionally
2564 trivially_{copy,move}_{constructible,assignable}
2565 * include/std/optional (_Optional_payload): Fix the comment in
2566 the class head and turn into a primary and one specialization.
2567 (_Optional_payload::_M_engaged): Strike the NSDMI.
2568 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2570 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2572 (_Optional_payload<_Tp, false>::_M_get): Likewise.
2573 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2574 (_Optional_base_impl): Likewise.
2575 (_Optional_base): Turn into a primary and three specializations.
2576 (optional(nullopt)): Change the base init.
2577 * testsuite/20_util/optional/assignment/8.cc: New.
2578 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2579 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2581 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2584 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2585 (get_template_arg_list): New.
2586 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2588 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2589 of strings and regular expressions.
2590 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2591 (FilteringTypePrinter): Add docstring. Match using startswith. Use
2592 strip_inline_namespaces instead of strip_versioned_namespace.
2593 (add_one_type_printer): Prepend namespace to match argument.
2594 (register_type_printers): Add type printers for char16_t and char32_t
2595 string types and for types using cxx11 ABI. Update calls to
2596 add_one_template_type_printer to provide default argument dicts.
2597 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2598 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2599 basic_string<unsigned char> and basic_string<signed char>.
2600 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2601 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2603 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
2606 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2608 2018-01-13 Tim Shen <timshen@google.com>
2611 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2612 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2613 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2615 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2618 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2619 Remove dg-xfail-run-if.
2621 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
2623 * include/bits/forward_list.h
2624 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2625 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2626 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2627 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2628 (_Fwd_list_impl()): Add noexcept qualification.
2629 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2630 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2631 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2632 (_Fwd_list_base()): Default.
2633 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2634 (_Fwd_list_base(_Fwd_list_base&&)): Default.
2635 (forward_list<>()): Default.
2636 (forward_list<>(forward_list&&)): Default.
2637 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2638 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2639 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2640 * include/bits/forward_list.tcc
2641 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2642 _M_impl._M_head move assignment.
2643 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2644 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2646 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
2649 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2650 (UniquePointerPrinter): Print correct template argument, not type of
2652 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2654 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2656 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2657 weak_ptr of array types.
2659 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
2662 * include/bits/hashtable_policy.h
2663 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2665 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2666 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2667 Add false_type parameter.
2668 (_Insert_base::insert): Adapt.
2669 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2671 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2672 Add __n_elt parameter, defaulted to 1.
2673 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2674 policy _M_need_rehash.
2675 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2676 produce only 1 rehash if necessary.
2677 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2678 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2680 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2681 Jonathan Wakely <jwakely@redhat.com>
2683 PR libstdc++/59253 (partial)
2684 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2685 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2686 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2688 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2689 of unique_ptr printer.
2690 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2691 output of shared_ptr printer.
2693 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
2696 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2697 unnecessary symlink_status call.
2698 (remove_all(const path&, error_code&)): Use filesystem::remove.
2699 * src/filesystem/std-ops.cc: Likewise.
2702 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2706 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2707 report an error for ENOENT.
2708 (remove_all(const path&)): Fix type of result variable.
2709 (remove_all(const path&, error_code&)): Use non-throwing increment
2710 for directory iterator. Call POSIX remove directly to avoid redundant
2711 calls to symlink_status. Do not report errors for ENOENT.
2712 * src/filesystem/std-ops.cc: Likewise.
2713 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2715 * testsuite/experimental/filesystem/operations/remove_all.cc:
2718 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
2721 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2722 redundant call to ec.clear().
2723 (remove_all(const path&, error_code&))): Do not return an error for
2725 * src/filesystem/std-ops.cc: Likewise.
2726 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2727 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2728 results for non-existent paths.
2729 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2730 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2731 expected results for non-existent paths.
2733 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2734 check status_known once.
2735 * include/experimental/bits/fs_ops.h: Likewise.
2738 * include/std/functional (__is_byte_like): New trait.
2739 (__is_std_equal_to): Remove.
2740 (__boyer_moore_base_t): Use __is_byte_like instead of
2742 * include/experimental/functional (__is_std_equal_to): Remove.
2743 (__boyer_moore_base_t): Use __is_byte_like instead of
2745 * testsuite/20_util/function_objects/83607.cc: New test.
2747 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2749 Protect optional's deduction guide with the feature macro
2750 * include/std/optional: Use the feature macro.
2752 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2754 Update copyright years.
2756 Copyright (C) 2018 Free Software Foundation, Inc.
2758 Copying and distribution of this file, with or without modification,
2759 are permitted in any medium without royalty provided the copyright
2760 notice and this notice are preserved.