1 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
4 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
5 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
6 * configure: Regenerate.
7 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
8 * doc/Makefile.in: Regenerate.
9 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
10 * include/Makefile.in: Regenerate.
11 * libsupc++/Makefile.in: Regenerate.
12 * po/Makefile.in: Regenerate.
13 * python/Makefile.in: Regenerate.
14 * src/Makefile.in: Regenerate.
15 * src/c++11/Makefile.in: Regenerate.
16 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
17 from -Wabi=2 that don't affect exported symbols.
18 * src/c++98/Makefile.in: Regenerate.
19 * src/filesystem/Makefile.in: Regenerate.
20 * testsuite/Makefile.in: Regenerate.
22 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
23 (_Async_state_common::_M_join): Simplify use of std::call_once and
24 corresponding explicit instantiation.
25 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
26 (__bind_simple): Remove definitions and explicit instantiation that
27 are not required by exported symbols.
29 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
31 * scripts/create_testsuite_files: Fix typo in comment.
34 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
35 non-standard partial specialization.
36 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
37 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
38 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
40 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
42 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
43 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
44 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
46 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
48 * include/debug/functions.h (__gnu_debug::__check_string): Move...
49 * include/debug/string (__gnu_debug::__check_string): ... here.
50 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
51 (__glibcxx_check_string_n_constructor): New.
52 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
54 (__glibcxx_check_string_constructor): New.
55 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
57 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
58 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
60 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
62 PR libstdc++/84928 use std::move in <numeric> algorithms
63 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
64 conditionally move, according to __cplusplus value.
65 (accumulate, inner_product, partial_sum, adjacent_difference): Use
67 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
68 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
69 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
70 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
72 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
74 P0935R0 Eradicating unnecessarily explicit default constructors
75 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
76 default constructor symbols.
77 * include/std/sstream (basic_stringbuf, basic_istringstream)
78 (basic_ostringstream, basic_stringstream): Remove default arguments
79 from explicit constructors taking ios_base::openmode and add separate
80 non-explicit default constructors.
81 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
82 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
83 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
84 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
85 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
87 * include/std/variant (__accepted_index): Use void_t.
89 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
92 * config/abi/pre/gnu.ver: Export move constructors and move
93 assignment operators for std::logic_error and std::runtime_error.
94 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
95 _GLIBCXX_USE_NOEXCEPT.
96 (logic_error, runtime_error): Declare move constructors and move
97 assignment operators. When not declared already, define copy
98 constructors and copy assignment operators as explicit-defaulted.
99 (domain_error, invalid_argument, length_error, out_of_range)
100 (overflow_error, underflow_error): Define move constructors and move
101 assignment operators as explicitly-defaulted.
102 * libsupc++/exception.h (exception): Likewise.
103 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
104 move constructors and move assignment operators as defaulted.
105 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
106 assignment operators are defined.
108 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
110 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
112 * testsuite/21_strings/basic_string/requirements/
113 explicit_instantiation/debug.cc: Likewise.
116 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
117 (basic_string::assign(basic_string&&)): Add conditional noexcept
118 depending on the allocator's is_always_equal property (LWG 2063).
119 * testsuite/21_strings/basic_string/modifiers/assign/char/
120 move_assign.cc: Check for non-throwing exception specification.
121 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
122 move_assign.cc: Likewise.
125 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
126 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
127 Add GLIBCXX_NOEXCEPT.
128 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
129 to depend on the allocator's is_always_equal property (LWG 2063).
130 (basic_string::swap(basic_string&)): Likewise.
131 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
132 (basic_string::swap(basic_string&)): Likewise.
133 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
134 Check is_nothrow_move_assignable.
135 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
136 Check is_nothrow_move_assignable.
137 * testsuite/21_strings/basic_string/cons/char/
138 noexcept_move_construct.cc: Likewise.
139 * testsuite/21_strings/basic_string/cons/wchar_t/
140 noexcept_move_construct.cc: Likewise.
142 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
144 P0646R1 Improving the Return Value of Erase-Like Algorithms I
145 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
147 (forward_list::__remove_return_type): Define typedef as size_type or
148 void, according to __cplusplus value.
149 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
150 empty, according to __cplusplus value.
151 (forward_list::remove, forward_list::unique): Use typedef and macro
152 to change return type and add abi-tag for C++2a.
153 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
154 typedef to change return type for C++2a.
155 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
156 (forward_list::remove, forward_list::remove_if<Pred>)
157 (forward_list::unique<BinPred>): Return number of removed elements
159 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
160 (list::remove, list::unique, list::remove_if<Predicate>)
161 (list::unique<BinaryPredicate>): Return number of removed elements
163 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
164 (list::__remove_return_type): Define typedef as size_type or
165 void, according to __cplusplus value.
166 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
167 empty, according to __cplusplus value.
168 (list::remove, list::unique): Use typedef and macro to change return
169 type and add abi-tag for C++2a.
170 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
171 typedef to change return type for C++2a.
172 * include/std/version (__cpp_lib_list_remove_return_type): Define.
173 * testsuite/23_containers/forward_list/operations/
174 remove_cxx20_return.cc: New.
175 * testsuite/23_containers/forward_list/operations/
176 unique_cxx20_return.cc: New.
178 P0458R2 Checking for Existence of an Element in Associative Containers
179 * include/bits/stl_map.h (map::contains): Add for C++2a.
180 * include/bits/stl_multimap.h (multimap::contains): Likewise.
181 * include/bits/stl_multiset.h (multiset::contains): Likewise.
182 * include/bits/stl_set.h (set::contains): Likewise.
183 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
184 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
185 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
186 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
187 * include/bits/unordered_map.h (unordered_map::contains)
188 (unordered_multimap::contains): Add for C++2a.
189 * include/bits/unordered_set.h (unordered_set::contains)
190 (unordered_multiset::contains): Likewise.
191 * testsuite/23_containers/map/operations/contains.cc: New.
192 * testsuite/23_containers/multimap/operations/contains.cc: New.
193 * testsuite/23_containers/multiset/operations/contains.cc: New.
194 * testsuite/23_containers/set/operations/contains.cc: New.
195 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
196 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
198 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
200 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
202 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
205 * include/debug/string
206 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
207 Use __glibcxx_check_insert_range.
208 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
209 __gnu_debug::string when _GLIBCXX_DEBUG.
210 * 21_strings/basic_string/init-list.cc: Likewise.
211 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
212 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
213 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
214 * 21_strings/basic_string/types/1.cc: Likewise.
216 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
218 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
219 target for std::random_device.
220 * testsuite/26_numerics/random/random_device/cons/default.cc:
222 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
223 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
224 * testsuite/experimental/random/randint.cc: Likewise.
225 * testsuite/lib/libstdc++.exp
226 (check_effective_target_random_device): New proc.
228 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
229 Jakub Jelinek <jakub@redhat.com>
231 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
233 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
236 * include/std/type_traits (is_trivially_constructible): Check
237 is_constructible before __is_trivially_constructible.
238 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
239 tests, including negative cases.
240 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
241 zero for dg-error lineno.
242 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
245 * include/std/bit (__rotl, __rotr): Avoid branch.
246 (_If_is_unsigned_integer): Use remove_cv_t.
247 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
249 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
251 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
252 * include/Makefile.am: Add new header.
253 * include/Makefile.in: Regenerate.
254 * include/precompiled/stdc++.h: Include new header.
255 * include/std/bit: New header.
256 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
257 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
259 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
260 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
261 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
262 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
264 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
265 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
266 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
267 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
268 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
269 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
270 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
271 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
272 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
273 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
275 * include/bits/alloc_traits.h: Remove redundant preprocessor
278 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
280 * include/bits/stl_algobase.h (__niter_wrap): New.
281 (__copy_move_a2(_II, _II, _OI)): Use latter.
282 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
283 (fill_n(_OI, _Size, const _Tp&)): Likewise.
284 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
285 * include/debug/stl_iterator.h
286 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
287 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
288 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
289 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
291 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
293 P0758R1 Implicit conversion traits
294 * include/std/type_traits [__cplusplus > 201703]
295 (__is_convertible_helper::__is_nothrow_type): Define new member.
296 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
298 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
299 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
301 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
302 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
303 * testsuite/20_util/is_nothrow_convertible/requirements/
304 explicit_instantiation.cc: New.
305 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
308 P0887R1 The identity metafunction
309 * include/std/type_traits (type_identity, type_identity_t): Define
311 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
312 * testsuite/20_util/type_identity/requirements/
313 explicit_instantiation.cc:New.
314 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
316 * include/bits/regex.h (sub_match::operator string_type): Call str().
317 (sub_match::compare): Use _M_str() instead of str().
318 (sub_match::_M_compare): New public function.
319 (sub_match::__string_view): New helper type.
320 (sub_match::_M_str): New overloaded functions to avoid creating a
321 string_type object when not needed.
322 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
323 Use sub_match::_M_compare instead of creating string_type objects.
324 Fix Doxygen comments.
325 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
326 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
328 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
330 * include/std/type_traits (__enable_if_t): Define for C++11.
331 * testsuite/28_regex/sub_match/compare.cc: New.
332 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
334 (input_iterator_wrapper): Use remove_cv for value_type argument of
335 std::iterator base class.
337 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
339 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
340 Add whitespace to dejagnu directive.
341 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
343 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
345 * include/bits/stl_vector.h
346 (struct _Vector_base<>::_Vector_impl_data): New.
347 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
348 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
349 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
350 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
351 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
352 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
353 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
354 (_Vector_base()): Default.
355 (_Vector_base(_Vector_base&&)): Default.
356 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
357 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
358 (_Vector_base::_M_create_storage(size_t)): Make protected.
360 (vector(vector&&)): Default.
361 (vector(vector&&, const allocator_type&, true_type)): New.
362 (vector(vector&&, const allocator_type&, false_type)): New.
363 (vector(vector&&, const allocator_type&)): Use latters.
364 (vector(_InputIte, _InputIte, const allocator_type&)): Call
365 _M_range_initialize directly.
366 * include/debug/vector
367 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
368 * testsuite/23_containers/vector/allocator/default_init.cc: New.
369 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
372 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
374 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
375 (__is_byte<byte>): Define specialization for std::byte.
378 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
379 Declare explicit instantiations of COW empty reps and I/O functions.
381 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
383 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
385 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
387 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
389 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
392 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
395 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
396 Replace dict comprehension.
399 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
402 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
404 * testsuite/23_containers/vector/cons/86292.cc: New.
406 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
408 * include/experimental/algorithm (sample, shuffle): Add new overloads
409 using per-thread random number engine.
410 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
411 dependencies by using __gnu_test::test_container.
412 * testsuite/experimental/algorithm/sample-2.cc: New.
413 * testsuite/experimental/algorithm/shuffle.cc: New.
415 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
417 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
418 different size_t mangling on 32-bit targets.
421 * include/experimental/memory_resource
422 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
423 enough for result of left shift.
426 * include/bits/basic_string.tcc:
427 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
428 (basic_string<char>::_Rep::_S_empty_rep_storage)
429 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
430 instantiation declarations.
431 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
432 explicit instantiation declarations.
433 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
434 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
436 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
439 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
440 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
441 * configure: Regenerate.
442 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
443 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
444 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
445 (basic_string::insert(iterator, initializer_list<C>)): Suppress
447 * include/debug/string (basic_string::insert(iterator, C)): Change
448 first parameter to const_iterator.
449 (basic_string::insert(iterator, size_type, C)): Likewise. Change
450 return type to iterator.
451 (basic_string::insert(iterator, InputIterator, InputIterator)):
453 (basic_string::insert(iterator, initializer_list<C>)): Change first
454 parameter to const_iterator and return type to iterator.
455 * src/c++11/string-inst.cc: Extend comment.
456 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
458 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
460 * testsuite/util/testsuite_abi.cc: Add new symbol version.
462 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
465 * include/experimental/memory_resource
466 (__resource_adaptor_imp::do_deallocate): Add missing return.
467 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
468 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
469 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
470 __gnu_cxx::malloc_allocator.
473 * include/experimental/memory_resource (__resource_adaptor_common):
475 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
476 pointer from unaligned, and vice versa.
477 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
478 allocated pointer to meet alignment request.
479 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
480 original pointer for deallocation.
481 (__resource_adaptor_imp::do_is_equal): Reformat.
482 (__resource_adaptor_imp::_S_aligned_size): Remove.
483 (__resource_adaptor_imp::_S_supported): Remove.
484 (new_delete_resource): Use __gnu_cxx::new_allocator.
485 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
486 extended alignments and use debug_allocator to check for matching
487 allocate/deallocate pairs.
489 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
491 * include/debug/safe_iterator.h
492 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
493 Compare __x base iterator with a value-initialized iterator of the
496 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
499 * include/experimental/memory_resource (__resource_adaptor_imp): Add
500 static assertions to enforce requirements on pointer types.
501 (__resource_adaptor_imp::get_allocator()): Add noexcept.
502 (new_delete_resource, null_memory_resource): Return address of an
503 object with dynamic storage duration.
504 (__null_memory_resource): Remove.
505 * testsuite/experimental/memory_resource/70966.cc: New.
507 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
508 missed from recent commit.
510 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
512 * include/std/utility: Remove unused <exception> header.
514 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
516 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
517 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
518 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
519 a specialization of std::pair.
520 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
521 pair elements are constructed correctly.
523 LWG 2989 hide path iostream operators from normal lookup
524 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
526 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
528 LWG 3050 Fix cv-qualification of convertibility constraints
529 * include/std/chrono (duration, operator*, operator/, operator%): Use
530 const-qualified type as source type in is_convertible constraints.
531 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
532 * testsuite/20_util/duration/cons/dr3050.cc: New.
533 * testsuite/20_util/duration/literals/range.cc: Rename to...
534 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
537 2018-06-18 Maya Rashish <coypu@sdf.org>
539 * crossconfig.m4: Handle OpenBSD just like NetBSD.
540 * configure: Rebuilt.
542 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
544 P0754R2 <version> header
545 * include/Makefile.am: Add new header.
546 * include/Makefile.in: Regenerate.
547 * include/bits/c++config: Change doxygen comment to suggest <version>
549 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
550 unconditionally. Add C++17 and C++20 headers.
551 * include/std/version: New header.
552 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
553 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
554 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
555 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
556 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
557 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
558 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
560 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
561 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
562 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
563 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
564 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
565 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
566 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
568 * testsuite/18_support/headers/version/macros.cc: New.
569 * testsuite/18_support/headers/version/macros.cc: New.
571 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
572 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
574 * config.h.in: Regenerate.
575 * configure: Regenerate.
576 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
578 LWG 3035. std::allocator's constructors should be constexpr
579 * include/bits/allocator.h (allocator): Add constexpr to constructors
580 for C++2a. Replace dynamic exception specifications with NOTHROW
582 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
584 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
585 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
586 to constructors for C++2a.
587 * include/ext/new_allocator.h (new_allocator): Likewise.
589 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
591 LWG 3076 basic_string CTAD ambiguity
592 * doc/xml/manual/intro.xml: Document LWG 3076 change.
593 * include/bits/basic_string.h
594 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
595 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
596 template constrained by _RequireAllocator.
597 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
598 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
600 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
602 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
605 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
608 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
609 (basic_string::data()): Unshare string.
610 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
613 * include/std/string_view (basic_string_view(const CharT*)): Remove
614 check for null pointer and add nonnull attribute.
615 (compare(const CharT*), compare(size_type, size_type, const CharT*))
616 (find(const CharT*, size_type), rfind(const CharT*, size_type))
617 (find_first_of(const CharT*, size_type))
618 (find_last_of(const CharT*, size_type))
619 (find_first_not_of(const CharT*, size_type))
620 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
621 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
622 * testsuite/21_strings/basic_string_view/operations/compare/char/
624 * testsuite/21_strings/basic_string_view/operations/find/char/
626 * testsuite/21_strings/basic_string_view/operations/rfind/char/
630 * include/bits/random.h (random_device(const string&)): Remove
633 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
634 define for C++17 and above.
636 LWG 2993 reference_wrapper<T> conversion from T&&
637 * doc/xml/manual/intro.xml: Document LWG 2993 change.
638 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
639 (reference_wrapper(_Tp&&)): Remove.
640 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
642 (reference_wrapper): Add deduction guide.
643 * testsuite/20_util/reference_wrapper/deduction.cc: New.
644 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
646 LWG 3039 Unnecessary decay in thread and packaged_task
647 * include/std/future (__constrain_pkgdtask): Replace with ...
648 (packaged_task::__not_same): New alias template, using
649 __remove_cvref_t instead of decay.
650 * include/std/thread (thread::__not_same): Add comment.
652 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
654 LWG 3075 basic_string needs deduction guides from basic_string_view
655 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
656 deduction from string views.
657 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
660 LWG 3074 make scalar types non-deduced in valarray non-member functions
661 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
662 scalar parameters to be a non-deduced context.
663 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
665 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
666 * testsuite/26_numerics/valarray/transcend.cc: New.
668 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
669 Move back to <utility>.
670 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
673 P0935R0 Eradicating unnecessarily explicit default constructors
674 * include/backward/strstream (strstreambuf): Add non-explicit default
676 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
678 * include/bits/regex.h (match_results): Likewise.
679 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
681 * testsuite/22_locale/conversions/string/1.cc: Likewise.
682 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
683 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
685 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
686 macro from <utility> and change type to long.
687 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
688 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
691 P0935R0 Eradicating unnecessarily explicit default constructors
692 * include/bits/random.h (uniform_real_distribution::param_type)
693 (normal_distribution::param_type, lognormal_distribution::param_type)
694 (gamma_distribution::param_type, chi_squared_distribution::param_type)
695 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
696 (student_t_distribution::param_type)
697 (bernoulli_distribution::param_type)
698 (binomial_distribution::param_type)
699 (geometric_distribution::param_type)
700 (negative_binomial_distribution::param_type)
701 (poisson_distribution::param_type)
702 (exponential_distribution::param_type)
703 (weibull_distribution::param_type)
704 (extreme_value_distribution::param_type): Add non-explicit default
705 constructors. Remove default argument for first parameter of explicit
707 * include/bits/uniform_int_dist.h
708 (uniform_int_distribution::param_type): Likewise.
710 (beta_distribution::param_type, rice_distribution::param_type)
711 (nakagami_distribution::param_type, pareto_distribution::param_type)
712 (k_distribution::param_type, arcsine_distribution::param_type)
713 (hoyt_distribution::param_type, triangular_distribution::param_type)
714 (von_mises_distribution::param_type)
715 (hypergeometric_distribution::param_type)
716 (logistic_distribution::param_type)
717 (uniform_inside_sphere_distribution::param_type): Likewise.
718 (uniform_on_sphere_distribution::param_type): Make default constructor
720 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
721 Test param_type for non-explicit default constructor.
722 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
724 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
726 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
728 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
730 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
732 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
734 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
736 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
738 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
740 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
742 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
744 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
746 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
748 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
750 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
752 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
754 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
756 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
758 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
760 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
761 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
762 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
763 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
765 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
766 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
767 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
768 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
770 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
771 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
772 * testsuite/ext/random/triangular_distribution/cons/default.cc:
774 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
776 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
778 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
781 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
782 Jonathan Wakely <jwakely@redhat.com>
785 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
786 Default-construct new elements before moving existing ones.
787 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
790 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
793 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
795 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
796 Use node allocator to create and destroy elements.
797 (forward_list::_Tp_alloc_type): Remove unused typedef.
798 (forward_list::_Alloc_traits): Use allocator_traits instead of
799 __gnu_cxx::__alloc_traits.
801 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
803 * include/debug/helper_functions.h
804 (__gnu_debug::_Safe_iterator<>): Add declaration.
805 (__can_advance(_Ite, _Size)): New.
806 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
807 * include/debug/functions.h
808 (__gnu_debug::_Safe_iterator<>): Remove declaration.
809 * include/debug/stl_iterator.h
810 (__can_advance(const _Safe_iterator<>&)): New definition.
811 * include/debug/stl_iterator.h
812 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
813 (__can_advance(const std::move_iterator<>&, _Size)): New.
814 * include/debug/macros.h (__glibcxx_check_can_increment): New.
815 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
816 * include/bits/stl_algobase.h (fill_n): Use latter.
817 * testsuite/25_algorithms/fill_n/2.cc: New.
818 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
819 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
820 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
821 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
823 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
824 (__glibcxx_requires_can_decrement_range): New.
826 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
828 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
829 (__glibcxx_check_can_decrement_range): New.
830 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
831 __glibcxx_requires_can_increment_range.
832 (std::move(_II, _II, _OI)): Likewise.
833 (std::copy_backward(_BI, _BI, _BI2)): Use
834 __glibcxx_requires_can_decrement_range.
835 (std::move_backward(_BI, _BI, _BI2)): Likewise.
836 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
837 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
838 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
839 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
840 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
841 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
843 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
845 P0935R0 Eradicating unnecessarily explicit default constructors
846 * include/bits/random.h (linear_congruential_engine)
847 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
848 (uniform_real_distribution, normal_distribution)
849 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
850 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
851 (bernoulli_distribution, binomial_distribution,geometric_distribution)
852 (negative_binomial_distribution, exponential_distribution)
853 (weibull_distribution, extreme_value_distribution): Add non-explicit
854 default constructors. Remove default argument for first parameter of
855 explicit constructors.
856 (piecewise_constant_distribution, piecewise_linear_distribution):
857 Make default constructor non-explicit.
858 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
859 non-explicit default constructors. Remove default argument for first
860 parameter of explicit constructor.
862 (simd_fast_mersenne_twister_engine, beta_distribution)
863 (rice_distribution, nakagami_distribution, pareto_distribution)
864 (k_distribution, arcsine_distribution, hoyt_distribution)
865 (triangular_distribution, von_mises_distribution)
866 (hypergeometric_distribution, logistic_distribution)
867 (uniform_inside_sphere_distribution): Likewise.
868 (uniform_on_sphere_distribution): Make default constructor
870 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
871 Test for non-explicit default constructor. Fix references to standard.
872 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
874 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
876 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
878 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
880 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
882 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
884 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
886 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
888 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
890 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
892 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
894 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
896 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
898 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
900 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
902 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
904 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
906 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
908 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
910 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
911 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
912 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
913 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
915 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
916 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
917 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
918 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
920 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
921 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
922 * testsuite/ext/random/triangular_distribution/cons/default.cc:
924 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
926 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
928 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
930 * testsuite/util/testsuite_common_types.h
931 (implicitly_default_constructible): New helper.
933 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
935 * include/bits/ios_base.h (ios::Init::Init(const Init&))
936 (ios::Init::operator=): Define as defaulted.
937 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
939 * include/bits/stream_iterator.h (istream_iterator::operator=)
940 (ostream_iterator::operator=): Likewise.
941 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
943 * include/std/bitset (bitset::reference::reference(const reference&)):
945 * include/std/complex (complex<float>::complex(const complex&))
946 (complex<double>::complex(const complex&))
947 (complex<long double>::complex(const complex&)): Likewise.
949 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
951 * include/bits/regex.h (sub_match): Add noexcept to default
952 constructor and length observer.
953 (match_results): Add noexcept to default constructor and observers
954 with no preconditions. Define destructor as defaulted.
955 (operator==, operator!=, swap): Add noexcept.
956 (regex_iterator): Add default member initializers and define default
957 constructor and destructor as defaulted. Add noexcept to equality
958 and dereference operators.
960 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
963 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
964 (_Safe_iterator_base::_M_detach_single()): Likewise.
965 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
966 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
968 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
970 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
973 2018-06-06 Jakub Jelinek <jakub@redhat.com>
976 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
977 rather than __cpp_transactional_memory >= 201505L.
979 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
982 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
983 Define new partial specialization.
984 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
986 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
987 value not reference for iteration.
988 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
990 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
991 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
994 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
996 * include/std/type_traits: Fix comment typos.
998 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
1000 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1001 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1004 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
1006 * include/bits/stl_tempbuf.h
1007 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
1008 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
1009 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
1010 * include/bits/stl_algo.h (__stable_partition): Adapt.
1011 (__inplace_merge): Adapt.
1012 (__stable_sort): Adapt.
1014 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
1017 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
1018 unconditionally. Remove redundant declaration.
1019 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
1020 alignment-specifier.
1022 * include/bits/postypes.h (fpos): Define special members as defaulted.
1025 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
1026 the static variable correctly.
1028 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1030 PR libstdc++/78870 support std::filesystem on Windows
1031 * config.h.in: Regenerate.
1032 * configure: Regenerate.
1033 * configure.ac: Check for link, readlink and symlink.
1034 * include/bits/fs_path.h (path::operator/=(const path&)): Move
1035 definition out of class body.
1036 (path::is_absolute(), path::_M_append(path)): Likewise.
1037 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
1038 (operator>>(basic_istream, path&)): Likewise.
1039 (u8path): Reorder definitions and fix Windows implementation.
1040 (path::is_absolute()): Define inline and fix for Windows.
1041 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1042 Define POSIX version inline.
1043 (path::_M_append(path)): Define inline.
1044 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
1045 definition out of class body.
1046 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
1048 (operator>>(basic_istream, path&)): Likewise.
1049 (path::is_absolute()): Define inline and fix for Windows.
1050 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
1051 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
1052 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
1053 Define as adaptors for Windows functions/types or as
1054 using-declarations for POSIX functions/types.
1055 (_Dir_base, get_file_type): Qualify names to use declarations from
1056 __gnu_posix namespace.
1057 (_Dir_base::is_dor_or_dotdot): New helper functions.
1058 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
1059 names to use declarations from __gnu_posix namespace.
1060 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
1061 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
1062 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
1063 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
1064 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
1065 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
1066 Define as adaptors for Windows functions/types or as
1067 using-declarations for POSIX functions/types.
1068 (stat_type, do_copy_file): Qualify names to use declarations from
1069 __gnu_posix namespace.
1070 (do_space): Declare new function.
1071 (make_file_type): Only use S_ISLNK if defined.
1072 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
1073 path::value_type not char.
1074 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1075 names to use declarations from __gnu_posix namespace.
1076 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1077 add implementation for Windows.
1078 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1079 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1080 [!_PC_PATH_MAX]: Don't use pathconf.
1081 [PATH_MAX]: Use if defined.
1082 (filesystem::current_path(const path&, error_code&))
1083 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1084 (filesystem::last_write_time, filesystem::permissions): Use names
1086 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1087 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1088 implementation for Windows.
1089 (filesystem::rename, filesystem::resize_file): Use names from
1091 (filesystem::space): Use do_space.
1092 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
1093 (filesystem::status, filesystem::symlink_status): Use names from
1095 (filesystem::temp_directory_path): Add implementation for Windows.
1096 * src/filesystem/path.cc (dot): Define constant.
1097 (path::replace_extension): Use dot.
1098 (path::_M_find_extension): Likewise. Use path::string_type not
1100 (path::_M_split_cmpts): Use dot.
1101 (filesystem_error::_M_get_what): Use u8string() not native().
1102 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
1103 Qualify names to use declarations from __gnu_posix namespace.
1104 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
1106 (filesystem::absolute(const path&, error_code&)): Add implementation
1108 (char_ptr, filesystem::canonical): Use path::value_type not char.
1109 (do_copy_file): Use names from __gnu_posix.
1110 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
1112 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1113 names to use declarations from __gnu_posix namespace.
1114 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1115 add implementation for Windows.
1116 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1117 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1118 [!_PC_PATH_MAX]: Don't use pathconf.
1119 [PATH_MAX]: Use if defined.
1120 (filesystem::current_path(const path&, error_code&))
1121 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1122 (filesystem::last_write_time, filesystem::permissions): Use names
1124 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1125 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1126 implementation for Windows.
1127 (filesystem::rename, filesystem::resize_file): Use names from
1130 (filesystem::space): Use do_space.
1131 (filesystem::status, filesystem::symlink_status): Use names from
1133 (filesystem::temp_directory_path): Add implementation for Windows.
1134 * src/filesystem/std-path.cc
1135 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1137 (dot): Define constant.
1138 (path::replace_extension, is_dot): Use dot.
1139 (path::lexically_normal): Check _M_type instead of calling
1140 non-existent function.
1141 (path::_M_find_extension): Use dot. Use path::string_type not
1143 (path::_M_split_cmpts): Use dot.
1144 (filesystem_error::_M_get_what): Use u8string() not native().
1145 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
1147 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1149 * testsuite/27_io/filesystem/operations/absolute.cc: Use
1150 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
1151 * testsuite/27_io/filesystem/operations/canonical.cc: Use
1152 path::string() to get narrow string, not path::native().
1153 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
1154 with std::filesystem::path not std::basic_string.
1155 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1156 * testsuite/27_io/filesystem/operations/exists.cc: Use
1157 __gnu_test::root_path() instead of "/".
1158 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
1159 fstreams with std::filesystem::path not std::basic_string.
1160 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
1161 path::string() to get narrow string.
1162 * testsuite/27_io/filesystem/operations/space.cc: Check results for
1163 errors, expect sensible values otherwise.
1164 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
1165 helpers for adjusting the environment on Windows.
1166 * testsuite/27_io/filesystem/path/append/path.cc: Test
1167 Windows-specific behaviour.
1168 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
1169 of path::string_type objects.
1170 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
1171 string to wide string on Windows.
1172 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
1173 for backslash as root-directory.
1174 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
1175 path::string() to get narrow string.
1176 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
1178 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
1180 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
1181 different definintion of absolute paths on Windows.
1182 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1183 Do not use symlinks.
1184 * testsuite/experimental/filesystem/operations/absolute.cc: Test
1186 * testsuite/experimental/filesystem/operations/copy.cc: Construct
1187 fstreams with NTCTS not std::basic_string.
1188 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1189 * testsuite/experimental/filesystem/operations/exists.cc: Use
1190 __gnu_test::root_path() instead of "/".
1191 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
1192 fstreams with NTCTS not std::basic_string.
1193 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1194 Use path::string() to get narrow string.
1195 * testsuite/experimental/filesystem/operations/space.cc: Use
1196 __gnu_test::root_path() instead of "/".
1197 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1198 Add helpers for adjusting the environment on Windows.
1199 * testsuite/experimental/filesystem/path/append/path.cc: Use
1200 path::string() to get narrow strings for comparisons.
1201 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1202 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1204 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1205 * testsuite/experimental/filesystem/path/native/string.cc: Use
1206 string_type not std::string.
1207 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
1208 Adjust for different definintion of absolute paths on Windows.
1209 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
1211 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
1214 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
1217 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
1218 uint_least16_t and uint_least32_t.
1219 (__make_unsigned<wchar_t>): Define unconditionally.
1220 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
1222 (__make_unsigned_selector_base): New type to provide helper templates.
1223 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
1224 __make_unsigned_selector_base helpers.
1225 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
1226 (__make_signed_selector<_Tp, true, false>): Remove intermediate
1228 (__make_signed<wchar_t>, __make_signed<char16_t>)
1229 (__make_signed<char32_t>)): Define unconditionally.
1230 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
1231 wchar_t, char16_t and char32_t are transformed correctly.
1232 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
1234 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
1235 wchar_t, char16_t and char32_t are transformed correctly.
1236 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
1239 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
1241 * include/std/variant (__erased_dtor): Qualify call to __get.
1243 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
1245 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
1246 (_Rb_tree(const allocator_type&)): Use latter.
1247 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
1248 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
1249 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1250 * include/bits/stl_multimap.h
1251 (multimap(const allocator_type&)): Likewise.
1252 (multimap(initializer_list<value_type>, const allocator_type&)):
1254 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
1256 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
1257 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
1258 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1259 * include/bits/stl_multiset.h
1260 (multiset(const allocator_type&)): Likewise.
1261 (multiset(initializer_list<value_type>, const allocator_type&)):
1263 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
1266 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
1269 * src/c++11/debug.cc: Remove backtrace usage.
1271 2018-05-24 Maya Rashish <coypu@sdf.org>
1274 * crossconfig.m4: Test for aligned_alloc on netbsd.
1275 * configure: Regenerate.
1277 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1281 * include/bits/atomic_base.h (__atomic_base::value_type)
1282 (__atomic_base::difference_type): Add new typedefs.
1283 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
1284 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
1285 (atomic<T*>::operator++, atomic<T*>::operator--)
1286 (atomic<T*>::operator+=, atomic<T*>::operator-=)
1287 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
1288 to enforce C++17 requirement on pointer arithmetic.
1289 (__atomic_val_t, __atomic_diff_t): New alias templates.
1290 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
1291 (atomic_compare_exchange_weak_explicit)
1292 (atomic_compare_exchange_strong_explicit, atomic_store)
1293 (atomic_exchange, atomic_compare_exchange_weak)
1294 (atomic_compare_exchange_strong): Use __atomic_val_t to make
1295 scalar parameters be non-deduced contexts.
1296 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1297 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
1298 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
1300 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
1301 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
1302 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
1303 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1304 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
1306 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
1307 * testsuite/29_atomics/atomic/69769.cc: New test.
1308 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
1309 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
1310 Disable test for C++17 and later.
1311 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
1312 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
1313 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
1316 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
1318 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
1319 template to alias template.
1320 (path::__value_type_is_char): Use remove_const_t.
1321 (path:_S_string_from_iter): New helper function.
1322 (path::_S_convert(InputIter, __null_terminated))
1323 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1324 Use _S_string_from_iter.
1325 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
1326 rep for COW strings.
1327 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1328 Change from class template to alias template.
1329 (path::__value_type_is_char): Use remove_const.
1330 (path:_S_string_from_iter): New helper function.
1331 (path::_S_convert(InputIter, __null_terminated))
1332 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1333 Use _S_string_from_iter.
1334 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
1336 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
1337 string equality, not path equivalence.
1338 * testsuite/27_io/filesystem/path/construct/format.cc: Check
1339 construction from std::string and std::wstring and input iterators.
1340 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
1341 construction from iterators.
1342 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1343 exact string equality, not path equivalence.
1344 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1345 construction from iterators.
1347 * include/bits/fs_path.h (path::_M_type): Change default member
1348 initializer to _Filename.
1349 (path::begin): Create past-the-end iterator for empty path.
1350 * src/filesystem/std-path.cc (path::remove_filename()): Remove
1352 (path::has_relative_path()): Return false for empty filenames.
1353 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1354 Fix offset of empty final component.
1355 * testsuite/27_io/filesystem/path/itr/components.cc: New.
1356 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1358 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1360 Add support for opening file streams from wide character strings.
1361 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1362 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1363 Define new overload.
1364 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1365 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1366 Declare new overload.
1367 * configure.ac: Check for _wfopen.
1368 * crossconfig.m4: Likewise.
1369 * configure: Regenerate.
1370 * config.h.in: Regenerate.
1371 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1372 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1373 Define new overload.
1374 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1375 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1376 Declare new overload.
1377 [_GLIBCXX_HAVE__WFOPEN]
1378 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1379 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1380 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1381 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1382 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1383 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1385 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1386 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1387 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1388 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1389 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1390 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1391 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1393 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
1396 * include/bits/stl_tree.h
1397 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1400 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
1402 * src/filesystem/std-ops.cc (absolute): Report an error for empty
1404 (weakly_canonical(const path&)): Do not call canonical on empty path.
1405 (weakly_canonical(const path&, error_code&)): Likewise.
1406 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1409 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1410 dg-require-filesystem-ts.
1413 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1414 initialize base class to avoid warnings.
1416 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
1418 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1419 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1420 little_endian element in bitmask.
1421 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1422 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1424 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
1426 * include/bits/stl_tree.h
1427 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1428 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1429 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1430 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1431 * include/debug/map.h
1432 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1433 * include/debug/multimap.h
1434 (multimap(multimap&&, const_allocator_type&)): Likewise.
1435 * include/debug/set.h
1436 (set(set&&, const_allocator_type&)): Likewise.
1437 * include/debug/multiset.h
1438 (multiset(multiset&&, const_allocator_type&)): Likewise.
1439 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1441 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1443 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1445 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1447 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1449 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1451 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1453 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1456 2018-05-18 Jason Merrill <jason@redhat.com>
1458 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1459 for conversion to const_iterator. Add defaulted copy ops.
1460 * libsupc++/new (bad_alloc): Add defaulted copy ops.
1461 * libsupc++/exception.h (exception): Add defaulted copy ops.
1462 * include/std/system_error (system_error): Add defaulted copy ops.
1463 * include/std/stdexcept (domain_error, invalid_argument)
1464 (length_error, out_of_range, range_error, overflow_error)
1465 (underflow_error): Add defaulted copy ops.
1466 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1468 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1469 * include/ext/throw_allocator.h (condition_base): Add defaulted
1470 default and copy ctor and copy assignment.
1472 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
1475 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1476 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1477 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1478 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1480 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1482 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1483 braces around body of do-while.
1484 * testsuite/28_regex/basic_regex/85098.cc: New
1486 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
1489 * src/filesystem/path.cc (path::preferred_separator): Add used
1491 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1494 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1495 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1496 Refactor to separate non-throwing and throwing implementations.
1497 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1498 if constructing the object throws.
1500 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
1503 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1504 (linear_congruential_engine, mersenne_twister_engine)
1505 (subtract_with_carry_engine, discard_block_engine)
1506 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1507 constrain function templates taking seed sequences.
1508 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1509 (mersenne_twister_engine::seed(_Sseq&))
1510 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1512 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1513 __is_seed_seq to constrain function templates taking seed sequences.
1514 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1515 Change return type to match declaration.
1516 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1518 * testsuite/26_numerics/random/independent_bits_engine/cons/
1520 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1522 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1524 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1525 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1527 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1529 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1533 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1534 for all operating systems.
1535 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1536 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1537 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1538 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1540 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1541 unused <vector> header.
1542 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1543 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1544 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1545 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1546 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1548 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1550 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1551 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1552 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1553 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1554 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1556 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1557 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1559 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1561 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1563 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1565 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1567 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1569 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1571 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1572 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1576 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1577 temporary path before calling _M_append.
1578 (path::_M_append): Change parameter to path and implement C++17
1580 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1581 and more examples from the standard.
1582 * testsuite/27_io/filesystem/path/append/source.cc: New.
1583 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1584 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1586 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1587 __invoke to prevent ADL.
1589 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
1592 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1593 exceptions from _M_terminate_output().
1594 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1595 exceptions from close().
1596 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1598 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1599 (__valarray_get_storage): Call operator new directly. Remove ignored
1600 top-level restrict qualifier and add malloc attribute instead.
1601 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1604 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1605 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1608 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1610 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1612 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1615 * testsuite/20_util/variant/80165.cc: New.
1617 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1619 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1620 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1621 of C++11 containers with Debug Mode support.
1622 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1623 * doc/html/*: Regenerate.
1625 2018-05-10 Jason Merrill <jason@redhat.com>
1627 * include/bits/regex_compiler.h (_S_cache_size): Change from
1628 function to variable.
1630 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1632 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1633 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1634 argument defaulted to +1. Doxy comments on same.
1635 * testsuite/special_functions/02_assoc_legendre/
1636 check_value.cc: Regen.
1637 * testsuite/tr1/5_numerical_facilities/special_functions/
1638 02_assoc_legendre/check_value.cc: Regen.
1640 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
1643 * include/bits/c++config.h (__replacement_assert): Add linkage
1645 * include/bits/std_abs.h: Add comment to closing brace of block.
1646 * include/c_global/cstddef: Add linkage specification.
1647 * include/c_global/cstring: Likewise.
1648 * include/c_global/cwchar: Likewise.
1650 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
1652 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1654 (_Safe_iterator<>::_S_constant()): ...that.
1655 * include/debug/safe_local_iterator.h
1656 (_Safe_local_iterator<>::_M_constant()): Rename in...
1657 (_Safe_local_iterator<>::_S_constant()): ...that.
1658 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1659 (_Iterator_state::__rbegin): New.
1660 (_Iterator_state::__rmiddle): New.
1661 (_Iterator_state::__rend): New.
1662 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1663 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1665 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1666 _Is_iterator)): Likewise.
1667 (_Parameter::_S_reverse_state(_Iterator_state)): New.
1668 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1669 _Is_iterator)): New.
1670 (_Parameter(std::reverse_iterator<> const&, const char*,
1671 _Is_iterator)): New.
1672 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1673 const char*, _Is_iterator)): New.
1674 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1676 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1677 _Is_iterator)): New.
1678 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1679 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1680 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1682 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
1684 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1685 Use constexpr if in C++17 mode.
1686 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1687 Copy from const object.
1688 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1690 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
1692 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1693 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1696 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1697 * include/debug/functions.h (__check_valid_range): Use latter.
1698 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1700 * include/debug/deque
1701 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1702 * include/debug/forward_list
1703 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1705 * include/debug/list
1706 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1707 * include/debug/list
1708 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1709 * include/debug/map.h
1710 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1711 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1713 * include/debug/multimap.h
1714 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1715 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1716 const _Alloc&)): Likewise.
1717 * include/debug/set.h
1718 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1719 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1721 * include/debug/multiset.h
1722 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1723 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1724 const _Alloc&)): Likewise.
1725 * include/debug/string
1726 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1728 * include/debug/unordered_map
1729 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1731 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1732 const _Alloc&)): Likewise.
1733 * include/debug/unordered_set
1734 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1736 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1737 const _Alloc&)): Likewise.
1738 * include/debug/vector
1739 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1741 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1742 (_Error_formatter(const char*, unsigned int)): Adapt.
1743 (_Error_formatter::_M_at): Rename in...
1744 (_Error_formatter::_S_at): ...that and adapt.
1745 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1746 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1747 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1750 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
1752 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1753 Use normal std::vector even in Debug Mode.
1756 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1757 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1758 * include/Makefile.in: Regenerate.
1759 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1760 within conditional block.
1762 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
1764 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1765 C++17 Filesystem implementation also needs -lstdc++fs.
1768 * include/bits/fs_path.h (operator/): Permit copy elision.
1769 * include/experimental/bits/fs_path.h (operator/): Likewise.
1771 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1773 Moar PR libstdc++/80506
1774 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1775 Fix magic number used in loop condition.
1777 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
1779 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1780 * include/std/optional (_Optional_payload): Add noexcept to default
1781 constructor. Re-indent.
1782 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1783 constructor for copying disengaged payloads.
1784 (_Optional_payload<_Tp, true, false, true>): Likewise.
1785 (_Optional_payload<_Tp, true, true, false>): Likewise.
1786 (_Optional_payload<_Tp, true, false, false>): Likewise.
1787 * testsuite/20_util/optional/cons/85642.cc: New.
1788 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1790 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
1793 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1794 inline definitions instead of using-declarations.
1795 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1796 * testsuite/tr1/5_numerical_facilities/special_functions/
1797 07_conf_hyperg/compile_cxx17.cc: New.
1798 * testsuite/tr1/5_numerical_facilities/special_functions/
1799 17_hyperg/compile_cxx17.cc: New.
1802 * include/std/variant (visit): Qualify std::get call.
1804 PR libstdc++/85632 use uintmax_t for arithmetic
1805 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1806 arithmetic in result type.
1807 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1808 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1809 is greater than free space.
1810 * testsuite/experimental/filesystem/operations/space.cc: New.
1812 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1813 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1815 * testsuite/20_util/remove_cvref/value.cc: New.
1816 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1818 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1819 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1820 (append(const basic_string&, size_type, size_type)
1821 (assign(const basic_string&, size_type, size_type)
1822 (insert(size_type, const basic_string&, size_type, size_type)
1823 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1824 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1825 Add default arguments (LWG 2268).
1826 [_GLIBCXX_USE_CXX11_ABI=0]
1827 (append(const basic_string&, size_type, size_type)
1828 (assign(const basic_string&, size_type, size_type)
1829 (insert(size_type, const basic_string&, size_type, size_type)
1830 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1831 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1833 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1836 * include/std/thread (thread::__not_same): New SFINAE helper.
1837 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1838 first argument is not a std::thread. Add static assertion to check
1839 INVOKE expression is valid.
1840 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1841 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1842 __invoke_result for return types and remove exception specifications.
1843 * testsuite/30_threads/thread/cons/84535.cc: New.
1845 * include/std/future (__async_result_of): Use __invoke_result instead
1848 * include/std/any (any_cast): Use __remove_cvref_t.
1849 * include/std/tuple (__make_tuple): Likewise.
1850 * include/std/type_traits (__remove_cvref_t): Define.
1851 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1852 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1853 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1855 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
1857 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1858 ensure overloaded comma not used.
1859 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1860 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1861 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1862 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1863 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1864 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1865 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1867 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
1870 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1871 indices to unsigned.
1872 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1873 as failure. Refactor error handling.
1874 * testsuite/27_io/ios_base/storage/68197.cc: New.
1878 * include/bits/gslice_array.h (gslice_array): Define default
1879 constructor as deleted, as per C++11 standard.
1880 * include/bits/mask_array.h (mask_array): Likewise.
1881 * include/bits/slice_array.h (slice_array): Likewise.
1882 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1883 to namespace __detail.
1884 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1886 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1887 of data members in closure objects.
1888 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1889 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1891 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1892 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1893 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1894 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1895 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1896 using-declarations to namespace std.
1897 * testsuite/26_numerics/valarray/83860.cc: New.
1899 * testsuite/backward/strstream_move.cc: Remove duplicate function
1903 * include/backward/strstream (strstreambuf): Define move constructor
1904 and move assignment operator.
1905 (istrstream, ostrstream, strstream): Likewise.
1906 * testsuite/backward/strstream_move.cc: New.
1908 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1911 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1912 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1913 * configure: Regenerate.
1914 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1915 based on ENABLE_FLOAT128.
1916 * include/Makefile.in: Regenerate.
1917 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1918 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1919 _GLIBCXX_USE_FLOAT128.
1921 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1923 * configure: Regenerated.
1925 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1927 * configure: Regenerated.
1929 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1930 Jakub Jelinek <jakub@redhat.com>
1933 * src/c++11/Makefile.am: Don't generate debuginfo again for
1934 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1935 * src/c++11/Makefile.in: Regenerate.
1937 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
1940 * testsuite/30_threads/thread/cons/terminate.cc
1941 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1943 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1946 * configure: Regenerate.
1948 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
1950 * testsuite/experimental/filesystem/file_status/1.cc: Add
1951 -DUSE_FILESYSTEM_TS to dg-options.
1952 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1954 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1955 * testsuite/experimental/filesystem/iterators/
1956 recursive_directory_iterator.cc: Likewise.
1957 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1958 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1959 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1960 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1961 * testsuite/experimental/filesystem/operations/create_directories.cc:
1963 * testsuite/experimental/filesystem/operations/create_directory.cc:
1965 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1967 * testsuite/experimental/filesystem/operations/current_path.cc:
1969 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1970 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1971 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1972 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1973 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1975 * testsuite/experimental/filesystem/operations/permissions.cc:
1977 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1979 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1980 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1981 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1982 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1984 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1985 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1986 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1987 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1988 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1989 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1990 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1991 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1992 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1993 * testsuite/experimental/filesystem/path/construct/default.cc:
1995 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1996 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1997 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1999 * testsuite/experimental/filesystem/path/decompose/extension.cc:
2001 * testsuite/experimental/filesystem/path/decompose/filename.cc:
2003 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
2005 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
2007 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2009 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
2011 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
2013 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2014 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
2016 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
2017 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
2018 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
2020 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
2022 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
2024 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
2026 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
2027 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
2028 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
2030 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2031 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2033 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2035 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2037 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2039 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2041 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2043 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2045 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2046 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2049 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
2051 * src/c++11/Makefile.am: Fix sed command.
2052 * src/c++11/Makefile.in: Regenerate.
2054 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
2055 handle mangled names starting with double underscores on darwin.
2056 * src/c++11/Makefile.in: Regenerate.
2058 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
2060 * src/c++11/Makefile.am: Fix comment.
2061 * src/c++11/Makefile.in: Regenerate.
2062 * src/c++11/cxx11-ios_failure.cc: Fix comment.
2063 * src/c++98/ios_failure.cc: Likewise.
2065 * src/c++11/ios.cc: Remove redundant macro definition.
2067 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
2069 * doc/xml/manual/abi.xml: Document header locations in recent
2071 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
2072 * doc/xml/manual/spine.xml: Update copyright years.
2073 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
2074 undefined behaviour.
2075 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
2076 * doc/html/*: Regenerate.
2078 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
2080 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
2081 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2082 * doc/xml/manual/containers.xml: Likewise.
2083 * doc/xml/manual/debug_mode.xml: Likewise.
2084 * doc/xml/manual/extensions.xml: Likewise.
2085 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
2086 * doc/xml/manual/using.xml: Likewise.
2087 * doc/xml/manual/utilities.xml: Likewise.
2090 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
2091 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
2092 * src/c++11/Makefile.in: Regenerate.
2093 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
2095 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2096 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
2097 * src/c++98/ios_failure.cc (__construct_ios_failure)
2098 (__destroy_ios_failure, is_ios_failure_handler): New functions.
2099 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2100 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
2101 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
2102 handler types, to always catch std::ios_base::failure.
2103 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
2104 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
2105 exceptions_failbit.cc: Likewise.
2106 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
2107 exceptions_failbit.cc: Likewise.
2108 * testsuite/27_io/basic_istream/extractors_other/char/
2109 exceptions_null.cc: Likewise.
2110 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
2111 exceptions_null.cc: Likewise.
2112 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
2113 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
2114 * testsuite/27_io/basic_ostream/inserters_other/char/
2115 exceptions_null.cc: Likewise.
2116 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
2117 exceptions_null.cc: Likewise.
2118 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
2120 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
2122 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
2123 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
2125 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
2128 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
2130 * testsuite/20_util/variant/85183.cc: New.
2132 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
2134 * include/std/variant (__get): Qualify calls to avoid ADL.
2135 (__select_index): Adjust whitespace.
2136 (variant): Add using-declaration to workaround Clang bug.
2138 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
2141 * include/bits/stl_function.h (greater::__not_overloaded)
2142 (less::__not_overloaded, greater_equal::__not_overloaded)
2143 (less_equal::__not_overloaded): Fix ambiguous specializations.
2144 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
2145 tests for type with overloaded operators.
2147 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2150 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2151 xfail execution on 32-bit Solaris/x86.
2153 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
2155 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
2156 VERIFY instead of assert.
2157 * testsuite/20_util/hash/84998.cc: New test.
2158 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
2159 copy of test adjusted for Debug Mode.
2160 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
2163 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
2166 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
2167 * include/std/bitset: Likewise.
2168 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
2170 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
2171 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
2172 * include/bits/stl_set.h (std::set<>): Likewise.
2173 * include/bits/unordered_map.h (std::unordered_map<>): Fix
2174 _Hash_merge_helper friend declaration.
2175 (std::unordered_multimap<>): Likewise.
2176 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
2177 (std::unordered_multiset<>): Likewise.
2179 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2181 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
2182 trailing slash for domain level link.
2183 * doc/xml/faq.xml: Ditto.
2184 * doc/xml/manual/appendix_free.xml (software): Ditto.
2185 * doc/xml/manual/intro.xml: Ditto.
2186 * doc/xml/manual/spine.xml: Ditto.
2187 * doc/xml/spine.xml: Ditto.
2189 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2191 * doc/xml/manual/documentation_hacking.xml: Adjust link to
2194 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
2196 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
2197 to compile as C++98.
2199 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
2202 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
2203 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
2204 to ensure total order for pointers.
2205 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
2206 Add operator() overloads for pointer arguments and make generic
2207 overloads dispatch to new _S_cmp functions when comparisons would
2208 use built-in operators for pointers.
2209 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
2211 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
2215 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
2216 * configure: Regenerate.
2217 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
2218 (aligned_alloc): Add using-declaration.
2219 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
2221 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
2223 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
2224 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
2227 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
2230 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
2231 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
2233 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
2234 src/filesystem/std-ops.cc (create_dir): Likewise.
2236 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
2238 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
2239 (StdListIteratorPrinter): Inherit from latter.
2240 (StdFwdListIteratorPrinter): New, inherit from latter.
2241 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
2242 when iterator has no associated container.
2243 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
2244 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
2246 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
2247 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
2249 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2252 * include/std/optional (_Optional_payload): Split into multiple
2253 specializations that can handle different cases of trivial or
2254 non-trivial assignment operators.
2255 * testsuite/20_util/optional/84601.cc: New.
2256 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2258 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
2261 * include/bits/parse_numbers.h (_Number_help): Add partial
2262 specialization to handle digit separators. Adjust partial
2263 specialization for recursion temrination to require _Pow == 1ULL.
2264 * testsuite/20_util/duration/literals/84671.cc: New
2266 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
2268 Implement the missing bits of LWG 2769
2269 * include/std/any (any_cast(const any&)): Add static_assert.
2270 (any_cast(any&)): Likewise.
2271 (any_cast(any&&)): Likewise, and remove the handling
2272 for copyable-but-not-movable type.
2273 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
2274 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
2277 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
2280 * include/std/thread (thread::__make_invoker): Construct tuple
2281 directly instead of using make_tuple.
2282 * testsuite/30_threads/async/84532.cc: New.
2283 * testsuite/30_threads/thread/84532.cc: New.
2285 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
2287 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
2288 (template<> __aligned_buffer): Define as __aligned_membuf alias.
2290 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
2293 * configure: Regenerate.
2295 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
2298 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
2299 * configure: Regenerate.
2300 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
2302 * include/Makefile.in: Regenerate.
2304 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
2307 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2308 Add -ffloat-store to options for m68k and ia32.
2310 * doc/xml/faq.xml: Update copyright years.
2311 * doc/html/*: Regenerate.
2314 * include/std/any (any::__do_emplace): Only set _M_manager after
2315 constructing the contained object.
2316 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
2317 * testsuite/20_util/any/modifiers/83658.cc: New test.
2319 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
2322 * include/c_global/cstddef (__byte_operand): Define primary template.
2323 * testsuite/18_support/byte/81076.cc: New test.
2325 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
2327 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
2328 dg-options and dg-add-options order.
2329 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
2330 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
2332 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
2333 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
2335 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
2337 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
2338 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
2340 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
2342 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2344 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2346 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2348 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2350 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2352 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2354 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2355 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2356 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2357 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2358 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2359 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2360 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2361 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2362 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2364 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2366 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2368 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2371 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
2373 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
2374 include linux/types.h when checking linux/random.h header.
2375 * config.h.in: Regenerate.
2377 * src/c++11/random.cc: Conditionally include linux/types.h.
2379 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
2381 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2383 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
2386 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2387 pattern with exact match for std::cerr.
2389 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2392 * include/bits/random.h (chi_squared_distribution::param): Update
2393 gamma distribution parameter.
2394 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2398 * include/std/type_traits (has_unique_object_representations_v): Add
2400 * testsuite/20_util/has_unique_object_representations/value.cc: Check
2403 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
2405 Make optional conditionally
2406 trivially_{copy,move}_{constructible,assignable}
2407 * include/std/optional (_Optional_payload): Fix the comment in
2408 the class head and turn into a primary and one specialization.
2409 (_Optional_payload::_M_engaged): Strike the NSDMI.
2410 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2412 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2414 (_Optional_payload<_Tp, false>::_M_get): Likewise.
2415 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2416 (_Optional_base_impl): Likewise.
2417 (_Optional_base): Turn into a primary and three specializations.
2418 (optional(nullopt)): Change the base init.
2419 * testsuite/20_util/optional/assignment/8.cc: New.
2420 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2421 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2423 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
2426 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2427 (get_template_arg_list): New.
2428 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2430 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2431 of strings and regular expressions.
2432 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2433 (FilteringTypePrinter): Add docstring. Match using startswith. Use
2434 strip_inline_namespaces instead of strip_versioned_namespace.
2435 (add_one_type_printer): Prepend namespace to match argument.
2436 (register_type_printers): Add type printers for char16_t and char32_t
2437 string types and for types using cxx11 ABI. Update calls to
2438 add_one_template_type_printer to provide default argument dicts.
2439 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2440 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2441 basic_string<unsigned char> and basic_string<signed char>.
2442 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2443 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2445 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
2448 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2450 2018-01-13 Tim Shen <timshen@google.com>
2453 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2454 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2455 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2457 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2460 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2461 Remove dg-xfail-run-if.
2463 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
2465 * include/bits/forward_list.h
2466 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2467 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2468 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2469 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2470 (_Fwd_list_impl()): Add noexcept qualification.
2471 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2472 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2473 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2474 (_Fwd_list_base()): Default.
2475 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2476 (_Fwd_list_base(_Fwd_list_base&&)): Default.
2477 (forward_list<>()): Default.
2478 (forward_list<>(forward_list&&)): Default.
2479 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2480 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2481 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2482 * include/bits/forward_list.tcc
2483 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2484 _M_impl._M_head move assignment.
2485 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2486 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2488 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
2491 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2492 (UniquePointerPrinter): Print correct template argument, not type of
2494 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2496 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2498 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2499 weak_ptr of array types.
2501 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
2504 * include/bits/hashtable_policy.h
2505 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2507 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2508 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2509 Add false_type parameter.
2510 (_Insert_base::insert): Adapt.
2511 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2513 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2514 Add __n_elt parameter, defaulted to 1.
2515 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2516 policy _M_need_rehash.
2517 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2518 produce only 1 rehash if necessary.
2519 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2520 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2522 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2523 Jonathan Wakely <jwakely@redhat.com>
2525 PR libstdc++/59253 (partial)
2526 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2527 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2528 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2530 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2531 of unique_ptr printer.
2532 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2533 output of shared_ptr printer.
2535 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
2538 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2539 unnecessary symlink_status call.
2540 (remove_all(const path&, error_code&)): Use filesystem::remove.
2541 * src/filesystem/std-ops.cc: Likewise.
2544 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2548 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2549 report an error for ENOENT.
2550 (remove_all(const path&)): Fix type of result variable.
2551 (remove_all(const path&, error_code&)): Use non-throwing increment
2552 for directory iterator. Call POSIX remove directly to avoid redundant
2553 calls to symlink_status. Do not report errors for ENOENT.
2554 * src/filesystem/std-ops.cc: Likewise.
2555 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2557 * testsuite/experimental/filesystem/operations/remove_all.cc:
2560 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
2563 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2564 redundant call to ec.clear().
2565 (remove_all(const path&, error_code&))): Do not return an error for
2567 * src/filesystem/std-ops.cc: Likewise.
2568 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2569 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2570 results for non-existent paths.
2571 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2572 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2573 expected results for non-existent paths.
2575 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2576 check status_known once.
2577 * include/experimental/bits/fs_ops.h: Likewise.
2580 * include/std/functional (__is_byte_like): New trait.
2581 (__is_std_equal_to): Remove.
2582 (__boyer_moore_base_t): Use __is_byte_like instead of
2584 * include/experimental/functional (__is_std_equal_to): Remove.
2585 (__boyer_moore_base_t): Use __is_byte_like instead of
2587 * testsuite/20_util/function_objects/83607.cc: New test.
2589 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2591 Protect optional's deduction guide with the feature macro
2592 * include/std/optional: Use the feature macro.
2594 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2596 Update copyright years.
2598 Copyright (C) 2018 Free Software Foundation, Inc.
2600 Copying and distribution of this file, with or without modification,
2601 are permitted in any medium without royalty provided the copyright
2602 notice and this notice are preserved.