]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
class.c (resolve_address_of_overloaded_function): Don't emit an inform if the matchin...
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
20b47be0
JW
12018-07-16 Jonathan Wakely <jwakely@redhat.com>
2
3 PR libstdc++/86537
4 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
5 non-standard partial specialization.
6 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
7 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
8 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
9
9c588dbe
AK
102018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
11
12 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
13 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
14 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
15
1e736a95
FD
162018-07-06 François Dumont <fdumont@gcc.gnu.org>
17
18 * include/debug/functions.h (__gnu_debug::__check_string): Move...
19 * include/debug/string (__gnu_debug::__check_string): ... here.
20 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
21 (__glibcxx_check_string_n_constructor): New.
22 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
23 Use latter.
24 (__glibcxx_check_string_constructor): New.
25 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
26 Use latter.
27 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
28 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
29
4d023b5b
JW
302018-07-06 Jonathan Wakely <jwakely@redhat.com>
31
5840e3b8
JW
32 PR libstdc++/84928 use std::move in <numeric> algorithms
33 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
34 conditionally move, according to __cplusplus value.
35 (accumulate, inner_product, partial_sum, adjacent_difference): Use
36 _GLIBCXX_MOVE_IF_20.
37 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
38 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
39 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
40 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
41
f1b3168d
JW
42 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
43
97271bd8
JW
44 P0935R0 Eradicating unnecessarily explicit default constructors
45 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
46 default constructor symbols.
47 * include/std/sstream (basic_stringbuf, basic_istringstream)
48 (basic_ostringstream, basic_stringstream): Remove default arguments
49 from explicit constructors taking ios_base::openmode and add separate
50 non-explicit default constructors.
51 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
52 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
53 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
54 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
55 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
56
4d023b5b
JW
57 * include/std/variant (__accepted_index): Use void_t.
58
d8d9b83b
JW
592018-07-05 Jonathan Wakely <jwakely@redhat.com>
60
d04dbb8a
JW
61 PR libstdc++/85831
62 * config/abi/pre/gnu.ver: Export move constructors and move
63 assignment operators for std::logic_error and std::runtime_error.
64 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
65 _GLIBCXX_USE_NOEXCEPT.
66 (logic_error, runtime_error): Declare move constructors and move
67 assignment operators. When not declared already, define copy
68 constructors and copy assignment operators as explicit-defaulted.
69 (domain_error, invalid_argument, length_error, out_of_range)
70 (overflow_error, underflow_error): Define move constructors and move
71 assignment operators as explicitly-defaulted.
72 * libsupc++/exception.h (exception): Likewise.
73 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
74 move constructors and move assignment operators as defaulted.
75 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
76 assignment operators are defined.
77
339657d2
JW
78 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
79 COW strings.
80 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
81 Likewise.
82 * testsuite/21_strings/basic_string/requirements/
83 explicit_instantiation/debug.cc: Likewise.
84
30236791
JW
85 PR libstdc++/58265
86 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
87 (basic_string::assign(basic_string&&)): Add conditional noexcept
88 depending on the allocator's is_always_equal property (LWG 2063).
89 * testsuite/21_strings/basic_string/modifiers/assign/char/
90 move_assign.cc: Check for non-throwing exception specification.
91 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
92 move_assign.cc: Likewise.
93
d8d9b83b
JW
94 PR libstdc++/58265
95 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
96 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
97 Add GLIBCXX_NOEXCEPT.
98 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
99 to depend on the allocator's is_always_equal property (LWG 2063).
100 (basic_string::swap(basic_string&)): Likewise.
101 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
102 (basic_string::swap(basic_string&)): Likewise.
103 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
104 Check is_nothrow_move_assignable.
105 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
106 Check is_nothrow_move_assignable.
107 * testsuite/21_strings/basic_string/cons/char/
108 noexcept_move_construct.cc: Likewise.
109 * testsuite/21_strings/basic_string/cons/wchar_t/
110 noexcept_move_construct.cc: Likewise.
111
3adea09e
JW
1122018-07-04 Jonathan Wakely <jwakely@redhat.com>
113
ef45724a
JW
114 P0646R1 Improving the Return Value of Erase-Like Algorithms I
115 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
116 Define.
117 (forward_list::__remove_return_type): Define typedef as size_type or
118 void, according to __cplusplus value.
119 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
120 empty, according to __cplusplus value.
121 (forward_list::remove, forward_list::unique): Use typedef and macro
122 to change return type and add abi-tag for C++2a.
123 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
124 typedef to change return type for C++2a.
125 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
126 (forward_list::remove, forward_list::remove_if<Pred>)
127 (forward_list::unique<BinPred>): Return number of removed elements
128 for C++2a.
129 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
130 (list::remove, list::unique, list::remove_if<Predicate>)
131 (list::unique<BinaryPredicate>): Return number of removed elements
132 for C++2a.
133 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
134 (list::__remove_return_type): Define typedef as size_type or
135 void, according to __cplusplus value.
136 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
137 empty, according to __cplusplus value.
138 (list::remove, list::unique): Use typedef and macro to change return
139 type and add abi-tag for C++2a.
140 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
141 typedef to change return type for C++2a.
142 * include/std/version (__cpp_lib_list_remove_return_type): Define.
143 * testsuite/23_containers/forward_list/operations/
144 remove_cxx20_return.cc: New.
145 * testsuite/23_containers/forward_list/operations/
146 unique_cxx20_return.cc: New.
147
3adea09e
JW
148 P0458R2 Checking for Existence of an Element in Associative Containers
149 * include/bits/stl_map.h (map::contains): Add for C++2a.
150 * include/bits/stl_multimap.h (multimap::contains): Likewise.
151 * include/bits/stl_multiset.h (multiset::contains): Likewise.
152 * include/bits/stl_set.h (set::contains): Likewise.
153 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
154 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
155 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
156 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
157 * include/bits/unordered_map.h (unordered_map::contains)
158 (unordered_multimap::contains): Add for C++2a.
159 * include/bits/unordered_set.h (unordered_set::contains)
160 (unordered_multiset::contains): Likewise.
161 * testsuite/23_containers/map/operations/contains.cc: New.
162 * testsuite/23_containers/multimap/operations/contains.cc: New.
163 * testsuite/23_containers/multiset/operations/contains.cc: New.
164 * testsuite/23_containers/set/operations/contains.cc: New.
165 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
166 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
167 New.
168 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
169 New.
170 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
171
d3fc820e 1722018-07-04 François Dumont <fdumont@gcc.gnu.org>
96eb9df6 173
d3fc820e 174 PR libstdc++/86272
96eb9df6
FD
175 * include/debug/string
176 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
177 Use __glibcxx_check_insert_range.
178 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
179 __gnu_debug::string when _GLIBCXX_DEBUG.
180 * 21_strings/basic_string/init-list.cc: Likewise.
181 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
182 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
183 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
184 * 21_strings/basic_string/types/1.cc: Likewise.
185
89bc4ab1
JW
1862018-07-04 Jonathan Wakely <jwakely@redhat.com>
187
188 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
189 target for std::random_device.
190 * testsuite/26_numerics/random/random_device/cons/default.cc:
191 Likewise.
192 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
193 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
194 * testsuite/experimental/random/randint.cc: Likewise.
195 * testsuite/lib/libstdc++.exp
196 (check_effective_target_random_device): New proc.
197
4e4120a2
JW
1982018-07-04 Jonathan Wakely <jwakely@redhat.com>
199 Jakub Jelinek <jakub@redhat.com>
200
201 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
202
90fc44ec
JW
2032018-07-04 Jonathan Wakely <jwakely@redhat.com>
204
e9029d55
JW
205 PR libstdc++/86398
206 * include/std/type_traits (is_trivially_constructible): Check
207 is_constructible before __is_trivially_constructible.
208 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
209 tests, including negative cases.
210 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
211 zero for dg-error lineno.
212 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
213 Likewise.
214
90fc44ec
JW
215 * include/std/bit (__rotl, __rotr): Avoid branch.
216 (_If_is_unsigned_integer): Use remove_cv_t.
217 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
218
cf3e6e9f
JW
2192018-07-03 Jonathan Wakely <jwakely@redhat.com>
220
f3e91052
JW
221 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
222 * include/Makefile.am: Add new header.
223 * include/Makefile.in: Regenerate.
224 * include/precompiled/stdc++.h: Include new header.
225 * include/std/bit: New header.
226 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
227 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
228 Define for C++14.
229 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
230 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
231 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
232 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
233 std::byte.
234 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
235 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
236 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
237 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
238 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
239 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
240 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
241 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
242 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
243 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
244
cf3e6e9f
JW
245 * include/bits/alloc_traits.h: Remove redundant preprocessor
246 condition.
247
315aadc8
FD
2482018-07-03 François Dumont <fdumont@gcc.gnu.org>
249
250 * include/bits/stl_algobase.h (__niter_wrap): New.
251 (__copy_move_a2(_II, _II, _OI)): Use latter.
252 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
253 (fill_n(_OI, _Size, const _Tp&)): Likewise.
254 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
255 * include/debug/stl_iterator.h
256 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
257 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
258 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
259 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
260
e112d53a
JW
2612018-07-02 Jonathan Wakely <jwakely@redhat.com>
262
8df27fcb
JW
263 P0758R1 Implicit conversion traits
264 * include/std/type_traits [__cplusplus > 201703]
265 (__is_convertible_helper::__is_nothrow_type): Define new member.
266 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
267 noexcept.
268 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
269 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
270 new members.
271 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
272 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
273 * testsuite/20_util/is_nothrow_convertible/requirements/
274 explicit_instantiation.cc: New.
275 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
276 New.
277
ee896276
JW
278 P0887R1 The identity metafunction
279 * include/std/type_traits (type_identity, type_identity_t): Define
280 for C++2a.
281 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
282 * testsuite/20_util/type_identity/requirements/
283 explicit_instantiation.cc:New.
284 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
285
e112d53a
JW
286 * include/bits/regex.h (sub_match::operator string_type): Call str().
287 (sub_match::compare): Use _M_str() instead of str().
288 (sub_match::_M_compare): New public function.
289 (sub_match::__string_view): New helper type.
290 (sub_match::_M_str): New overloaded functions to avoid creating a
291 string_type object when not needed.
292 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
293 Use sub_match::_M_compare instead of creating string_type objects.
294 Fix Doxygen comments.
295 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
296 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
297 simplify.
298 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
299 __enable_if_t.
300 * include/std/type_traits (__enable_if_t): Define for C++11.
301 * testsuite/28_regex/sub_match/compare.cc: New.
302 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
303 trait.
304 (input_iterator_wrapper): Use remove_cv for value_type argument of
305 std::iterator base class.
306
6fdce073
JW
3072018-06-29 Jonathan Wakely <jwakely@redhat.com>
308
309 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
310 Add whitespace to dejagnu directive.
311 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
312
e6cad987
FD
3132018-06-27 François Dumont <fdumont@gcc.gnu.org>
314
315 * include/bits/stl_vector.h
316 (struct _Vector_base<>::_Vector_impl_data): New.
317 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
318 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
319 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
320 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
321 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
322 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
323 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
324 (_Vector_base()): Default.
325 (_Vector_base(_Vector_base&&)): Default.
326 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
327 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
328 (_Vector_base::_M_create_storage(size_t)): Make protected.
329 (vector()): Default.
330 (vector(vector&&)): Default.
331 (vector(vector&&, const allocator_type&, true_type)): New.
332 (vector(vector&&, const allocator_type&, false_type)): New.
333 (vector(vector&&, const allocator_type&)): Use latters.
334 (vector(_InputIte, _InputIte, const allocator_type&)): Call
335 _M_range_initialize directly.
336 * include/debug/vector
337 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
338 * testsuite/23_containers/vector/allocator/default_init.cc: New.
339 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
340 static assertions.
341
db9e7b2a
JW
3422018-06-27 Jonathan Wakely <jwakely@redhat.com>
343
cd7ec27c
JW
344 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
345 (__is_byte<byte>): Define specialization for std::byte.
346
db9e7b2a
JW
347 PR libstdc++/86138
348 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
349 Declare explicit instantiations of COW empty reps and I/O functions.
350
18338e9e
DE
3512018-06-26 David Edelsohn <dje.gcc@gmail.com>
352
353 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
354 directives.
355 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
356
3da2f26c
JW
3572018-06-26 Jonathan Wakely <jwakely@redhat.com>
358
359 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
360 noexcept.
361
37cb7887
JW
3622018-06-25 Jonathan Wakely <jwakely@redhat.com>
363
4fdb6fb6
JW
364 PR libstdc++/86112
365 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
366 Replace dict comprehension.
367
03cd7d3f
JW
368 PR libstdc++/81092
369 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
370
3685dcd7
JW
371 PR libstdc++/86292
372 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
373 Add try-catch block.
374 * testsuite/23_containers/vector/cons/86292.cc: New.
375
b03f3a94
JW
376 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
377
37cb7887
JW
378 * include/experimental/algorithm (sample, shuffle): Add new overloads
379 using per-thread random number engine.
380 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
381 dependencies by using __gnu_test::test_container.
382 * testsuite/experimental/algorithm/sample-2.cc: New.
383 * testsuite/experimental/algorithm/shuffle.cc: New.
384
d72888d3
JW
3852018-06-22 Jonathan Wakely <jwakely@redhat.com>
386
626d407b
JW
387 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
388 different size_t mangling on 32-bit targets.
389
0b4bc9a1
JW
390 PR libstdc++/86280
391 * include/experimental/memory_resource
392 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
393 enough for result of left shift.
394
d72888d3
JW
395 PR libstdc++/86138
396 * include/bits/basic_string.tcc:
397 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
398 (basic_string<char>::_Rep::_S_empty_rep_storage)
399 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
400 instantiation declarations.
401 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
402 explicit instantiation declarations.
403 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
404 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
405
7956c508
JW
4062018-06-21 Jonathan Wakely <jwakely@redhat.com>
407
cda121ac
JW
408 PR libstdc++/83328
409 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
410 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
411 * configure: Regenerate.
412 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
413 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
414 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
415 (basic_string::insert(iterator, initializer_list<C>)): Suppress
416 definition.
417 * include/debug/string (basic_string::insert(iterator, C)): Change
418 first parameter to const_iterator.
419 (basic_string::insert(iterator, size_type, C)): Likewise. Change
420 return type to iterator.
421 (basic_string::insert(iterator, InputIterator, InputIterator)):
422 Likewise.
423 (basic_string::insert(iterator, initializer_list<C>)): Change first
424 parameter to const_iterator and return type to iterator.
425 * src/c++11/string-inst.cc: Extend comment.
426 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
427 New.
428 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
429 New.
430 * testsuite/util/testsuite_abi.cc: Add new symbol version.
431
5cfd8620
JW
432 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
433
e9df6a8f
JW
434 PR libstdc++/70940
435 * include/experimental/memory_resource
436 (__resource_adaptor_imp::do_deallocate): Add missing return.
437 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
438 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
439 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
440 __gnu_cxx::malloc_allocator.
441
7956c508
JW
442 PR libstdc++/70940
443 * include/experimental/memory_resource (__resource_adaptor_common):
444 New base class.
445 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
446 pointer from unaligned, and vice versa.
447 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
448 allocated pointer to meet alignment request.
449 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
450 original pointer for deallocation.
451 (__resource_adaptor_imp::do_is_equal): Reformat.
452 (__resource_adaptor_imp::_S_aligned_size): Remove.
453 (__resource_adaptor_imp::_S_supported): Remove.
454 (new_delete_resource): Use __gnu_cxx::new_allocator.
455 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
456 extended alignments and use debug_allocator to check for matching
457 allocate/deallocate pairs.
458
802743ba
FD
4592018-06-21 François Dumont <fdumont@gcc.gnu.org>
460
89de39a9 461 * include/debug/safe_iterator.h
802743ba 462 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
89de39a9 463 Compare __x base iterator with a value-initialized iterator of the
802743ba
FD
464 same type.
465
d9addf33
JW
4662018-06-20 Jonathan Wakely <jwakely@redhat.com>
467
e70359b3
JW
468 PR libstdc++/70966
469 * include/experimental/memory_resource (__resource_adaptor_imp): Add
470 static assertions to enforce requirements on pointer types.
471 (__resource_adaptor_imp::get_allocator()): Add noexcept.
472 (new_delete_resource, null_memory_resource): Return address of an
473 object with dynamic storage duration.
474 (__null_memory_resource): Remove.
475 * testsuite/experimental/memory_resource/70966.cc: New.
476
d9addf33
JW
477 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
478 missed from recent commit.
479
828d6449
JW
4802018-06-19 Jonathan Wakely <jwakely@redhat.com>
481
482 * include/std/utility: Remove unused <exception> header.
483
8499a82c
JW
4842018-06-18 Jonathan Wakely <jwakely@redhat.com>
485
05891e9f
JW
486 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
487 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
488 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
489 a specialization of std::pair.
490 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
491 pair elements are constructed correctly.
492
b0874c66
JW
493 LWG 2989 hide path iostream operators from normal lookup
494 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
495 friends.
496 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
497
8499a82c
JW
498 LWG 3050 Fix cv-qualification of convertibility constraints
499 * include/std/chrono (duration, operator*, operator/, operator%): Use
500 const-qualified type as source type in is_convertible constraints.
501 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
502 * testsuite/20_util/duration/cons/dr3050.cc: New.
503 * testsuite/20_util/duration/literals/range.cc: Rename to...
504 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
505 dg-error lineno.
506
4f9eae9f
MR
5072018-06-18 Maya Rashish <coypu@sdf.org>
508
509 * crossconfig.m4: Handle OpenBSD just like NetBSD.
510 * configure: Rebuilt.
511
3be9ded2
JW
5122018-06-18 Jonathan Wakely <jwakely@redhat.com>
513
410fb7d7
JW
514 P0754R2 <version> header
515 * include/Makefile.am: Add new header.
516 * include/Makefile.in: Regenerate.
517 * include/bits/c++config: Change doxygen comment to suggest <version>
518 instead of <iosfwd>.
519 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
520 unconditionally. Add C++17 and C++20 headers.
521 * include/std/version: New header.
522 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
523 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
524 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
525 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
526 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
527 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
528 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
529 New.
530 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
531 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
532 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
533 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
534 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
535 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
536 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
537 New.
538 * testsuite/18_support/headers/version/macros.cc: New.
539 * testsuite/18_support/headers/version/macros.cc: New.
540
7314856c
JW
541 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
542 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
543 symlink.
544 * config.h.in: Regenerate.
545 * configure: Regenerate.
546 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
547
3be9ded2
JW
548 LWG 3035. std::allocator's constructors should be constexpr
549 * include/bits/allocator.h (allocator): Add constexpr to constructors
550 for C++2a. Replace dynamic exception specifications with NOTHROW
551 macro.
552 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
553 NOTHROW.
554 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
555 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
556 to constructors for C++2a.
557 * include/ext/new_allocator.h (new_allocator): Likewise.
558
5d84e6c5
JW
5592018-06-16 Jonathan Wakely <jwakely@redhat.com>
560
561 LWG 3076 basic_string CTAD ambiguity
562 * doc/xml/manual/intro.xml: Document LWG 3076 change.
563 * include/bits/basic_string.h
564 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
565 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
566 template constrained by _RequireAllocator.
567 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
568 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
569 Define.
570 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
571 deduction
572 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
573 Likewise.
574
cb4f9a8c
JW
5752018-06-15 Jonathan Wakely <jwakely@redhat.com>
576
525d67d4
JW
577 PR libstdc++/86169
578 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
579 (basic_string::data()): Unshare string.
580 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
581 New.
582
36eec25a
JW
583 * include/std/string_view (basic_string_view(const CharT*)): Remove
584 check for null pointer and add nonnull attribute.
585 (compare(const CharT*), compare(size_type, size_type, const CharT*))
586 (find(const CharT*, size_type), rfind(const CharT*, size_type))
587 (find_first_of(const CharT*, size_type))
588 (find_last_of(const CharT*, size_type))
589 (find_first_not_of(const CharT*, size_type))
590 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
591 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
592 * testsuite/21_strings/basic_string_view/operations/compare/char/
593 nonnull.cc: New.
594 * testsuite/21_strings/basic_string_view/operations/find/char/
595 nonnull.cc: New.
596 * testsuite/21_strings/basic_string_view/operations/rfind/char/
597 nonnull.cc: New.
598
3438bf7b
JW
599 PR libstdc++/86168
600 * include/bits/random.h (random_device(const string&)): Remove
601 default argument.
602
5a95794c
JW
603 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
604 define for C++17 and above.
605
7f93abd8
JW
606 LWG 2993 reference_wrapper<T> conversion from T&&
607 * doc/xml/manual/intro.xml: Document LWG 2993 change.
608 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
609 (reference_wrapper(_Tp&&)): Remove.
610 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
611 template.
612 (reference_wrapper): Add deduction guide.
613 * testsuite/20_util/reference_wrapper/deduction.cc: New.
614 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
615
cb4f9a8c
JW
616 LWG 3039 Unnecessary decay in thread and packaged_task
617 * include/std/future (__constrain_pkgdtask): Replace with ...
618 (packaged_task::__not_same): New alias template, using
619 __remove_cvref_t instead of decay.
620 * include/std/thread (thread::__not_same): Add comment.
621
977ac63e
JW
6222018-06-14 Jonathan Wakely <jwakely@redhat.com>
623
53e926c8
JW
624 LWG 3075 basic_string needs deduction guides from basic_string_view
625 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
626 deduction from string views.
627 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
628 Likewise.
629
db5ab3aa
JW
630 LWG 3074 make scalar types non-deduced in valarray non-member functions
631 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
632 scalar parameters to be a non-deduced context.
633 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
634 whitespace.
635 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
636 * testsuite/26_numerics/valarray/transcend.cc: New.
637
2d26d4ce
JW
638 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
639 Move back to <utility>.
640 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
641 Restore to here.
642
e9ecac30
JW
643 P0935R0 Eradicating unnecessarily explicit default constructors
644 * include/backward/strstream (strstreambuf): Add non-explicit default
645 constructor.
646 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
647 Likewise.
648 * include/bits/regex.h (match_results): Likewise.
649 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
650 default constructor.
651 * testsuite/22_locale/conversions/string/1.cc: Likewise.
652 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
653 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
654
74755c6a
JW
655 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
656 macro from <utility> and change type to long.
657 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
658 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
659 macro.
660
977ac63e
JW
661 P0935R0 Eradicating unnecessarily explicit default constructors
662 * include/bits/random.h (uniform_real_distribution::param_type)
663 (normal_distribution::param_type, lognormal_distribution::param_type)
664 (gamma_distribution::param_type, chi_squared_distribution::param_type)
665 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
666 (student_t_distribution::param_type)
667 (bernoulli_distribution::param_type)
668 (binomial_distribution::param_type)
669 (geometric_distribution::param_type)
670 (negative_binomial_distribution::param_type)
671 (poisson_distribution::param_type)
672 (exponential_distribution::param_type)
673 (weibull_distribution::param_type)
674 (extreme_value_distribution::param_type): Add non-explicit default
675 constructors. Remove default argument for first parameter of explicit
676 constructors.
677 * include/bits/uniform_int_dist.h
678 (uniform_int_distribution::param_type): Likewise.
679 * include/ext/random
680 (beta_distribution::param_type, rice_distribution::param_type)
681 (nakagami_distribution::param_type, pareto_distribution::param_type)
682 (k_distribution::param_type, arcsine_distribution::param_type)
683 (hoyt_distribution::param_type, triangular_distribution::param_type)
684 (von_mises_distribution::param_type)
685 (hypergeometric_distribution::param_type)
686 (logistic_distribution::param_type)
687 (uniform_inside_sphere_distribution::param_type): Likewise.
688 (uniform_on_sphere_distribution::param_type): Make default constructor
689 non-explicit.
690 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
691 Test param_type for non-explicit default constructor.
692 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
693 Likewise.
694 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
695 Likewise.
696 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
697 Likewise.
698 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
699 Likewise.
700 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
701 Likewise.
702 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
703 Likewise.
704 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
705 Likewise.
706 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
707 Likewise.
708 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
709 Likewise.
710 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
711 Likewise.
712 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
713 Likewise.
714 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
715 Likewise.
716 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
717 Likewise.
718 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
719 Likewise.
720 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
721 Likewise.
722 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
723 Likewise.
724 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
725 Likewise.
726 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
727 Likewise.
728 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
729 Likewise.
730 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
731 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
732 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
733 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
734 Likewise.
735 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
736 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
737 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
738 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
739 Likewise.
740 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
741 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
742 * testsuite/ext/random/triangular_distribution/cons/default.cc:
743 Likewise.
744 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
745 Likewise.
746 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
747 Likewise.
748 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
749 Likewise.
750
4c1d999a
DT
7512018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
752 Jonathan Wakely <jwakely@redhat.com>
753
754 PR libstdc++/83982
755 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
756 Default-construct new elements before moving existing ones.
757 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
758 New.
759
1cc56f07
JW
7602018-06-13 Jonathan Wakely <jwakely@redhat.com>
761
762 PR libstdc++/86127
763 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
764 unused typedef.
1cc56f07
JW
765 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
766 Use node allocator to create and destroy elements.
767 (forward_list::_Tp_alloc_type): Remove unused typedef.
768 (forward_list::_Alloc_traits): Use allocator_traits instead of
769 __gnu_cxx::__alloc_traits.
770
cde650fe
FD
7712018-06-13 François Dumont <fdumont@gcc.gnu.org>
772
eb04ee1d
FD
773 * include/debug/helper_functions.h
774 (__gnu_debug::_Safe_iterator<>): Add declaration.
775 (__can_advance(_Ite, _Size)): New.
776 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
777 * include/debug/functions.h
778 (__gnu_debug::_Safe_iterator<>): Remove declaration.
779 * include/debug/stl_iterator.h
780 (__can_advance(const _Safe_iterator<>&)): New definition.
781 * include/debug/stl_iterator.h
782 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
783 (__can_advance(const std::move_iterator<>&, _Size)): New.
784 * include/debug/macros.h (__glibcxx_check_can_increment): New.
785 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
786 * include/bits/stl_algobase.h (fill_n): Use latter.
787 * testsuite/25_algorithms/fill_n/2.cc: New.
788 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
789 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
790 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
791 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
792
cde650fe
FD
793 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
794 (__glibcxx_requires_can_decrement_range): New.
795
84a9d3b6
FD
7962018-06-12 François Dumont <fdumont@gcc.gnu.org>
797
798 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
799 (__glibcxx_check_can_decrement_range): New.
84a9d3b6
FD
800 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
801 __glibcxx_requires_can_increment_range.
802 (std::move(_II, _II, _OI)): Likewise.
803 (std::copy_backward(_BI, _BI, _BI2)): Use
804 __glibcxx_requires_can_decrement_range.
805 (std::move_backward(_BI, _BI, _BI2)): Likewise.
806 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
807 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
808 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
809 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
810 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
811 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
812
dd9db6f8
JW
8132018-06-12 Jonathan Wakely <jwakely@redhat.com>
814
815 P0935R0 Eradicating unnecessarily explicit default constructors
816 * include/bits/random.h (linear_congruential_engine)
817 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
818 (uniform_real_distribution, normal_distribution)
819 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
820 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
821 (bernoulli_distribution, binomial_distribution,geometric_distribution)
822 (negative_binomial_distribution, exponential_distribution)
823 (weibull_distribution, extreme_value_distribution): Add non-explicit
824 default constructors. Remove default argument for first parameter of
825 explicit constructors.
826 (piecewise_constant_distribution, piecewise_linear_distribution):
827 Make default constructor non-explicit.
828 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
829 non-explicit default constructors. Remove default argument for first
830 parameter of explicit constructor.
8513bec3 831 * include/ext/random
dd9db6f8
JW
832 (simd_fast_mersenne_twister_engine, beta_distribution)
833 (rice_distribution, nakagami_distribution, pareto_distribution)
834 (k_distribution, arcsine_distribution, hoyt_distribution)
835 (triangular_distribution, von_mises_distribution)
836 (hypergeometric_distribution, logistic_distribution)
837 (uniform_inside_sphere_distribution): Likewise.
838 (uniform_on_sphere_distribution): Make default constructor
839 non-explicit.
840 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
841 Test for non-explicit default constructor. Fix references to standard.
842 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
843 Likewise.
844 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
845 Likewise.
846 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
847 Likewise.
848 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
849 Likewise.
850 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
851 Likewise.
852 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
853 Likewise.
854 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
855 Likewise.
856 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
857 Likewise.
858 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
859 Likewise.
860 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
861 Likewise.
862 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
863 Likewise.
864 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
865 Likewise.
866 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
867 Likewise.
868 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
869 Likewise.
870 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
871 Likewise.
872 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
873 Likewise.
874 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
875 Likewise.
876 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
877 Likewise.
878 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
879 Likewise.
880 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
881 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
882 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
883 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
884 Likewise.
885 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
886 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
887 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
888 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
889 Likewise.
890 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
891 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
892 * testsuite/ext/random/triangular_distribution/cons/default.cc:
893 Likewise.
894 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
895 Likewise.
896 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
897 Likewise.
898 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
899 Likewise.
900 * testsuite/util/testsuite_common_types.h
901 (implicitly_default_constructible): New helper.
902
a1417556
JW
9032018-06-08 Jonathan Wakely <jwakely@redhat.com>
904
905 * include/bits/ios_base.h (ios::Init::Init(const Init&))
906 (ios::Init::operator=): Define as defaulted.
907 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
908 Likewise.
909 * include/bits/stream_iterator.h (istream_iterator::operator=)
910 (ostream_iterator::operator=): Likewise.
911 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
912 Likewise.
913 * include/std/bitset (bitset::reference::reference(const reference&)):
914 Likewise.
915 * include/std/complex (complex<float>::complex(const complex&))
916 (complex<double>::complex(const complex&))
917 (complex<long double>::complex(const complex&)): Likewise.
918
c962b2c3
JW
9192018-06-07 Jonathan Wakely <jwakely@redhat.com>
920
921 * include/bits/regex.h (sub_match): Add noexcept to default
922 constructor and length observer.
923 (match_results): Add noexcept to default constructor and observers
924 with no preconditions. Define destructor as defaulted.
925 (operator==, operator!=, swap): Add noexcept.
926 (regex_iterator): Add default member initializers and define default
927 constructor and destructor as defaulted. Add noexcept to equality
928 and dereference operators.
929
7a205f50
FD
9302018-06-07 François Dumont <fdumont@gcc.gnu.org>
931
932 * src/c++11/debug.cc
933 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
934 (_Safe_iterator_base::_M_detach_single()): Likewise.
935 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
936 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
937
9d67f13e
JW
9382018-06-06 Jonathan Wakely <jwakely@redhat.com>
939
940 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
941 move of const value.
942
fe16acf2
JJ
9432018-06-06 Jakub Jelinek <jakub@redhat.com>
944
945 PR c++/86068
946 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
947 rather than __cpp_transactional_memory >= 201505L.
948
7db54ccd
JW
9492018-06-06 Jonathan Wakely <jwakely@redhat.com>
950
951 PR libstdc++/86008
952 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
953 Define new partial specialization.
954 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
955 new overload.
956 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
957 value not reference for iteration.
958 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
959 comment.
960 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
961 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
962 comment.
963
ce6efef8
JW
9642018-06-05 Jonathan Wakely <jwakely@redhat.com>
965
d4b695e4
JW
966 * include/std/type_traits: Fix comment typos.
967
ce6efef8
JW
968 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
969 mingw* targets.
970 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
971 * testsuite/experimental/filesystem/operations/read_symlink.cc:
972 Likewise.
973
d31238cf
FD
9742018-06-05 François Dumont <fdumont@gcc.gnu.org>
975
976 * include/bits/stl_tempbuf.h
977 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
978 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
979 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
980 * include/bits/stl_algo.h (__stable_partition): Adapt.
981 (__inplace_merge): Adapt.
982 (__stable_sort): Adapt.
983
dbda636d
JW
9842018-06-04 Jonathan Wakely <jwakely@redhat.com>
985
d552d819
JW
986 PR libstdc++/85930
987 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
988 unconditionally. Remove redundant declaration.
989 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
990 alignment-specifier.
991
389f7757
JW
992 * include/bits/postypes.h (fpos): Define special members as defaulted.
993
dbda636d
JW
994 PR libstdc++/85930
995 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
996 the static variable correctly.
997
9534a5e6
JW
9982018-05-24 Jonathan Wakely <jwakely@redhat.com>
999
1000 PR libstdc++/78870 support std::filesystem on Windows
1001 * config.h.in: Regenerate.
1002 * configure: Regenerate.
1003 * configure.ac: Check for link, readlink and symlink.
1004 * include/bits/fs_path.h (path::operator/=(const path&)): Move
1005 definition out of class body.
1006 (path::is_absolute(), path::_M_append(path)): Likewise.
1007 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
1008 (operator>>(basic_istream, path&)): Likewise.
1009 (u8path): Reorder definitions and fix Windows implementation.
1010 (path::is_absolute()): Define inline and fix for Windows.
1011 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1012 Define POSIX version inline.
1013 (path::_M_append(path)): Define inline.
1014 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
1015 definition out of class body.
1016 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
1017 escape characters.
1018 (operator>>(basic_istream, path&)): Likewise.
1019 (path::is_absolute()): Define inline and fix for Windows.
1020 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
1021 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
1022 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
1023 Define as adaptors for Windows functions/types or as
1024 using-declarations for POSIX functions/types.
1025 (_Dir_base, get_file_type): Qualify names to use declarations from
1026 __gnu_posix namespace.
1027 (_Dir_base::is_dor_or_dotdot): New helper functions.
1028 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
1029 names to use declarations from __gnu_posix namespace.
1030 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
1031 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
1032 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
1033 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
1034 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
1035 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
1036 Define as adaptors for Windows functions/types or as
1037 using-declarations for POSIX functions/types.
1038 (stat_type, do_copy_file): Qualify names to use declarations from
1039 __gnu_posix namespace.
1040 (do_space): Declare new function.
1041 (make_file_type): Only use S_ISLNK if defined.
1042 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
1043 path::value_type not char.
1044 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1045 names to use declarations from __gnu_posix namespace.
1046 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1047 add implementation for Windows.
1048 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1049 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1050 [!_PC_PATH_MAX]: Don't use pathconf.
1051 [PATH_MAX]: Use if defined.
1052 (filesystem::current_path(const path&, error_code&))
1053 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1054 (filesystem::last_write_time, filesystem::permissions): Use names
1055 from __gnu_posix.
1056 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1057 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1058 implementation for Windows.
1059 (filesystem::rename, filesystem::resize_file): Use names from
1060 __gnu_posix.
1061 (filesystem::space): Use do_space.
1062 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
1063 (filesystem::status, filesystem::symlink_status): Use names from
1064 __gnu_posix.
1065 (filesystem::temp_directory_path): Add implementation for Windows.
1066 * src/filesystem/path.cc (dot): Define constant.
1067 (path::replace_extension): Use dot.
1068 (path::_M_find_extension): Likewise. Use path::string_type not
1069 std::string.
1070 (path::_M_split_cmpts): Use dot.
1071 (filesystem_error::_M_get_what): Use u8string() not native().
1072 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
1073 Qualify names to use declarations from __gnu_posix namespace.
1074 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
1075 correct error_code.
1076 (filesystem::absolute(const path&, error_code&)): Add implementation
1077 for Windows.
1078 (char_ptr, filesystem::canonical): Use path::value_type not char.
1079 (do_copy_file): Use names from __gnu_posix.
1080 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
1081 sendfile.
1082 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1083 names to use declarations from __gnu_posix namespace.
1084 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1085 add implementation for Windows.
1086 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1087 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1088 [!_PC_PATH_MAX]: Don't use pathconf.
1089 [PATH_MAX]: Use if defined.
1090 (filesystem::current_path(const path&, error_code&))
1091 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1092 (filesystem::last_write_time, filesystem::permissions): Use names
1093 from __gnu_posix.
1094 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1095 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1096 implementation for Windows.
1097 (filesystem::rename, filesystem::resize_file): Use names from
1098 __gnu_posix.
1099 (do_space): Define.
1100 (filesystem::space): Use do_space.
1101 (filesystem::status, filesystem::symlink_status): Use names from
1102 __gnu_posix.
1103 (filesystem::temp_directory_path): Add implementation for Windows.
1104 * src/filesystem/std-path.cc
1105 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1106 Define for Windows.
1107 (dot): Define constant.
1108 (path::replace_extension, is_dot): Use dot.
1109 (path::lexically_normal): Check _M_type instead of calling
1110 non-existent function.
1111 (path::_M_find_extension): Use dot. Use path::string_type not
1112 std::string.
1113 (path::_M_split_cmpts): Use dot.
1114 (filesystem_error::_M_get_what): Use u8string() not native().
1115 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
1116 use symlinks.
1117 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1118 Likewise.
1119 * testsuite/27_io/filesystem/operations/absolute.cc: Use
1120 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
1121 * testsuite/27_io/filesystem/operations/canonical.cc: Use
1122 path::string() to get narrow string, not path::native().
1123 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
1124 with std::filesystem::path not std::basic_string.
1125 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1126 * testsuite/27_io/filesystem/operations/exists.cc: Use
1127 __gnu_test::root_path() instead of "/".
1128 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
1129 fstreams with std::filesystem::path not std::basic_string.
1130 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
1131 path::string() to get narrow string.
1132 * testsuite/27_io/filesystem/operations/space.cc: Check results for
1133 errors, expect sensible values otherwise.
1134 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
1135 helpers for adjusting the environment on Windows.
1136 * testsuite/27_io/filesystem/path/append/path.cc: Test
1137 Windows-specific behaviour.
1138 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
1139 of path::string_type objects.
1140 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
1141 string to wide string on Windows.
1142 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
1143 for backslash as root-directory.
1144 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
1145 path::string() to get narrow string.
1146 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
1147 paths.
1148 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
1149 not std::string.
1150 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
1151 different definintion of absolute paths on Windows.
1152 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1153 Do not use symlinks.
1154 * testsuite/experimental/filesystem/operations/absolute.cc: Test
1155 Windows behaviour.
1156 * testsuite/experimental/filesystem/operations/copy.cc: Construct
1157 fstreams with NTCTS not std::basic_string.
1158 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1159 * testsuite/experimental/filesystem/operations/exists.cc: Use
1160 __gnu_test::root_path() instead of "/".
1161 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
1162 fstreams with NTCTS not std::basic_string.
1163 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1164 Use path::string() to get narrow string.
1165 * testsuite/experimental/filesystem/operations/space.cc: Use
1166 __gnu_test::root_path() instead of "/".
1167 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1168 Add helpers for adjusting the environment on Windows.
1169 * testsuite/experimental/filesystem/path/append/path.cc: Use
1170 path::string() to get narrow strings for comparisons.
1171 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1172 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1173 Likewise.
1174 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1175 * testsuite/experimental/filesystem/path/native/string.cc: Use
1176 string_type not std::string.
1177 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
1178 Adjust for different definintion of absolute paths on Windows.
1179 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
1180 function.
1181 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
1182 std::basic_string.
1183
22f1f4c7
JW
11842018-05-31 Jonathan Wakely <jwakely@redhat.com>
1185
1186 PR libstdc++/85951
1187 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
1188 uint_least16_t and uint_least32_t.
1189 (__make_unsigned<wchar_t>): Define unconditionally.
1190 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
1191 typedefs.
1192 (__make_unsigned_selector_base): New type to provide helper templates.
1193 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
1194 __make_unsigned_selector_base helpers.
1195 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
1196 (__make_signed_selector<_Tp, true, false>): Remove intermediate
1197 typedefs.
1198 (__make_signed<wchar_t>, __make_signed<char16_t>)
1199 (__make_signed<char32_t>)): Define unconditionally.
1200 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
1201 wchar_t, char16_t and char32_t are transformed correctly.
1202 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
1203 dg-error lineno.
1204 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
1205 wchar_t, char16_t and char32_t are transformed correctly.
1206 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
1207 dg-error lineno.
1208
5baa6f8e
JW
12092018-05-29 Jonathan Wakely <jwakely@redhat.com>
1210
1211 * include/std/variant (__erased_dtor): Qualify call to __get.
1212
538a7cd0
FD
12132018-05-27 François Dumont <fdumont@gcc.gnu.org>
1214
1215 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
1216 (_Rb_tree(const allocator_type&)): Use latter.
1217 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
1218 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
1219 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1220 * include/bits/stl_multimap.h
1221 (multimap(const allocator_type&)): Likewise.
1222 (multimap(initializer_list<value_type>, const allocator_type&)):
1223 Likewise.
1224 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
1225 Likewise.
1226 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
1227 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
1228 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1229 * include/bits/stl_multiset.h
1230 (multiset(const allocator_type&)): Likewise.
1231 (multiset(initializer_list<value_type>, const allocator_type&)):
1232 Likewise.
1233 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
1234 Likewise.
1235
18b11937
FD
12362018-05-25 François Dumont <fdumont@gcc.gnu.org>
1237
1238 PR libstdc++/85768
1239 * src/c++11/debug.cc: Remove backtrace usage.
1240
95c921d1
MR
12412018-05-24 Maya Rashish <coypu@sdf.org>
1242
1243 PR target/85904
1244 * crossconfig.m4: Test for aligned_alloc on netbsd.
1245 * configure: Regenerate.
1246
25999a11
JW
12472018-05-24 Jonathan Wakely <jwakely@redhat.com>
1248
1249 PR libstdc++/69769
1250 PR libstdc++/85886
1251 * include/bits/atomic_base.h (__atomic_base::value_type)
1252 (__atomic_base::difference_type): Add new typedefs.
1253 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
1254 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
1255 (atomic<T*>::operator++, atomic<T*>::operator--)
1256 (atomic<T*>::operator+=, atomic<T*>::operator-=)
1257 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
1258 to enforce C++17 requirement on pointer arithmetic.
1259 (__atomic_val_t, __atomic_diff_t): New alias templates.
1260 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
1261 (atomic_compare_exchange_weak_explicit)
1262 (atomic_compare_exchange_strong_explicit, atomic_store)
1263 (atomic_exchange, atomic_compare_exchange_weak)
1264 (atomic_compare_exchange_strong): Use __atomic_val_t to make
1265 scalar parameters be non-deduced contexts.
1266 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1267 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
1268 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
1269 parameters.
1270 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
1271 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
1272 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
1273 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1274 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
1275 address types.
1276 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
1277 * testsuite/29_atomics/atomic/69769.cc: New test.
1278 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
1279 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
1280 Disable test for C++17 and later.
1281 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
1282 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
1283 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
1284 test.
1285
cf290ea3
JW
12862018-05-23 Jonathan Wakely <jwakely@redhat.com>
1287
49d729ea
JW
1288 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
1289 template to alias template.
1290 (path::__value_type_is_char): Use remove_const_t.
1291 (path:_S_string_from_iter): New helper function.
1292 (path::_S_convert(InputIter, __null_terminated))
1293 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1294 Use _S_string_from_iter.
1295 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
1296 rep for COW strings.
1297 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1298 Change from class template to alias template.
1299 (path::__value_type_is_char): Use remove_const.
1300 (path:_S_string_from_iter): New helper function.
1301 (path::_S_convert(InputIter, __null_terminated))
1302 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1303 Use _S_string_from_iter.
1304 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
1305 wide strings.
1306 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
1307 string equality, not path equivalence.
1308 * testsuite/27_io/filesystem/path/construct/format.cc: Check
1309 construction from std::string and std::wstring and input iterators.
1310 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
1311 construction from iterators.
1312 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1313 exact string equality, not path equivalence.
1314 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1315 construction from iterators.
1316
cf290ea3
JW
1317 * include/bits/fs_path.h (path::_M_type): Change default member
1318 initializer to _Filename.
1319 (path::begin): Create past-the-end iterator for empty path.
1320 * src/filesystem/std-path.cc (path::remove_filename()): Remove
1321 debugging check.
1322 (path::has_relative_path()): Return false for empty filenames.
1323 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1324 Fix offset of empty final component.
1325 * testsuite/27_io/filesystem/path/itr/components.cc: New.
1326 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1327
b0292359
JW
13282018-05-21 Jonathan Wakely <jwakely@redhat.com>
1329
1330 Add support for opening file streams from wide character strings.
1331 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1332 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1333 Define new overload.
1334 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1335 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1336 Declare new overload.
1337 * configure.ac: Check for _wfopen.
1338 * crossconfig.m4: Likewise.
1339 * configure: Regenerate.
1340 * config.h.in: Regenerate.
1341 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1342 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1343 Define new overload.
1344 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1345 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1346 Declare new overload.
1347 [_GLIBCXX_HAVE__WFOPEN]
1348 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1349 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1350 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1351 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1352 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1353 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1354 new overloads.
1355 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1356 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1357 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1358 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1359 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1360 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1361 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1362
8b6d2d3b
FD
13632018-05-21 François Dumont <fdumont@gcc.gnu.org>
1364
1365 PR libstdc++/85845
1366 * include/bits/stl_tree.h
1367 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1368 qualification.
1369
f5a9710a
JW
13702018-05-21 Jonathan Wakely <jwakely@redhat.com>
1371
8a49324e
JW
1372 * src/filesystem/std-ops.cc (absolute): Report an error for empty
1373 paths.
1374 (weakly_canonical(const path&)): Do not call canonical on empty path.
1375 (weakly_canonical(const path&, error_code&)): Likewise.
1376 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1377
cc343938
JW
1378 PR libstdc++/85818
1379 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1380 dg-require-filesystem-ts.
1381
f5a9710a
JW
1382 PR libstdc++/85843
1383 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1384 initialize base class to avoid warnings.
1385
a76400f4
JW
13862018-05-19 Jonathan Wakely <jwakely@redhat.com>
1387
1388 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1389 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1390 little_endian element in bitmask.
1391 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1392 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1393
8b0cd47a
FD
13942018-05-18 François Dumont <fdumont@gcc.gnu.org>
1395
1396 * include/bits/stl_tree.h
1397 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1398 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1399 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1400 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1401 * include/debug/map.h
1402 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1403 * include/debug/multimap.h
1404 (multimap(multimap&&, const_allocator_type&)): Likewise.
1405 * include/debug/set.h
1406 (set(set&&, const_allocator_type&)): Likewise.
1407 * include/debug/multiset.h
1408 (multiset(multiset&&, const_allocator_type&)): Likewise.
1409 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1410 Add checks.
1411 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1412 Add checks.
1413 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1414 Add checks.
1415 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1416 Add checks.
1417 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1418 Add checks.
1419 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1420 Add checks.
1421 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1422 Add checks.
1423 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1424 Add checks.
1425
f07c2237
JM
14262018-05-18 Jason Merrill <jason@redhat.com>
1427
1428 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1429 for conversion to const_iterator. Add defaulted copy ops.
1430 * libsupc++/new (bad_alloc): Add defaulted copy ops.
1431 * libsupc++/exception.h (exception): Add defaulted copy ops.
1432 * include/std/system_error (system_error): Add defaulted copy ops.
1433 * include/std/stdexcept (domain_error, invalid_argument)
1434 (length_error, out_of_range, range_error, overflow_error)
1435 (underflow_error): Add defaulted copy ops.
1436 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1437 copy assignment.
1438 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1439 * include/ext/throw_allocator.h (condition_base): Add defaulted
1440 default and copy ctor and copy assignment.
1441
2d76fab4
JW
14422018-05-18 Jonathan Wakely <jwakely@redhat.com>
1443
1444 PR libstdc++/85098
1445 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1446 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1447 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1448 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1449 definitions.
1450 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1451 whitespace.
1452 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1453 braces around body of do-while.
1454 * testsuite/28_regex/basic_regex/85098.cc: New
1455
ff03245e
JW
14562018-05-17 Jonathan Wakely <jwakely@redhat.com>
1457
079638f9
JW
1458 PR libstdc++/85818
1459 * src/filesystem/path.cc (path::preferred_separator): Add used
1460 attribute.
1461 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1462
ff03245e
JW
1463 PR libstdc++/85812
1464 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1465 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1466 Refactor to separate non-throwing and throwing implementations.
1467 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1468 if constructing the object throws.
1469
e4a5135f
JW
14702018-05-15 Jonathan Wakely <jwakely@redhat.com>
1471
5a7960da
JW
1472 PR libstdc++/85749
1473 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1474 (linear_congruential_engine, mersenne_twister_engine)
1475 (subtract_with_carry_engine, discard_block_engine)
1476 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1477 constrain function templates taking seed sequences.
1478 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1479 (mersenne_twister_engine::seed(_Sseq&))
1480 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1481 match declarations.
1482 * include/ext/random (simd_fast_mersenne_twister_engine): Use
1483 __is_seed_seq to constrain function templates taking seed sequences.
1484 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1485 Change return type to match declaration.
1486 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1487 New.
1488 * testsuite/26_numerics/random/independent_bits_engine/cons/
1489 seed_seq2.cc: New.
1490 * testsuite/26_numerics/random/linear_congruential_engine/cons/
1491 seed_seq2.cc: New.
1492 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1493 seed_seq2.cc: New.
1494 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1495 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1496 New.
1497 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1498 seed_seq2.cc: New.
1499 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1500 seed_seq2.cc: New.
1501
c3b61fda
JW
1502 PR libstdc++/83891
1503 * include/bits/fs_path.h (path::is_absolute()): Use same definition
1504 for all operating systems.
1505 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1506 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1507 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1508 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1509
b0e01682
JW
1510 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1511 unused <vector> header.
1512 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1513 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1514 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1515 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1516 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1517 Likewise.
1518 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1519 Likewise.
1520 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1521 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1522 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1523 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1524 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1525 Likewise.
1526 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1527 * testsuite/experimental/filesystem/path/query/has_extension.cc:
1528 Likewise.
1529 * testsuite/experimental/filesystem/path/query/has_filename.cc:
1530 Likewise.
1531 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1532 Likewise.
1533 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1534 Likewise.
1535 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1536 Likewise.
1537 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1538 Likewise.
1539 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1540 Likewise.
1541 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1542 * testsuite/experimental/filesystem/path/query/is_relative.cc:
1543 Likewise.
1544
6cda876d
JW
1545 PR libstdc++/84159
1546 * include/bits/fs_path.h (path::operator/=, path::append): Construct
1547 temporary path before calling _M_append.
1548 (path::_M_append): Change parameter to path and implement C++17
1549 semantics.
1550 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1551 and more examples from the standard.
1552 * testsuite/27_io/filesystem/path/append/source.cc: New.
1553 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1554 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1555
e4a5135f
JW
1556 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1557 __invoke to prevent ADL.
1558
3846b8e4
JW
15592018-05-14 Jonathan Wakely <jwakely@redhat.com>
1560
e77497ab
JW
1561 PR libstdc++/81256
1562 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1563 exceptions from _M_terminate_output().
1564 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1565 exceptions from close().
1566 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1567
cd2f262b
JW
1568 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1569 (__valarray_get_storage): Call operator new directly. Remove ignored
1570 top-level restrict qualifier and add malloc attribute instead.
1571 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1572
6bfbebb0
JW
1573 PR libstdc++/67554
1574 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1575 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1576
3846b8e4
JW
1577 PR libstdc++/82966
1578 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1579 instead of type.
1580 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1581
456dbc72
VV
15822018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
1583
1584 PR libstdc++/80165
1585 * testsuite/20_util/variant/80165.cc: New.
1586
0f8a1c15
JW
15872018-05-10 Jonathan Wakely <jwakely@redhat.com>
1588
1589 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1590 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1591 of C++11 containers with Debug Mode support.
1592 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1593 * doc/html/*: Regenerate.
1594
a6e1cfdd
JM
15952018-05-10 Jason Merrill <jason@redhat.com>
1596
1597 * include/bits/regex_compiler.h (_S_cache_size): Change from
1598 function to variable.
1599
88bf4c34
ESR
16002018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
1601
1602 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1603 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1604 argument defaulted to +1. Doxy comments on same.
1605 * testsuite/special_functions/02_assoc_legendre/
3a2e98ce 1606 check_value.cc: Regen.
88bf4c34 1607 * testsuite/tr1/5_numerical_facilities/special_functions/
3a2e98ce 1608 02_assoc_legendre/check_value.cc: Regen.
88bf4c34 1609
daf69489
JW
16102018-05-10 Jonathan Wakely <jwakely@redhat.com>
1611
1612 PR libstdc++/85729
1613 * include/bits/c++config.h (__replacement_assert): Add linkage
1614 specification.
1615 * include/bits/std_abs.h: Add comment to closing brace of block.
1616 * include/c_global/cstddef: Add linkage specification.
1617 * include/c_global/cstring: Likewise.
1618 * include/c_global/cwchar: Likewise.
1619
6c882d0f
FD
16202018-05-09 François Dumont <fdumont@gcc.gnu.org>
1621
1622 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1623 Rename in...
1624 (_Safe_iterator<>::_S_constant()): ...that.
1625 * include/debug/safe_local_iterator.h
1626 (_Safe_local_iterator<>::_M_constant()): Rename in...
1627 (_Safe_local_iterator<>::_S_constant()): ...that.
1628 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1629 (_Iterator_state::__rbegin): New.
1630 (_Iterator_state::__rmiddle): New.
1631 (_Iterator_state::__rend): New.
1632 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1633 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1634 iterator type.
1635 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1636 _Is_iterator)): Likewise.
1637 (_Parameter::_S_reverse_state(_Iterator_state)): New.
0f8a1c15 1638 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
6c882d0f
FD
1639 _Is_iterator)): New.
1640 (_Parameter(std::reverse_iterator<> const&, const char*,
1641 _Is_iterator)): New.
1642 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1643 const char*, _Is_iterator)): New.
1644 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1645 New.
1646 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1647 _Is_iterator)): New.
1648 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1649 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1650 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1651
88b1e41c
JW
16522018-05-09 Jonathan Wakely <jwakely@redhat.com>
1653
1654 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1655 Use constexpr if in C++17 mode.
1656 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1657 Copy from const object.
1658 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1659
a5277405
FD
16602018-05-08 François Dumont <fdumont@gcc.gnu.org>
1661
e95a74fd
FD
1662 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1663 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1664 backtrace.
1665
90aabc7e
FD
1666 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1667 * include/debug/functions.h (__check_valid_range): Use latter.
1668 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1669 use latter.
1670 * include/debug/deque
1671 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1672 * include/debug/forward_list
1673 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1674 Likewise.
1675 * include/debug/list
1676 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1677 * include/debug/list
1678 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1679 * include/debug/map.h
1680 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1681 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1682 Likewise.
1683 * include/debug/multimap.h
1684 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1685 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1686 const _Alloc&)): Likewise.
1687 * include/debug/set.h
1688 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1689 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1690 Likewise.
1691 * include/debug/multiset.h
1692 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1693 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1694 const _Alloc&)): Likewise.
1695 * include/debug/string
1696 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1697 Likewise.
1698 * include/debug/unordered_map
1699 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1700 Likewise.
1701 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1702 const _Alloc&)): Likewise.
1703 * include/debug/unordered_set
1704 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1705 Likewise.
1706 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1707 const _Alloc&)): Likewise.
1708 * include/debug/vector
1709 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1710
a5277405
FD
1711 * include/debug/formatter.h (_Error_formatter::_M_function): New.
1712 (_Error_formatter(const char*, unsigned int)): Adapt.
1713 (_Error_formatter::_M_at): Rename in...
1714 (_Error_formatter::_S_at): ...that and adapt.
1715 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1716 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1717 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1718 when available.
1719
41c3db9f
JW
17202018-05-08 Jonathan Wakely <jwakely@redhat.com>
1721
ec332f1b
JW
1722 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1723 Use normal std::vector even in Debug Mode.
1724
41c3db9f
JW
1725 PR libstdc++/85672
1726 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1727 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1728 * include/Makefile.in: Regenerate.
1729 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1730 within conditional block.
1731
a989f637
JW
17322018-05-07 Jonathan Wakely <jwakely@redhat.com>
1733
b83f5981
JW
1734 * doc/xml/manual/using.xml (table.cmd_options): Document that the
1735 C++17 Filesystem implementation also needs -lstdc++fs.
1736
a989f637
JW
1737 PR libstdc++/85671
1738 * include/bits/fs_path.h (operator/): Permit copy elision.
1739 * include/experimental/bits/fs_path.h (operator/): Likewise.
1740
228aa0ec
ESR
17412018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
1742
1743 Moar PR libstdc++/80506
1744 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1745 Fix magic number used in loop condition.
1746
d6ed6b07
JW
17472018-05-04 Jonathan Wakely <jwakely@redhat.com>
1748
1749 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1750 * include/std/optional (_Optional_payload): Add noexcept to default
1751 constructor. Re-indent.
1752 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1753 constructor for copying disengaged payloads.
1754 (_Optional_payload<_Tp, true, false, true>): Likewise.
1755 (_Optional_payload<_Tp, true, true, false>): Likewise.
1756 (_Optional_payload<_Tp, true, false, false>): Likewise.
1757 * testsuite/20_util/optional/cons/85642.cc: New.
1758 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1759
6791489e
JW
17602018-05-03 Jonathan Wakely <jwakely@redhat.com>
1761
86f66562
JW
1762 PR libstdc++/82644
1763 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1764 inline definitions instead of using-declarations.
1765 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1766 * testsuite/tr1/5_numerical_facilities/special_functions/
1767 07_conf_hyperg/compile_cxx17.cc: New.
1768 * testsuite/tr1/5_numerical_facilities/special_functions/
1769 17_hyperg/compile_cxx17.cc: New.
1770
1ee021f2
JW
1771 PR libstdc++/84769
1772 * include/std/variant (visit): Qualify std::get call.
1773
2e023647
JW
1774 PR libstdc++/85632 use uintmax_t for arithmetic
1775 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1776 arithmetic in result type.
1777 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1778 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1779 is greater than free space.
1780 * testsuite/experimental/filesystem/operations/space.cc: New.
1781
adba76a3
JW
1782 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1783 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1784 New.
1785 * testsuite/20_util/remove_cvref/value.cc: New.
1786 * testsuite/20_util/remove_cvref/value_ext.cc: New.
1787
852ee53c
JW
1788 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1789 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1790 (append(const basic_string&, size_type, size_type)
1791 (assign(const basic_string&, size_type, size_type)
1792 (insert(size_type, const basic_string&, size_type, size_type)
1793 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1794 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1795 Add default arguments (LWG 2268).
1796 [_GLIBCXX_USE_CXX11_ABI=0]
1797 (append(const basic_string&, size_type, size_type)
1798 (assign(const basic_string&, size_type, size_type)
1799 (insert(size_type, const basic_string&, size_type, size_type)
1800 (replace(size_type,size_type,const basic_string&,size_type,size_type)
1801 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1802 Likewise.
1803 * testsuite/21_strings/basic_string/dr2268.cc: New test.
1804
d49b3426
JW
1805 PR libstdc++/84535
1806 * include/std/thread (thread::__not_same): New SFINAE helper.
1807 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1808 first argument is not a std::thread. Add static assertion to check
1809 INVOKE expression is valid.
1810 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1811 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1812 __invoke_result for return types and remove exception specifications.
1813 * testsuite/30_threads/thread/cons/84535.cc: New.
1814
9e3ef542
JW
1815 * include/std/future (__async_result_of): Use __invoke_result instead
1816 of result_of.
1817
6791489e
JW
1818 * include/std/any (any_cast): Use __remove_cvref_t.
1819 * include/std/tuple (__make_tuple): Likewise.
1820 * include/std/type_traits (__remove_cvref_t): Define.
1821 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1822 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1823 * include/std/variant (__erased_hash): Use __remove_cvref_t.
1824
27db01d8
FD
18252018-05-02 François Dumont <fdumont@gcc.gnu.org>
1826
1827 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1828 ensure overloaded comma not used.
1829 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1830 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1831 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1832 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1833 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1834 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1835 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1836
c6d42579
JW
18372018-05-02 Jonathan Wakely <jwakely@redhat.com>
1838
85d0fad4
JW
1839 PR libstdc++/68197
1840 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1841 indices to unsigned.
1842 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1843 as failure. Refactor error handling.
1844 * testsuite/27_io/ios_base/storage/68197.cc: New.
1845
1b749ae9
JW
1846 PR libstdc++/57997
1847 PR libstdc++/83860
1848 * include/bits/gslice_array.h (gslice_array): Define default
1849 constructor as deleted, as per C++11 standard.
1850 * include/bits/mask_array.h (mask_array): Likewise.
1851 * include/bits/slice_array.h (slice_array): Likewise.
1852 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1853 to namespace __detail.
1854 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1855 members.
1856 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1857 of data members in closure objects.
1858 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1859 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1860 __detail.
1861 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1862 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1863 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1864 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1865 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1866 using-declarations to namespace std.
1867 * testsuite/26_numerics/valarray/83860.cc: New.
1868
59bcf900
JW
1869 * testsuite/backward/strstream_move.cc: Remove duplicate function
1870 call.
1871
c6d42579
JW
1872 PR libstdc++/69608
1873 * include/backward/strstream (strstreambuf): Define move constructor
1874 and move assignment operator.
1875 (istrstream, ostrstream, strstream): Likewise.
1876 * testsuite/backward/strstream_move.cc: New.
1877
f421e442
TMQMF
18782018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
1879
1880 PR libstdc++/84654
1881 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1882 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1883 * configure: Regenerate.
1884 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1885 based on ENABLE_FLOAT128.
1886 * include/Makefile.in: Regenerate.
1887 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1888 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1889 _GLIBCXX_USE_FLOAT128.
1890
7b47ecf2
L
18912018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1892
1893 * configure: Regenerated.
1894
a0e1df88
JJ
18952018-04-19 Jakub Jelinek <jakub@redhat.com>
1896
1897 * configure: Regenerated.
1898
05b14480
JW
18992018-04-18 Jonathan Wakely <jwakely@redhat.com>
1900 Jakub Jelinek <jakub@redhat.com>
1901
1902 PR libstdc++/85442
1903 * src/c++11/Makefile.am: Don't generate debuginfo again for
1904 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1905 * src/c++11/Makefile.in: Regenerate.
1906
8cc8789f
JW
19072018-04-18 Jonathan Wakely <jwakely@redhat.com>
1908
1909 PR libstdc++/84442
1910 * testsuite/30_threads/thread/cons/terminate.cc
1911 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1912
001ddaa8
DM
19132018-04-18 David Malcolm <dmalcolm@redhat.com>
1914
1915 PR jit/85384
1916 * configure: Regenerate.
1917
ef0e80d2
JW
19182018-04-16 Jonathan Wakely <jwakely@redhat.com>
1919
1920 * testsuite/experimental/filesystem/file_status/1.cc: Add
1921 -DUSE_FILESYSTEM_TS to dg-options.
1922 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1923 Likewise.
1924 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1925 * testsuite/experimental/filesystem/iterators/
1926 recursive_directory_iterator.cc: Likewise.
1927 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
1928 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1929 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1930 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1931 * testsuite/experimental/filesystem/operations/create_directories.cc:
1932 Likewise.
1933 * testsuite/experimental/filesystem/operations/create_directory.cc:
1934 Likewise.
1935 * testsuite/experimental/filesystem/operations/create_symlink.cc:
1936 Likewise.
1937 * testsuite/experimental/filesystem/operations/current_path.cc:
1938 Likewise.
1939 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1940 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1941 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1942 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1943 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1944 Likewise.
1945 * testsuite/experimental/filesystem/operations/permissions.cc:
1946 Likewise.
1947 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1948 Likewise.
1949 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1950 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1951 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1952 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1953 Likewise.
1954 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1955 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1956 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1957 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1958 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1959 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1960 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1961 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1962 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1963 * testsuite/experimental/filesystem/path/construct/default.cc:
1964 Likewise.
1965 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1966 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1967 * testsuite/experimental/filesystem/path/construct/string_view.cc:
1968 Likewise.
1969 * testsuite/experimental/filesystem/path/decompose/extension.cc:
1970 Likewise.
1971 * testsuite/experimental/filesystem/path/decompose/filename.cc:
1972 Likewise.
1973 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1974 Likewise.
1975 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1976 Likewise.
1977 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1978 Likewise.
1979 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1980 Likewise.
1981 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1982 Likewise.
1983 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1984 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1985 Likewise.
1986 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1987 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1988 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1989 Likewise.
1990 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1991 Likewise.
1992 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1993 Likewise.
1994 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1995 Likewise.
1996 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1997 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1998 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1999 Likewise.
2000 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2001 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2002 Likewise.
2003 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2004 Likewise.
2005 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2006 Likewise.
2007 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2008 Likewise.
2009 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2010 Likewise.
2011 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2012 Likewise.
2013 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2014 Likewise.
2015 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2016 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2017 Likewise.
2018
06258a7f
JW
20192018-04-13 Jonathan Wakely <jwakely@redhat.com>
2020
272277dc
JW
2021 * src/c++11/Makefile.am: Fix sed command.
2022 * src/c++11/Makefile.in: Regenerate.
2023
06258a7f
JW
2024 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
2025 handle mangled names starting with double underscores on darwin.
2026 * src/c++11/Makefile.in: Regenerate.
2027
ee3e8f43
JW
20282018-04-12 Jonathan Wakely <jwakely@redhat.com>
2029
741346a2
JW
2030 * src/c++11/Makefile.am: Fix comment.
2031 * src/c++11/Makefile.in: Regenerate.
2032 * src/c++11/cxx11-ios_failure.cc: Fix comment.
2033 * src/c++98/ios_failure.cc: Likewise.
2034
ee3e8f43
JW
2035 * src/c++11/ios.cc: Remove redundant macro definition.
2036
52556a87
JW
20372018-04-11 Jonathan Wakely <jwakely@redhat.com>
2038
2039 * doc/xml/manual/abi.xml: Document header locations in recent
2040 releases.
2041 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
2042 * doc/xml/manual/spine.xml: Update copyright years.
2043 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
2044 undefined behaviour.
2045 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
2046 * doc/html/*: Regenerate.
2047
5f302518
JW
20482018-04-10 Jonathan Wakely <jwakely@redhat.com>
2049
25949ee3
JW
2050 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
2051 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2052 * doc/xml/manual/containers.xml: Likewise.
2053 * doc/xml/manual/debug_mode.xml: Likewise.
2054 * doc/xml/manual/extensions.xml: Likewise.
2055 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
2056 * doc/xml/manual/using.xml: Likewise.
2057 * doc/xml/manual/utilities.xml: Likewise.
2058
5f302518
JW
2059 PR libstdc++/85222
2060 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
2061 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
2062 * src/c++11/Makefile.in: Regenerate.
2063 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
2064 New types.
2065 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2066 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
2067 * src/c++98/ios_failure.cc (__construct_ios_failure)
2068 (__destroy_ios_failure, is_ios_failure_handler): New functions.
2069 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2070 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
2071 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
2072 handler types, to always catch std::ios_base::failure.
2073 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
2074 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
2075 exceptions_failbit.cc: Likewise.
2076 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
2077 exceptions_failbit.cc: Likewise.
2078 * testsuite/27_io/basic_istream/extractors_other/char/
2079 exceptions_null.cc: Likewise.
2080 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
2081 exceptions_null.cc: Likewise.
2082 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
2083 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
2084 * testsuite/27_io/basic_ostream/inserters_other/char/
2085 exceptions_null.cc: Likewise.
2086 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
2087 exceptions_null.cc: Likewise.
2088 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
2089
970d3d90
JW
20902018-04-05 Jonathan Wakely <jwakely@redhat.com>
2091
2092 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
2093 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
2094
c73847e7
JW
20952018-04-03 Jonathan Wakely <jwakely@redhat.com>
2096
2097 PR libstdc++/85183
2098 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
2099 value categories.
2100 * testsuite/20_util/variant/85183.cc: New.
2101
aafaa325
JW
21022018-03-26 Jonathan Wakely <jwakely@redhat.com>
2103
2104 * include/std/variant (__get): Qualify calls to avoid ADL.
2105 (__select_index): Adjust whitespace.
2106 (variant): Add using-declaration to workaround Clang bug.
2107
7c69a7d9
JW
21082018-03-22 Jonathan Wakely <jwakely@redhat.com>
2109
2110 PR libstdc++/85040
2111 * include/bits/stl_function.h (greater::__not_overloaded)
2112 (less::__not_overloaded, greater_equal::__not_overloaded)
2113 (less_equal::__not_overloaded): Fix ambiguous specializations.
2114 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
970d3d90 2115 tests for type with overloaded operators.
7c69a7d9 2116
83872062
RO
21172018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2118
2119 PR libstdc++/77691
2120 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2121 xfail execution on 32-bit Solaris/x86.
2122
5a0729f5
JW
21232018-03-21 Jonathan Wakely <jwakely@redhat.com>
2124
2125 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
2126 VERIFY instead of assert.
2127 * testsuite/20_util/hash/84998.cc: New test.
2128 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
2129 copy of test adjusted for Debug Mode.
2130 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
2131 test in Debug Mode.
2132
5dfb5e5b
FD
21332018-03-20 François Dumont <fdumont@gcc.gnu.org>
2134
2135 PR libstdc++/84998
2136 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
2137 * include/std/bitset: Likewise.
2138 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
2139 declaration.
2140 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
2141 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
2142 * include/bits/stl_set.h (std::set<>): Likewise.
2143 * include/bits/unordered_map.h (std::unordered_map<>): Fix
2144 _Hash_merge_helper friend declaration.
2145 (std::unordered_multimap<>): Likewise.
2146 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
2147 (std::unordered_multiset<>): Likewise.
2148
1de51fbc
GP
21492018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2150
8c00b6a4
GP
2151 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
2152 trailing slash for domain level link.
2153 * doc/xml/faq.xml: Ditto.
2154 * doc/xml/manual/appendix_free.xml (software): Ditto.
2155 * doc/xml/manual/intro.xml: Ditto.
2156 * doc/xml/manual/spine.xml: Ditto.
2157 * doc/xml/spine.xml: Ditto.
2158
5dfb5e5b
FD
21592018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2160
1de51fbc
GP
2161 * doc/xml/manual/documentation_hacking.xml: Adjust link to
2162 docbook.org.
2163
0fb9dc36
JW
21642018-03-17 Jonathan Wakely <jwakely@redhat.com>
2165
2166 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
2167 to compile as C++98.
2168
0b3ec8f4
JW
21692018-03-14 Jonathan Wakely <jwakely@redhat.com>
2170
2171 PR libstdc++/78420
2172 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
2173 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
2174 to ensure total order for pointers.
2175 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
2176 Add operator() overloads for pointer arguments and make generic
2177 overloads dispatch to new _S_cmp functions when comparisons would
2178 use built-in operators for pointers.
2179 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
2180
97ca95ac
JW
21812018-03-12 Jonathan Wakely <jwakely@redhat.com>
2182
2183 PR libstdc++/84773
2184 PR libstdc++/83662
2185 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
2186 * configure: Regenerate.
2187 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
2188 (aligned_alloc): Add using-declaration.
2189 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
2190
5da6b013
FD
21912018-03-09 François Dumont <fdumont@gcc.gnu.org>
2192
2193 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
2194 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
2195 registration.
2196
311735db
JW
21972018-03-09 Jonathan Wakely <jwakely@redhat.com>
2198
5dbbf899
JW
2199 PR libstdc++/84769
2200 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
2201 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
2202
311735db
JW
2203 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
2204 src/filesystem/std-ops.cc (create_dir): Likewise.
2205
fe6bd21a
FD
22062018-03-08 François Dumont <fdumont@gcc.gnu.org>
2207
2208 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
2209 (StdListIteratorPrinter): Inherit from latter.
2210 (StdFwdListIteratorPrinter): New, inherit from latter.
2211 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
2212 when iterator has no associated container.
2213 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
2214 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
2215 registrations.
2216 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
2217 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
2218
447346e4
VV
22192018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
2220
2221 PR libstdc++/84601
2222 * include/std/optional (_Optional_payload): Split into multiple
2223 specializations that can handle different cases of trivial or
2224 non-trivial assignment operators.
2225 * testsuite/20_util/optional/84601.cc: New.
2226 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2227
2f03003d
JW
22282018-03-02 Jonathan Wakely <jwakely@redhat.com>
2229
2230 PR libstdc++/84671
2231 * include/bits/parse_numbers.h (_Number_help): Add partial
2232 specialization to handle digit separators. Adjust partial
2233 specialization for recursion temrination to require _Pow == 1ULL.
2234 * testsuite/20_util/duration/literals/84671.cc: New
2235
23c3a059
VV
22362018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
2237
2238 Implement the missing bits of LWG 2769
2239 * include/std/any (any_cast(const any&)): Add static_assert.
2240 (any_cast(any&)): Likewise.
2241 (any_cast(any&&)): Likewise, and remove the handling
2242 for copyable-but-not-movable type.
2243 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
2244 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
2245 add new tests.
2246
cc535146
JW
22472018-02-23 Jonathan Wakely <jwakely@redhat.com>
2248
2249 PR libstdc++/84532
2250 * include/std/thread (thread::__make_invoker): Construct tuple
2251 directly instead of using make_tuple.
2252 * testsuite/30_threads/async/84532.cc: New.
2253 * testsuite/30_threads/thread/84532.cc: New.
2254
549b1796
FD
22552018-02-20 François Dumont <fdumont@gcc.gnu.org>
2256
2257 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
2258 (template<> __aligned_buffer): Define as __aligned_membuf alias.
2259
14e335ed
IT
22602018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
2261
2262 PR target/84148
2263 * configure: Regenerate.
2264
51f174c0
JW
22652018-02-15 Jonathan Wakely <jwakely@redhat.com>
2266
2267 PR libstdc++/81797
2268 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
2269 * configure: Regenerate.
2270 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
2271 defined.
2272 * include/Makefile.in: Regenerate.
2273
73ebece3
JW
22742018-01-29 Jonathan Wakely <jwakely@redhat.com>
2275
50ea03f4
JW
2276 PR libstdc++/83833
2277 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2278 Add -ffloat-store to options for m68k and ia32.
2279
b53e4e1c
JW
2280 * doc/xml/faq.xml: Update copyright years.
2281 * doc/html/*: Regenerate.
2282
73ebece3
JW
2283 PR libstdc++/83658
2284 * include/std/any (any::__do_emplace): Only set _M_manager after
2285 constructing the contained object.
2286 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
2287 * testsuite/20_util/any/modifiers/83658.cc: New test.
2288
58078de7
JW
22892018-01-25 Jonathan Wakely <jwakely@redhat.com>
2290
2291 PR libstdc++/81076
2292 * include/c_global/cstddef (__byte_operand): Define primary template.
2293 * testsuite/18_support/byte/81076.cc: New test.
2294
a46c4287
CL
22952018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
2296
2297 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
58078de7 2298 dg-options and dg-add-options order.
a46c4287
CL
2299 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
2300 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
2301 Likewise.
2302 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
2303 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
2304 Likewise.
2305 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
2306 Likewise.
2307 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
2308 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
2309 Likewise.
2310 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
2311 Likewise.
2312 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2313 Likewise.
2314 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2315 Likewise.
2316 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2317 Likewise.
2318 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2319 Likewise.
2320 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2321 Likewise.
2322 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2323 Likewise.
2324 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2325 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2326 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2327 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2328 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2329 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2330 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2331 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2332 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2333 Likewise.
2334 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2335 Likewise.
2336 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2337 Likewise.
2338 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2339 Likewise.
2340
dac867c9
UB
23412018-01-18 Uros Bizjak <ubizjak@gmail.com>
2342
2343 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
2344 include linux/types.h when checking linux/random.h header.
2345 * config.h.in: Regenerate.
2346 * configure: Ditto.
2347 * src/c++11/random.cc: Conditionally include linux/types.h.
2348
229433c9
EB
23492018-01-16 Eric Botcazou <ebotcazou@adacore.com>
2350
2351 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2352
cce6078d
JW
23532018-01-16 Jonathan Wakely <jwakely@redhat.com>
2354
2355 PR libstdc++/83834
2356 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2357 pattern with exact match for std::cerr.
2358
b0e63d94
JW
23592018-01-15 Jonathan Wakely <jwakely@redhat.com>
2360
8b3085e7
JW
2361 PR libstdc++/83833
2362 * include/bits/random.h (chi_squared_distribution::param): Update
2363 gamma distribution parameter.
2364 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2365 test.
2366
b0e63d94
JW
2367 PR libstdc++/83830
2368 * include/std/type_traits (has_unique_object_representations_v): Add
2369 variable template.
2370 * testsuite/20_util/has_unique_object_representations/value.cc: Check
2371 variable template.
2372
c89f2d24
VV
23732018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
2374
2375 Make optional conditionally
2376 trivially_{copy,move}_{constructible,assignable}
2377 * include/std/optional (_Optional_payload): Fix the comment in
2378 the class head and turn into a primary and one specialization.
2379 (_Optional_payload::_M_engaged): Strike the NSDMI.
2380 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2381 New.
2382 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2383 Likewise.
2384 (_Optional_payload<_Tp, false>::_M_get): Likewise.
2385 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2386 (_Optional_base_impl): Likewise.
2387 (_Optional_base): Turn into a primary and three specializations.
2388 (optional(nullopt)): Change the base init.
2389 * testsuite/20_util/optional/assignment/8.cc: New.
2390 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2391 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2392
bab0a26d
JW
23932018-01-15 Jonathan Wakely <jwakely@redhat.com>
2394
2395 PR libstdc++/80276
2396 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2397 (get_template_arg_list): New.
2398 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2399 instead.
2400 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2401 of strings and regular expressions.
2402 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2403 (FilteringTypePrinter): Add docstring. Match using startswith. Use
2404 strip_inline_namespaces instead of strip_versioned_namespace.
2405 (add_one_type_printer): Prepend namespace to match argument.
2406 (register_type_printers): Add type printers for char16_t and char32_t
2407 string types and for types using cxx11 ABI. Update calls to
2408 add_one_template_type_printer to provide default argument dicts.
2409 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2410 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2411 basic_string<unsigned char> and basic_string<signed char>.
2412 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2413 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2414
a61bac1e
AS
24152018-01-14 Andreas Schwab <schwab@linux-m68k.org>
2416
2417 PR libstdc++/81092
2418 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2419
8532713f
TS
24202018-01-13 Tim Shen <timshen@google.com>
2421
2422 PR libstdc++/83601
2423 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2424 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2425 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2426
c969e34e
RO
24272018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2428
2429 PR libstdc++/64054
2430 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2431 Remove dg-xfail-run-if.
2432
75ce74bb
FD
24332018-01-10 François Dumont <fdumont@gcc.gnu.org>
2434
2435 * include/bits/forward_list.h
2436 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2437 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2438 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2439 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2440 (_Fwd_list_impl()): Add noexcept qualification.
2441 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2442 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2443 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2444 (_Fwd_list_base()): Default.
2445 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2446 (_Fwd_list_base(_Fwd_list_base&&)): Default.
2447 (forward_list<>()): Default.
2448 (forward_list<>(forward_list&&)): Default.
2449 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2450 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2451 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2452 * include/bits/forward_list.tcc
2453 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2454 _M_impl._M_head move assignment.
2455 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2456 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2457
8273aa77
JW
24582018-01-09 Jonathan Wakely <jwakely@redhat.com>
2459
2460 PR libstdc++/80276
2461 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2462 (UniquePointerPrinter): Print correct template argument, not type of
2463 the pointer.
2464 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2465 a type.
2466 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2467 array type.
2468 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2469 weak_ptr of array types.
2470
0f146257
FD
24712018-01-09 François Dumont <fdumont@gcc.gnu.org>
2472
2473 PR libstdc++/83709
2474 * include/bits/hashtable_policy.h
2475 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2476 __first != __last.
2477 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2478 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2479 Add false_type parameter.
2480 (_Insert_base::insert): Adapt.
2481 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2482 Adapt.
2483 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2484 Add __n_elt parameter, defaulted to 1.
2485 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2486 policy _M_need_rehash.
2487 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2488 produce only 1 rehash if necessary.
2489 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2490 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2491
ed99ae13
JO
24922018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
2493 Jonathan Wakely <jwakely@redhat.com>
d2dfcf82
JO
2494
2495 PR libstdc++/59253 (partial)
2496 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2497 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2498 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2499 children.
2500 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2501 of unique_ptr printer.
2502 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2503 output of shared_ptr printer.
2504
388058dd
JW
25052018-01-05 Jonathan Wakely <jwakely@redhat.com>
2506
4ca07db0
JW
2507 PR libstdc++/83626
2508 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2509 unnecessary symlink_status call.
2510 (remove_all(const path&, error_code&)): Use filesystem::remove.
2511 * src/filesystem/std-ops.cc: Likewise.
2512
2526c53a
JW
2513 PR libstdc++/83279
2514 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
2515 sendfile.
2516
388058dd
JW
2517 PR libstdc++/83626
2518 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2519 report an error for ENOENT.
2520 (remove_all(const path&)): Fix type of result variable.
2521 (remove_all(const path&, error_code&)): Use non-throwing increment
2522 for directory iterator. Call POSIX remove directly to avoid redundant
2523 calls to symlink_status. Do not report errors for ENOENT.
2524 * src/filesystem/std-ops.cc: Likewise.
2525 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2526 overload.
2527 * testsuite/experimental/filesystem/operations/remove_all.cc:
2528 Likewise.
2529
32489ab5
JW
25302018-01-04 Jonathan Wakely <jwakely@redhat.com>
2531
994844d3
JW
2532 PR libstdc++/83626
2533 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2534 redundant call to ec.clear().
2535 (remove_all(const path&, error_code&))): Do not return an error for
2536 non-existent paths.
2537 * src/filesystem/std-ops.cc: Likewise.
2538 * testsuite/27_io/filesystem/operations/remove.cc: New test.
2539 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2540 results for non-existent paths.
2541 * testsuite/experimental/filesystem/operations/remove.cc: New test.
2542 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2543 expected results for non-existent paths.
2544
f7373fce
JW
2545 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2546 check status_known once.
2547 * include/experimental/bits/fs_ops.h: Likewise.
2548
32489ab5
JW
2549 PR libstdc++/83607
2550 * include/std/functional (__is_byte_like): New trait.
2551 (__is_std_equal_to): Remove.
2552 (__boyer_moore_base_t): Use __is_byte_like instead of
2553 __is_std_equal_to.
2554 * include/experimental/functional (__is_std_equal_to): Remove.
2555 (__boyer_moore_base_t): Use __is_byte_like instead of
2556 __is_std_equal_to.
2557 * testsuite/20_util/function_objects/83607.cc: New test.
2558
8bdbeed1
VV
25592018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
2560
2561 Protect optional's deduction guide with the feature macro
2562 * include/std/optional: Use the feature macro.
2563
85ec4feb 25642018-01-03 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
2565
2566 Update copyright years.
b4df5e92 2567\f
85ec4feb 2568Copyright (C) 2018 Free Software Foundation, Inc.
b4df5e92
JW
2569
2570Copying and distribution of this file, with or without modification,
2571are permitted in any medium without royalty provided the copyright
2572notice and this notice are preserved.