]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
libstdc++: Rework std::copy/copy_backward/move/move_backward/fill/fill_n algos
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
6004c17b
FD
12019-12-10 François Dumont <fdumont@gcc.gnu.org>
2
3 * include/bits/stl_algobase.h
4 (__copy_move_a1<>(_II, _II, _OI)): New.
5 (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
6 (__copy_move_a1<>(_Deque_iterator<>, _Deque_iterator<>,
7 _Deque_iterator<>)): New.
8 (__copy_move_a1<>(_II, _II, _Deque_iterator<>)): New.
9 (__copy_move_a<>(_II, _II, _OI)): Adapt, call __copy_move_a1<>.
10 (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
11 _OI)): New.
12 (__copy_move_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
13 const _Safe_iterator<>&)): New.
14 (__copy_move_a<>(_II, _II, const _Safe_iterator<>&)): New.
15 (copy, move): Adapt, call __copy_move_a.
16 (__copy_move_backward_a1<>(_II, _II, _OI)): New,
17 call __copy_move_backward_a2.
18 (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
19 (__copy_move_backward_a1<>(_Deque_iterator<>, _Deque_iterator<>,
20 _Deque_iterator<>)): New.
21 (__copy_move_backward_a1<>(_II, _II, _Deque_iterator<>)): New.
22 (__copy_move_backward_a<>(_II, _II, _OI)): Adapt, call
23 __copy_move_backward_a1<>.
24 (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
25 _OI)): New.
26 (__copy_move_backward_a<>(const _Safe_iterator<>&, const _Safe_iterator<>&,
27 const _Safe_iterator<>&)): New.
28 (__copy_move_backward_a<>(_II, _II, const _Safe_iterator<>&)): New.
29 (copy_backward, move_backward): Adapt, call __copy_move_backward_a<>.
30 (__fill_a): Rename into...
31 (__fill_a1): ... this.
32 (__fill_a1(__normal_iterator<>, __normal_iterator<>, const _Tp&)): New.
33 (__fill_a1(const _Deque_iterator<>&, const _Deque_iterator<>&, _VTp)):
34 New.
35 (__fill_a(_FIte, _FIte, const _Tp&)): New, call __fill_a1.
36 (__fill_a(const _Safe_iterator<>&, const _Safe_iterator<>&,
37 const _Tp&)): New.
38 (fill): Adapt, remove __niter_base usage.
39 (__fill_n_a): Rename into...
40 (__fill_n_a1): ...this.
41 (__fill_n_a(const _Safe_iterator<>&, _Size, const _Tp&,
42 input_iterator_tag)): New.
43 (__fill_n_a(_OI, _Size, const _Tp&, output_iterator_tag)): New, call
44 __fill_n_a1.
45 (__fill_n_a(_OI, _Size, const _Tp&, random_access_iterator_tag)): New,
46 call __fill_a.
47 (__equal_aux): Rename into...
48 (__equal_aux1): ...this.
49 (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>, _OI)): New.
50 (__equal_aux1(_Deque_iterator<>, _Deque_iterator<>,
51 _Deque_iterator<>)): New.
52 (__equal_aux1(_II, _II, _Deque_iterator<>)): New.
53 (__equal_aux(_II1, _II1, _II2)): New, call __equal_aux1.
54 (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&,
55 _OI)): New.
56 (__equal_aux(const _Safe_iterator<>&, const _Safe_iterator<>&,
57 const _Safe_iterator<>&)): New.
58 (__equal_aux(_II, _II, const _Safe_iterator<>&)): New.
59 (equal(_II1, _II1, _II2)): Adapt.
60 * include/bits/stl_deque.h
61 (fill, copy, copy_backward, move, move_backward): Remove.
62 * include/bits/deque.tcc: Include <bits/stl_algobase.h>.
63 (__fill_a1): New.
64 (__copy_move_dit): New.
65 (__copy_move_a1): New, use latter.
66 (__copy_move_a1(_II, _II, _Deque_iterator<>)): New.
67 (__copy_move_backward_dit): New.
68 (__copy_move_backward_a1): New, use latter.
69 (__copy_move_backward_a1(_II, _II, _Deque_iterator<>)): New.
70 (__equal_dit): New.
71 (__equal_aux1): New, use latter.
72 (__equal_aux1(_II, _II, _Deque_iterator<>)): New.
73 * include/std/numeric (__is_random_access_iter): Move...
74 * include/bits/stl_iterator_base_types.h (__is_random_access_iter): ...
75 here. Provide pre-C++11 definition.
76 * include/debug/debug.h (_Safe_iterator<>): New declaration.
77 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_can_advance): Add
78 __strict parameter.
79 * include/debug/safe_iterator.tcc: Include <bits/stl_algobase.h>.
80 (_Safe_iterator<>::_M_can_advance): Adapt.
81 (std::__copy_move_a, std::__copy_move_backward_a, __fill_a): New.
82 (__fill_n_a, __equal_aux): New.
83 * include/debug/stl_iterator.h (__niter_base): Remove.
84 * include/debug/vector (__niter_base): Remove.
85 * testsuite/performance/25_algorithms/copy_backward_deque_iterators.cc:
86 Include <vector> and <list>. Add benches.
87 * testsuite/performance/25_algorithms/copy_deque_iterators.cc: Likewise.
88 * testsuite/performance/25_algorithms/equal_deque_iterators.cc: Likewise.
89 * testsuite/25_algorithms/copy/debug/1_neg.cc: New.
90 * testsuite/25_algorithms/copy/deque_iterators/2.cc: New.
91 * testsuite/25_algorithms/copy/deque_iterators/31.cc: New.
92 * testsuite/25_algorithms/copy/deque_iterators/32.cc: New.
93 * testsuite/25_algorithms/copy/deque_iterators/33.cc: New.
94 * testsuite/25_algorithms/copy/deque_iterators/41.cc: New.
95 * testsuite/25_algorithms/copy/deque_iterators/42.cc: New.
96 * testsuite/25_algorithms/copy/deque_iterators/43.cc: New.
97 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc (test02):
98 New.
99 * testsuite/25_algorithms/copy_backward/deque_iterators/2.cc: New.
100 * testsuite/25_algorithms/equal/deque_iterators/1.cc: New.
101 * testsuite/25_algorithms/fill/deque_iterators/1.cc: New.
102 * testsuite/25_algorithms/move/deque_iterators/2.cc: New.
103 * testsuite/25_algorithms/move_backward/deque_iterators/2.cc: New.
104
990a09e4
JW
1052019-12-10 Jonathan Wakely <jwakely@redhat.com>
106
91fd16a7
JW
107 PR libstdc++/92886
108 * include/bits/ios_base.h (std::ios_base::trunc): Fix comment.
109
393283b8
JW
110 * include/std/complex (__cpp_lib_constexpr_complex): Define.
111 * include/std/version (__cpp_lib_constexpr_complex): Likewise.
112 * testsuite/26_numerics/complex/1.cc: New test.
113 * testsuite/26_numerics/complex/2.cc: New test.
114
b65bdd27
JW
115 * include/std/span: Do not include <tuple> and <utility>.
116 (tuple_size, tuple_element): Declare.
117
990a09e4
JW
118 * include/bits/iterator_concepts.h (indirect_result_t): Do not apply
119 iter_reference_t to parameter pack.
120 * testsuite/24_iterators/indirect_callable/projected.cc: New test.
121
023a3fb4
JW
1222019-12-09 Jonathan Wakely <jwakely@redhat.com>
123
b5b2e387
JW
124 * include/bits/range_access.h (ranges::enable_safe_range): Define.
125 (ranges::begin, ranges::end, ranges::rbegin, ranges::rend): Constrain
126 to only accept types satisfying safe_range and treat argument as an
127 lvalue when calling a member of performing ADL.
128 (ranges::__detail::__range_impl, ranges::__detail::__forwarding_range):
129 Remove.
130 (ranges::range): Adjust definition.
131 (ranges::safe_range): Define.
132 (ranges::iterator_t, ranges::range_difference_t): Reorder definitions
133 to match the synopsis in the working draft.
134 (ranges::disable_sized_range): Remove duplicate definition.
135 * include/experimental/string_view (ranges::enable_safe_range): Add
136 partial specialization for std::experimental::basic_string_view.
137 * include/std/ranges (ranges::viewable_range, ranges::subrange)
138 (ranges::empty_view, ranges::iota_view): Use safe_range. Specialize
139 enable_safe_range.
140 (ranges::safe_iterator_t, ranges::safe_subrange_t): Define.
141 * include/std/span (ranges::enable_safe_range): Add partial
142 specialization for std::span.
143 * include/std/string_view (ranges::enable_safe_range): Likewise for
144 std::basic_string_view.
145 * testsuite/std/ranges/access/begin.cc: Adjust expected results.
146 * testsuite/std/ranges/access/cbegin.cc: Likewise.
147 * testsuite/std/ranges/access/cdata.cc: Likewise.
148 * testsuite/std/ranges/access/cend.cc: Likewise.
149 * testsuite/std/ranges/access/crbegin.cc: Likewise.
150 * testsuite/std/ranges/access/crend.cc: Likewise.
151 * testsuite/std/ranges/access/data.cc: Likewise.
152 * testsuite/std/ranges/access/end.cc: Likewise.
153 * testsuite/std/ranges/access/rbegin.cc: Likewise.
154 * testsuite/std/ranges/access/rend.cc: Likewise.
155 * testsuite/std/ranges/empty_view.cc: Test ranges::begin and
156 ranges::end instead of unqualified calls to begin and end.
157 * testsuite/std/ranges/safe_range.cc: New test.
158 * testsuite/std/ranges/safe_range_types.cc: New test.
159 * testsuite/util/testsuite_iterators.h: Add comment about safe_range.
160
1d214c3f
JW
161 * testsuite/27_io/filesystem/path/concat/strings.cc: Test more cases.
162
023a3fb4
JW
163 PR libstdc++/92853
164 * src/c++17/fs_path.cc (filesystem::path::operator+=(const path&)):
165 Do not process a trailing directory separator twice.
166 * testsuite/27_io/filesystem/path/concat/92853.cc: New test.
167 * testsuite/27_io/filesystem/path/concat/path.cc: Test more cases.
168
43839590
FD
1692019-12-09 François Dumont <fdumont@gcc.gnu.org>
170
171 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
172 Fix static_assert line number.
173 * testsuite/23_containers/array/tuple_interface/
174 tuple_element_debug_neg.cc: Likewise.
175
c44e87ac
AP
1762019-12-07 Andrew Pinski <apinski@marvell.com>
177
178 * config/cpu/aarch64/opt/ext/opt_random.h: Wrap around with check
179 for little-endian like ext/random is done.
180
5a784d35
JW
1812019-12-05 Jonathan Wakely <jwakely@redhat.com>
182
183 * testsuite/23_containers/span/lwg3255.cc: Fix test. Constructing a
184 span of non-const elements should not be possible from a const array
185 or an array of const elements.
186
a7922ddf
JTM
1872019-12-05 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
188
189 Implement P1872R0 and P1394R0 for std::span
190 * include/bits/range_access.h (__adl_begin, __adl_end): Remove.
191 (sentinel_t, range_value_t, range_reference_t)
192 (range_rvalue_reference_t, __forwarding_range, disable_sized_range)
193 (output_range, input_range, forward_range, bidirectional_range)
194 (random_access_range, contiguous_range, common_range): Move here from
195 <ranges>, to make this the "ranges lite" internal header.
196 * include/std/ranges: Move basic aliases and concepts to
197 <bits/range_access.h>.
198 * include/std/span: Use concepts and ranges:: calls instead of
199 enable_if and friends.
200 * include/std/type_traits: Add __is_array_convertible trait.
201
3a4cc628
JW
2022019-12-05 Jonathan Wakely <jwakely@redhat.com>
203
f1355c8d
JW
204 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
205 Define for C++20.
206 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc: New
207 test.
208 * testsuite/25_algorithms/lexicographical_compare_three_way/
209 constexpr.cc: New test.
210
a59c50bd
JW
211 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter): New printer.
212 * testsuite/libstdc++-prettyprinters/cxx20.cc: New test.
213
3a4cc628
JW
214 * include/bits/cpp_type_traits.h (__is_byte<char8_t>): Add
215 specialization.
216 * include/std/array (operator<=>): Likewise.
217 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
218 Test three-way comparisons and arrays of unsigned char.
219 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
220 dg-error line numbers.
221
819fb019
JW
2222019-12-03 Jonathan Wakely <jwakely@redhat.com>
223
7f397e45
JW
224 * include/bits/stl_pair.h [__cpp_lib_three_way_comparison]
225 (operator<=>): Define for C++20.
226 * libsupc++/compare (__cmp2way_res_t): Rename to __cmp3way_res_t,
227 move into __detail namespace. Do not turn argument types into lvalues.
228 (__cmp3way_helper): Rename to __cmp3way_res_impl, move into __detail
229 namespace. Constrain with concepts instead of using void_t.
230 (compare_three_way_result): Adjust name of base class.
231 (compare_three_way_result_t): Use __cmp3way_res_impl directly.
232 (__detail::__3way_cmp_with): Add workaround for PR 91073.
233 (compare_three_way): Use workaround.
234 (__detail::__synth3way, __detail::__synth3way_t): Define new helpers
235 implementing synth-three-way and synth-three-way-result semantics.
236 * testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc: New
237 test.
238
6fb3d28f
JW
239 * include/bits/stl_pair.h (pair): Remove stray Doxygen closing marker.
240
819fb019
JW
241 * testsuite/util/slow_clock.h: Fix copyright date.
242
49638674
MC
2432019-12-02 Mike Crowe <mac@mcrowe.com>
244
b789efea
MC
245 Fix try_lock_until and try_lock_shared_until on arbitrary clock
246 * include/std/shared_mutex (shared_timed_mutex::try_lock_until)
247 (shared_timed_mutex::try_lock_shared_until): Loop until the absolute
248 timeout time is reached as measured against the appropriate clock.
249 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
250 file. Test try_lock_until and try_lock_shared_until timeouts against
251 various clocks.
252 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
253 file. Test try_lock_until and try_lock_shared_until timeouts against
254 various clocks.
255
ab40695a
MC
256 Add full steady_clock support to shared_timed_mutex
257 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_RWLOCK_CLOCKLOCK): Define
258 to check for the presence of both pthread_rwlock_clockrdlock and
259 pthread_rwlock_clockwrlock.
260 * config.h.in: Regenerate.
261 * configure.ac: Call GLIBCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK.
262 * configure: Regenerate.
263 * include/std/shared_mutex (shared_timed_mutex): Define __clock_t as
264 the best clock to use for relative waits.
265 (shared_timed_mutex::try_lock_for) Round up wait duration if necessary.
266 (shared_timed_mutex::try_lock_shared_for): Likewise.
267 (shared_timed_mutex::try_lock_until): Use existing try_lock_until
268 implementation for system_clock (which matches __clock_t when
269 _GLIBCCXX_USE_PTHREAD_RWLOCK_CLOCKLOCK is not defined). Add new
270 overload for steady_clock that uses pthread_rwlock_clockwrlock if it
271 is available. Simplify overload for non-standard clock to just call
272 try_lock_for with a relative timeout.
273 (shared_timed_mutex::try_lock_shared_until): Likewise.
274
a7334019
MC
275 PR libstdc++/91906 Fix timed_mutex::try_lock_until on arbitrary clock
276 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Loop
277 until the absolute timeout time is reached as measured against the
278 appropriate clock.
279 * testsuite/util/slow_clock.h: New file. Move implementation of
280 slow_clock test class.
281 * testsuite/30_threads/condition_variable/members/2.cc: Include
282 slow_clock from header.
283 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Convert
284 existing test to templated function so that it can be called with
285 both system_clock and steady_clock.
286 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Also run test
287 using slow_clock to test above fix.
288 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
289 Likewise.
290 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/4.cc: Add
291 new test that try_lock_until behaves as try_lock if the timeout has
292 already expired or exactly matches the current time.
293
3b2fb543
MC
294 PR libstdc++/78237 Add full steady_clock support to timed_mutex
295 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK): Define to
296 detect presence of pthread_mutex_clocklock function.
297 * config.h.in: Regenerate.
298 * configure: Regenerate.
299 * configure.ac: Call GLIBCXX_CHECK_PTHREAD_MUTEX_CLOCKLOCK.
300 * include/std/mutex (__timed_mutex_impl): Remove unnecessary __clock_t.
301 (__timed_mutex_impl::_M_try_lock_for): Use best clock to turn relative
302 timeout into absolute timeout.
303 (__timed_mutex_impl::_M_try_lock_until): Keep existing implementation
304 for system_clock. Add new implementation for steady_clock that calls
305 _M_clocklock. Modify overload for user-defined clock to use a relative
306 wait so that it automatically uses the best clock.
307 [_GLIBCXX_USE_PTHREAD_MUTEX_CLOCKLOCK] (timed_mutex::_M_clocklock):
308 New member function.
309 (recursive_timed_mutex::_M_clocklock): Likewise.
310
49638674
MC
311 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
312 New test. Ensure that timed_mutex::try_lock_until actually times out
313 after the specified time when using both system_clock and
314 steady_clock.
315 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: New test.
316 Likewise but for recursive_timed_mutex.
317 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Template
318 test functions and use them to test both steady_clock and system_clock.
319 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. Wrap call
320 to timed_mutex::try_lock_until in VERIFY macro to check its return
321 value.
322
3eda32cb
JW
3232019-11-30 Jonathan Wakely <jwakely@redhat.com>
324
f0cfae9f
JW
325 * acinclude.m4 (GLIBCXX_ENABLE_FILESYSTEM_TS): Enable by default for
326 mingw targets.
327 * configure: Regenerate.
328
3eda32cb
JW
329 * include/bits/fs_path.h (u8path(InputIterator, InputIterator))
330 (u8path(const Source&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Simplify
331 conditions.
332 * include/experimental/bits/fs_path.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
333 (__u8path(const Source&, char)): Add overloads for std::string and
334 types convertible to std::string.
335 (_Cvt::_S_wconvert): Add a new overload for char8_t strings and use
336 codecvt_utf8_utf16 to do the correct conversion.
337
24cc0de9
JW
3382019-11-29 Jonathan Wakely <jwakely@redhat.com>
339
340 * include/bits/fs_path.h (path::operator/=): Change template-head to
341 use typename instead of class.
342 * include/experimental/bits/fs_path.h (path::operator/=): Likewise.
343 * include/std/ostream (operator<<): Likewise.
344
a1e7d33b
TH
3452019-11-29 Tom Honermann <tom@honermann.net>
346
cd502796
TH
347 New tests
348 * testsuite/27_io/basic_ostream/inserters_character/char/deleted.cc:
349 New test to validate deleted overloads of character and string
350 inserters for narrow ostreams.
351 * testsuite/27_io/basic_ostream/inserters_character/wchar_t/deleted.cc:
352 New test to validate deleted overloads of character and string
353 inserters for wide ostreams.
354 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc: New test
355 to validate u8path invocations with sequences of char8_t.
356 * testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc:
357 New test to validate u8path invocations with sequences of char8_t.
358
2b68cdc7
TH
359 Updates to existing tests
360 * testsuite/experimental/feat-char8_t.cc: Updated the expected
361 __cpp_lib_char8_t feature test macro value.
362 * testsuite/27_io/filesystem/path/factory/u8path.cc: Added testing of
363 u8path invocation with std::string, std::string_view, and iterators
364 thereof.
365 * testsuite/experimental/filesystem/path/factory/u8path.cc: Added
366 testing of u8path invocation with std::string, std::string_view, and
367 iterators thereof.
368
2b4e2c93
TH
369 Update feature test macro, add deleted operators, update u8path
370 * include/bits/c++config: Bumped the value of the __cpp_lib_char8_t
371 feature test macro.
372 * include/bits/fs_path.h (u8path): Modified u8path to accept sequences
373 of char8_t.
374 * include/experimental/bits/fs_path.h (u8path): Modified u8path to
375 accept sequences of char8_t.
376 * include/std/ostream: Added deleted overloads of wchar_t, char8_t,
377 char16_t, and char32_t for ordinary and wide formatted character and
378 string inserters.
379
a1e7d33b
TH
380 Decouple constraints for u8path from path constructors
381 * include/bits/fs_path.h: Moved helper utilities out of
382 std::filesystem::path into a detail namespace to make them
383 available for use by u8path.
384 * include/experimental/bits/fs_path.h: Moved helper utilities out
385 of std::experimental::filesystem::v1::path into a detail
386 namespace to make them available for use by u8path.
387
9d50a6a7
JW
3882019-11-29 Jonathan Wakely <jwakely@redhat.com>
389
390 PR libstdc++/91997
391 * python/libstdcxx/v6/printers.py (find_type): Fail more gracefully
392 if we run out of base classes to look at.
819fb019 393 (lookup_templ_spec, lookup_node_type): New utilities to find node
9d50a6a7
JW
394 types for node-based containers.
395 (StdListPrinter.children, NodeIteratorPrinter.__init__)
396 (NodeIteratorPrinter.to_string, StdSlistPrinter.children)
397 (StdSlistIteratorPrinter.to_string, StdRbtreeIteratorPrinter.__init__)
398 (StdMapPrinter.children, StdSetPrinter.children)
399 (StdForwardListPrinter.children): Use lookup_node_type instead of
400 find_type.
401 (StdListIteratorPrinter.__init__, StdFwdListIteratorPrinter.__init__):
402 Pass name of node type to NodeIteratorPrinter constructor.
403 (Tr1HashtableIterator.__init__): Rename argument.
404 (StdHashtableIterator.__init__): Likewise. Use lookup_templ_spec
405 instead of find_type.
406 * testsuite/libstdc++-prettyprinters/59161.cc: Remove workaround for
407 _Node typedef not being present in debuginfo.
408 * testsuite/libstdc++-prettyprinters/91997.cc: New test.
409
db58c8e9
FD
4102019-11-26 François Dumont <fdumont@gcc.gnu.org>
411
e32b9ce4
FD
412 * include/debug/helper_functions.h (__valid_range_aux): Use C++98
413 std::input_iterator_tag default constructor invocation.
414
59d37e97
FD
415 * include/debug/array (array<>::fill): Add C++20 constexpr.
416 (array<>::swap): Likewise.
417
db58c8e9
FD
418 * include/debug/safe_iterator.h
419 [__cpp_lib_concepts](_Safe_iterator<>::iterator_concept): Define for
420 C++20.
421
d6039f5c
JW
4222019-11-25 Jonathan Wakely <jwakely@redhat.com>
423
7def9bd7
JW
424 * include/bits/iterator_concepts.h (ranges::iter_swap): Fix parameter
425 types of poison pill overload. Use remove_reference_t when checking
426 constraints.
427 * include/bits/stl_iterator.h (move_sentinel): Define for C++20.
428 (move_iterator): Adjust definitions of nested types for C++20. Add
429 hidden friends for move_sentinel operations, iter_move and iter_swap.
430 (common_iterator, counted_iterator): Define for C++20.
431 * testsuite/24_iterators/move_iterator/cust.cc: New test.
432 * testsuite/24_iterators/move_iterator/sentinel.cc: New test.
433 * testsuite/24_iterators/common_iterator/1.cc: New test.
434 * testsuite/24_iterators/counted_iterator/1.cc: New test.
435
d6039f5c
JW
436 PR libstdc++/91786
437 * include/bits/fs_path.h (filesystem_error): Move definition before
438 the use in u8path.
439
af4e8d4d
FD
4402019-11-24 François Dumont <fdumont@gcc.gnu.org>
441
442 * include/debug/functions.h: Remove <bits/move.h> include.
443 (__check_singular_aux, __check_singular): Move...
444 * include/debug/helper_functions.h:
445 (__check_singular_aux, __check_singular): ...here.
446 (__valid_range_aux): Adapt to use latter.
447 * testsuite/25_algorithms/copy/debug/2_neg.cc: New.
448
aeebd94c
JB
4492019-11-20 Janne Blomqvist <jb@gcc.gnu.org>
450
451 * doc/html/api.html: Use https for gcc.gnu.org.
452 * doc/xml/api.xml: Likewise.
453
5ecaaf98
JW
4542019-11-19 Jonathan Wakely <jwakely@redhat.com>
455
456 * include/bits/regex.h (ranges::__detail::__enable_view_impl): Fix
457 declaration.
458 * include/bits/stl_multiset.h (ranges::__detail::__enable_view_impl):
459 Likewise.
460 * include/bits/stl_set.h (ranges::__detail::__enable_view_impl):
461 Likewise.
462 * include/bits/unordered_set.h (ranges::__detail::__enable_view_impl):
463 Likewise.
464 * include/debug/multiset.h (ranges::__detail::__enable_view_impl):
465 Likewise.
466 * include/debug/set.h (ranges::__detail::__enable_view_impl): Likewise.
467 * include/debug/unordered_set (ranges::__detail::__enable_view_impl):
468 Likewise.
469
3b39526e
JW
4702019-11-18 Jonathan Wakely <jwakely@redhat.com>
471
ebc46494
JW
472 * include/std/thread: Reduce header dependencies.
473 (jthread::get_id()): Add missing return.
474 (jthread::get_stop_token()): Avoid unnecessary stop_source temporary.
475 (jthread::_S_create): Check is_invocable using decayed types. Add
476 static assertion.
477 * testsuite/30_threads/jthread/1.cc: Add dg-require-gthreads.
478 * testsuite/30_threads/jthread/2.cc: Likewise.
479 * testsuite/30_threads/jthread/3.cc: New test.
480 * testsuite/30_threads/jthread/jthread.cc: Add missing directives for
481 pthread and gthread support. Use VERIFY instead of assert.
482
3b39526e
JW
483 * include/bits/alloc_traits.h (allocator_traits::construct)
484 (allocator_traits::destroy, allocator_traits::max_size): Add unused
485 attributes to parameters that are not used in C++20.
486 * include/std/bit (__ceil2): Add braces around assertion to avoid
487 -Wmissing-braces warning.
488
f6e86b33
ESR
4892019-11-16 Edward Smith-Rowland <3dw4rd@verizon.net>
490
491 Repair the <tuple> part of C++20 p1032 Misc constexpr bits.
492 * include/bits/uses_allocator.h (__uses_alloc0::_Sink::operaror=)
493 (__use_alloc(const _Alloc&)) : Constexpr.
494
37f33df7
JW
4952019-11-17 Jonathan Wakely <jwakely@redhat.com>
496
8857080c
JW
497 * include/std/string_view (basic_string_view(It, End)): Add range
498 constructor and deduction guide from P1391R4.
499 * testsuite/21_strings/basic_string_view/cons/char/range.cc: New test.
500
37f33df7
JW
501 * include/bits/regex.h (match_results): Specialize __enable_view_impl.
502 * include/bits/stl_set.h (set): Likewise.
503 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
504 Likewise.
505 * include/debug/multiset.h (__debug::multiset): Likewise.
506 * include/debug/set.h (__debug::set): Likewise.
507 * include/debug/unordered_set (__debug::unordered_set)
508 (__debug::unordered_multiset): Likewise.
509 * include/std/ranges (ranges::view, ranges::enable_view)
510 (ranges::view_interface, ranges::subrange, ranges::empty_view)
511 (ranges::single_view, ranges::views::single, ranges::iota_view)
512 (ranges::views::iota): Define for C++20.
513 * testsuite/std/ranges/empty_view.cc: New test.
514 * testsuite/std/ranges/iota_view.cc: New test.
515 * testsuite/std/ranges/single_view.cc: New test.
516 * testsuite/std/ranges/view.cc: New test.
517
74533764
JW
5182019-11-16 Jonathan Wakely <jwakely@redhat.com>
519
bac66329
JW
520 * include/std/ranges: Revert accidentally committed changes.
521
74533764
JW
522 * include/std/thread (jthread::jthread()): Use nostopstate constant.
523 (jthread::jthread(Callable&&, Args&&...)): Use helper function to
524 create std::thread instead of indirection through a lambda. Use
525 remove_cvref_t instead of decay_t.
526 (jthread::joinable(), jthread::get_id(), jthread::native_handle())
527 (jthread::hardware_concurrency()): Add nodiscard attribute.
528 (swap(jthread&. jthread&)): Define hidden friend.
529 (jthread::_S_create): New helper function for constructor.
530
6d1402f0
ESR
5312019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net>
532
533 Implement the <tuple> part of C++20 p1032 Misc constexpr bits.
534 * include/std/tuple (_Head_base, _Tuple_impl(allocator_arg_t,...)
535 (_M_assign, tuple(allocator_arg_t,...), _Inherited, operator=, _M_swap)
536 (swap, pair(piecewise_construct_t,): Constexpr.
537 * (__uses_alloc0::_Sink::operator=, __uses_alloc_t): Constexpr.
538 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: New test.
539 * testsuite/20_util/tuple/constexpr_swap.cc : New test.
540 * testsuite/20_util/uses_allocator/69293_neg.cc: Extra error for C++20.
541 * testsuite/20_util/uses_allocator/cons_neg.cc: : Extra error for C++20.
542
e73ca078
JW
5432019-11-15 Jonathan Wakely <jwakely@redhat.com>
544
545 * include/std/stop_token: Reduce header dependencies by including
546 internal headers.
547 (stop_token::swap(stop_token&), swap(stop_token&, stop_token&)):
548 Define.
549 (operator!=(const stop_token&, const stop_token&)): Fix return value.
550 (stop_token::_Stop_cb::_Stop_cb(Cb&&)): Use std::forward instead of
551 (stop_token::_Stop_state_t) [_GLIBCXX_HAS_GTHREADS]: Use lock_guard
552 instead of unique_lock.
553 [!_GLIBCXX_HAS_GTHREADS]: Do not use mutex.
554 (stop_token::stop_token(_Stop_state)): Change parameter to lvalue
555 reference.
556 (stop_source): Remove unnecessary using-declarations for names only
557 used once.
558 (swap(stop_source&, stop_source&)): Define.
559 (stop_callback(const stop_token&, _Cb&&))
560 (stop_callback(stop_token&&, _Cb&&)): Replace lambdas with a named
561 function. Use std::forward instead of std::move. Run callbacks if a
562 stop request has already been made.
563 (stop_source::_M_execute()): Remove.
564 (stop_source::_S_execute(_Stop_cb*)): Define.
565 * include/std/version (__cpp_lib_jthread): Define conditionally.
566 * testsuite/30_threads/stop_token/stop_callback.cc: New test.
567 * testsuite/30_threads/stop_token/stop_source.cc: New test.
568 * testsuite/30_threads/stop_token/stop_token.cc: Enable test for
569 immediate execution of callback.
570
12536431
ESR
5712019-11-15 Edward Smith-Rowland <3dw4rd@verizon.net>
572
573 Implement the default_searcher part of C++20 p1032 Misc constexpr bits.
574 * include/std/functional
575 (default_searcher, default_searcher::operator()): Constexpr.
576 * testsuite/20_util/function_objects/constexpr_searcher.cc: New.
577
a0e1dcd4
JW
5782019-11-15 Jonathan Wakely <jwakely@redhat.com>
579
a31517cb
JW
580 * include/bits/iterator_concepts.h (weakly_incrementable): Adjust.
581 * include/std/concepts (default_constructible): Rename to
582 default_initializable and require default-list-initialization and
583 default-initialization to be valid (LWG 3149).
584 (semiregular): Adjust to new name.
585 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
586 1.cc: Rename directory to concept.defaultinitializable and adjust to
587 new name.
588 * testsuite/std/concepts/concepts.lang/concept.defaultinitializable/
589 lwg3149.cc: New test.
590 * testsuite/util/testsuite_iterators.h (test_range): Adjust.
591
01eb211b
JW
592 * src/c++17/fs_path.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
593 (is_disk_designator): New helper function.
594 (path::_Parser::root_path()): Use is_disk_designator.
595 (path::lexically_relative(const path&)): Implement resolution of
596 LWG 3070.
597 * testsuite/27_io/filesystem/path/generation/relative.cc: Check with
598 path components that look like a root-name.
599
a0e1dcd4
JW
600 * doc/doxygen/user.cfg.in: Add <stop_token>.
601 * include/precompiled/stdc++.h: Likewise.
602 * include/std/stop_token: Fix definition of std::nostopstate.
603 * testsuite/30_threads/headers/stop_token/synopsis.cc: New test.
604 * testsuite/30_threads/headers/thread/types_std_c++20.cc: New test.
605 * testsuite/30_threads/stop_token/stop_source.cc: New test.
606 * testsuite/30_threads/stop_token/stop_token.cc: Remove unnecessary
607 dg-require directives. Remove I/O and inclusion of <iostream>.
608
942c4b32
TR
6092019-11-14 Thomas Rodgers <trodgers@redhat.com>
610
611 * include/Makefile.am: Add <stop_token> header.
381835c8 612 * include/Makefile.in: Regenerate.
942c4b32
TR
613 * include/std/condition_variable: Add overloads for stop_token support
614 to condition_variable_any.
615 * include/std/stop_token: New file.
616 * include/std/thread: Add jthread type.
617 * include/std/version (__cpp_lib_jthread): New value.
618 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: New test.
619 * testsuite/30_threads/condition_variable_any/stop_token/2.cc: New test.
381835c8
JW
620 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
621 New test.
942c4b32
TR
622 * testsuite/30_threads/jthread/1.cc: New test.
623 * testsuite/30_threads/jthread/2.cc: New test.
624 * testsuite/30_threads/jthread/jthread.cc: New test.
625 * testsuite/30_threads/stop_token/1.cc: New test.
626 * testsuite/30_threads/stop_token/2.cc: New test.
627 * testsuite/30_threads/stop_token/stop_token.cc: New test.
628
1c09b664
ESR
6292019-11-14 Edward Smith-Rowland <3dw4rd@verizon.net>
630
631 Implement the <array> part of C++20 p1032 Misc constexpr bits.
632 * include/std/array (fill, swap): Make constexpr.
633 * testsuite/23_containers/array/requirements/constexpr_fill.cc: New.
634 * testsuite/23_containers/array/requirements/constexpr_swap.cc: New.
635
d99828ee
JW
6362019-11-14 Jonathan Wakely <jwakely@redhat.com>
637
270082a7
JW
638 * include/bits/iterator_concepts.h (__iter_concept_impl): Add
639 comments.
640 (indirect_relation): Rename to indirect_binary_predicate and adjust
641 definition as per P1716R3.
642 (indirect_equivalence_relation): Define.
643 (indirectly_comparable): Adjust definition.
644 * include/std/concepts (equivalence_relation): Define.
645 * testsuite/std/concepts/concepts.callable/relation.cc: Add tests for
646 equivalence_relation.
647
d99828ee
JW
648 * include/bits/iterator_concepts.h (disable_sized_sentinel): Rename to
649 disable_sized_sentinel_for.
650 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust.
651
0ff15d21
JW
6522019-11-13 Jonathan Wakely <jwakely@redhat.com>
653
654 * libsupc++/compare (strong_order, weak_order, partial_order)
655 (compare_strong_order_fallback, compare_weak_order_fallback)
656 (compare_partial_order_fallback): Define customization point objects
657 for C++20.
658 * testsuite/18_support/comparisons/algorithms/partial_order.cc: New
659 test.
660 * testsuite/18_support/comparisons/algorithms/strong_order.cc: New
661 test.
662 * testsuite/18_support/comparisons/algorithms/weak_order.cc: New test.
663
cb6b5afe
GP
6642019-11-11 Gerald Pfeifer <gerald@pfeifer.com>
665
666 * doc/xml/gnu/gpl-3.0.xml: Adjust link to "Why not LGPL".
7901a85f 667
cb6b5afe 6682019-11-10 Gerald Pfeifer <gerald@pfeifer.com>
381835c8 669
7901a85f
GP
670 * doc/xml/manual/using.xml: Switch www.hboehm.info to https.
671
3a99fd4d
JW
6722019-11-07 Jonathan Wakely <jwakely@redhat.com>
673
3d6e7aa9
JW
674 * doc/doxygen/user.cfg.in (INPUT): Add <compare> header.
675 * include/precompiled/stdc++.h: Include <compare> header.
676
29669521
JW
677 * libsupc++/compare (common_comparison_category)
678 (common_comparison_category_t): Define for C++20.
679 * testsuite/18_support/comparisons/common/1.cc: New test.
680
3a99fd4d
JW
681 * include/bits/stl_algo.h (for_each_n): Handle negative count.
682 * testsuite/25_algorithms/for_each/for_each_n_debug.cc: New test.
683
4629ea55
JM
6842019-11-07 Jason Merrill <jason@redhat.com>
685
686 * libsupc++/compare: Remove strong_equality and weak_equality.
687
d37303d1
JW
6882019-11-06 Jonathan Wakely <jwakely@redhat.com>
689
0c92c862
JW
690 * include/Makefile.in: Regenerate.
691 * libsupc++/Makefile.in: Regenerate.
692 * libsupc++/compare (__3way_builtin_ptr_cmp): Define helper.
693 (compare_three_way): Add missing implementation.
694
d37303d1
JW
695 * include/bits/iterator_concepts.h (unreachable_sentinel_t): Remove
696 redundant equality operators.
697 * testsuite/util/testsuite_iterators.h (test_range::sentinel):
698 Likewise.
699
6762b658
JW
7002019-11-05 Jonathan Wakely <jwakely@redhat.com>
701
b7689b96
JM
702 * libsupc++/compare: New header.
703 * libsupc++/Makefile.am (std_HEADERS): Add compare.
704 * include/std/version: Define __cpp_lib_three_way_comparison.
705 * include/std/functional: #include <compare>.
706
c6a7be9b
JW
707 * include/std/version [!_GLIBCXX_HOSTED]: Do not define feature test
708 macros for features that are only present in hosted builds.
709
6762b658
JW
710 * include/bits/iterator_concepts.h (__iter_without_nested_types):
711 Remove incorrect comment.
712
164abd67
JW
7132019-10-31 Jonathan Wakely <jwakely@redhat.com>
714
081f3c3c
JW
715 * doc/html/*: Regenerate.
716
2670a7aa
JW
717 * include/bits/refwrap.h (reference_wrapper, ref, cref): Add constexpr
718 specifiers for C++20.
719 * include/std/functional (_Mem_fn, mem_fn, _Bind, _Bind_result, bind)
720 (bind_front, _Not_fn, not_fn): Likewise.
721 * testsuite/20_util/bind/constexpr.cc: New test.
722 * testsuite/20_util/function_objects/bind_front/constexpr.cc: New test.
723 * testsuite/20_util/function_objects/mem_fn/constexpr.cc: New test.
724 * testsuite/20_util/function_objects/not_fn/constexpr.cc: New test.
725 * testsuite/20_util/reference_wrapper/constexpr.cc: New test.
726
328b52d6
JW
727 * doc/doxygen/user.cfg.in: Add new header.
728 * include/Makefile.am: Add new header.
729 * include/Makefile.in: Regenerate.
730 * include/precompiled/stdc++.h: Include new header.
731 * include/std/ranges: New header.
732 (ranges::sentinel_t, ranges::range_value_t, ranges::range_reference_t)
733 (ranges::range_rvalue_reference_t, ranges::sized_range)
734 (ranges::output_range, ranges::input_ranges, ranges::forward_range)
735 (ranges::bidirectional_range, ranges::random_access_range)
736 (ranges::contiguous_range, ranges::common::range): Define.
737 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Check
738 that disabled_sized_sentinel can be specialized.
739 * testsuite/std/ranges/access/begin.cc: Include <ranges> instead of
740 <iterator>.
741 * testsuite/std/ranges/access/cbegin.cc: Likewise.
742 * testsuite/std/ranges/access/cdata.cc: Likewise.
743 * testsuite/std/ranges/access/cend.cc: Likewise.
744 * testsuite/std/ranges/access/crbegin.cc: Likewise.
745 * testsuite/std/ranges/access/crend.cc: Likewise.
746 * testsuite/std/ranges/access/data.cc: Likewise.
747 * testsuite/std/ranges/access/empty.cc: Likewise.
748 * testsuite/std/ranges/access/end.cc: Likewise.
749 * testsuite/std/ranges/access/end_neg.cc: Likewise.
750 * testsuite/std/ranges/access/rbegin.cc: Likewise.
751 * testsuite/std/ranges/access/rend.cc: Likewise.
752 * testsuite/std/ranges/access/size.cc: Likewise.
753 * testsuite/std/ranges/access/size_neg.cc: Likewise.
754 * testsuite/std/ranges/headers/ranges/synopsis.cc: New test.
755 * testsuite/std/ranges/range.cc: New test.
756 * testsuite/std/ranges/refinements.cc: New test.
757 * testsuite/std/ranges/sized.cc: New test.
758 * testsuite/util/testsuite_iterators.h: Add aliases for range types.
759 (output_iterator_wrapper::WritableObject::operator=): Add const
760 qualifier so that output_iterator_wrapper satisfies writable.
761
b9ff4d7c
JW
762 * testsuite/20_util/add_pointer/value.cc: Check void types.
763
b3ffa117
JW
764 * include/bits/range_access.h (__sizable): Rename to __sentinel_size.
765 Remove workaround for PR c++/92268 and remove redundant requirements
766 that are already checked by sized_sentinel_for.
767 * testsuite/std/ranges/access/cend.cc: Fix failures.
768 * testsuite/std/ranges/access/end.cc: Likewise.
769
beaecb2d
JW
770 * include/bits/range_access.h (ranges::begin): Combine array and
771 non-array overloads into one function template. Only use ADL for
772 classes and enums.
773 (ranges::end, ranges::size): Likewise. Make unbounded arrays
774 ill-formed.
775 (ranges::rbegin, ranges::rend): Only use ADL for classes and enums.
776 Reformat _S_noexcept() functions to mirror operator() structure.
777 * testsuite/std/ranges/access/begin.cc: Check incomplete array.
778 * testsuite/std/ranges/access/end_neg.cc: New test.
779 * testsuite/std/ranges/access/size.cc: Check array of incomplete type.
780 * testsuite/std/ranges/access/size_neg.cc: New test.
781
164abd67
JW
782 * testsuite/24_iterators/range_access*.cc: Move to ...
783 * testsuite/24_iterators/range_access/range_access*.cc: ... here.
784 * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc: New
785 test.
786
5211593c
JW
7872019-10-30 Jonathan Wakely <jwakely@redhat.com>
788
ce001b30
JW
789 * include/std/concepts (std::ranges::swap): Use a single overload for
790 the non-array cases, and switch using if-constexpr.
791
41167956
JW
792 * include/bits/stl_iterator.h (__normal_iterator::iterator_concept):
793 Guard with __cpp_lib_concepts macro.
794
0d58d88d
JW
795 * include/std/bit (__cpp_lib_bitops): Define.
796 * include/std/version (__cpp_lib_constexpr): Remove.
797 (__cpp_lib_bitops, __cpp_lib_constexpr_dynamic_alloc): Define.
798 * testsuite/26_numerics/bit/header.cc: New test.
799 * testsuite/26_numerics/bit/header-2.cc: New test.
800 * testsuite/20_util/allocator_traits/header.cc: New test.
801 * testsuite/20_util/allocator_traits/header-2.cc: New test.
802
d03eca30
JW
803 * include/bits/stl_iterator.h (namespace __gnu_cxx): Remove
804 using-declarations for std::iterator and std::iterator_traits.
805 (__gnu_cxx::__normal_iterator): Qualify iterator_traits.
806 * include/ext/algorithm (namespace __gnu_cxx): Remove
807 using-declarations for std names and qualify those names when used.
808 Also refer to std::min in parentheses to protect against function-like
809 macros.
810 * include/ext/rc_string_base.h: Qualify iterator_traits.
811 * include/ext/sso_string_base.h: Qualify iterator_traits.
812
9aeb3bef
JW
813 PR libstdc++/92272
814 * include/bits/stl_bvector.h (_Bit_iterator::pointer)
815 (_Bit_const_iterator::pointer): Define as void for C++20.
816 * include/bits/stl_iterator.h (reverse_iterator::operator->()): Add
817 constraints for C++20.
818 (__normal_iterator::iterator_concept): Define for C++20.
819 * include/bits/streambuf_iterator.h (istreambuf_iterator::pointer):
820 Define as void for C++20.
821 (ostreambuf_iterator::difference_type): Define as ptrdiff_t for C++20.
822 (ostreambuf_iterator::ostreambuf_iterator()): Add default constructor
823 for C++20.
824 * testsuite/23_containers/vector/bool/iterator_c++20.cc: New test.
825 * testsuite/24_iterators/bidirectional/concept.cc: New test.
826 * testsuite/24_iterators/bidirectional/tag.cc: New test.
827 * testsuite/24_iterators/contiguous/concept.cc: New test.
828 * testsuite/24_iterators/contiguous/tag.cc: New test.
829 * testsuite/24_iterators/forward/concept.cc: New test.
830 * testsuite/24_iterators/forward/tag.cc: New test.
831 * testsuite/24_iterators/input/concept.cc: New test.
832 * testsuite/24_iterators/input/tag.cc: New test.
833 * testsuite/24_iterators/istreambuf_iterator/requirements/typedefs.cc:
834 New test.
835 * testsuite/24_iterators/ostreambuf_iterator/requirements/typedefs.cc:
836 New test.
837 * testsuite/24_iterators/output/concept.cc: New test.
838 * testsuite/24_iterators/output/tag.cc: New test.
839 * testsuite/24_iterators/random_access/concept.cc: New test.
840 * testsuite/24_iterators/random_access/tag.cc: New test.
841 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: New
842 test.
843 * testsuite/24_iterators/random_access_iterator/26020.cc: Move to ...
844 * testsuite/24_iterators/operations/26020.cc: ... here.
845 * testsuite/24_iterators/random_access_iterator/
846 string_vector_iterators.cc: Move to ...
847 * testsuite/24_iterators/random_access/string_vector_iterators.cc: ...
848 here.
849
5211593c
JW
850 * testsuite/util/testsuite_iterators.h: Fix typo in __cplusplus check.
851
0ed4d408
JW
8522019-10-29 Jonathan Wakely <jwakely@redhat.com>
853
6cd96bad
JW
854 * include/bits/range_access.h (ranges::disable_sized_range)
855 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
856 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
857 (ranges::size, ranges::empty, ranges::data, ranges::cdata)
858 (ranges::range, ranges::sized_range, ranges::advance, ranges::distance)
859 (ranges::next, ranges::prev): Guard with __cpp_lib_concepts.
860 * include/bits/stl_iterator.h (disable_sized_sentinel): Likewise.
861
540218dd
JW
862 * include/bits/alloc_traits.h (__cpp_lib_constexpr_dynamic_alloc):
863 Define.
864 (allocator_traits::_S_construct, allocator_traits::_S_destroy)
865 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use
866 _GLIBCXX14_CONSTEXPR instead of constexpr.
867 * include/bits/stl_construct.h (_Destroy): Likewise.
868
6d0dff49
JW
869 * include/Makefile.am: Add new header.
870 * include/Makefile.in: Regenerate.
871 * include/bits/iterator_concepts.h: New header.
872 (contiguous_iterator_tag, iter_reference_t, ranges::iter_move)
873 (iter_rvalue_reference_t, incrementable_traits, iter_difference_t)
874 (readable_traits, iter_value_t, readable, iter_common_reference_t)
875 (writable, waekly_incrementable, incrementable)
876 (input_or_output_iterator, sentinel_for, disable_sized_sentinel)
877 (sized_sentinel_for, input_iterator, output_iterator)
878 (forward_iterator, bidirectional_iterator, random_access_iterator)
879 (contiguous_iterator, indirectly_unary_invocable)
880 (indirectly_regular_unary_invocable, indirect_unary_predicate)
881 (indirect_relation, indirect_strict_weak_order, indirect_result_t)
882 (projected, indirectly_movable, indirectly_movable_storable)
883 (indirectly_copyable, indirectly_copyable_storable, ranges::iter_swap)
884 (indirectly_swappable, indirectly_comparable, permutable, mergeable)
885 (sortable, unreachable_sentinel_t, unreachable_sentinel)
886 (default_sentinel_t, default_sentinel): Define.
887 (__detail::__cpp17_iterator, __detail::__cpp17_input_iterator)
888 (__detail::__cpp17_fwd_iterator, __detail::__cpp17_bidi_iterator)
889 (__detail::__cpp17_randacc_iterator): Define.
890 (__iterator_traits): Define constrained specializations.
891 * include/bits/move.h (move): Only use old concept check for C++98.
892 * include/bits/range_access.h (ranges::disable_sized_range)
893 (ranges::begin, ranges::end, ranges::cbegin, ranges::cend)
894 (ranges::rbegin, ranges::rend, ranges::crbegin, ranges::crend)
895 (ranges::size, ranges::empty, ranges::data, ranges::cdata): Define
896 new customization points for C++20.
897 (ranges::range, ranges::sized_range): Define new concepts for C++20.
898 (ranges::advance, ranges::distance, ranges::next, ranges::prev):
899 Define new functions for C++20.
900 (__adl_end, __adl_cdata, __adl_cbegin, __adl_cend, __adl_rbegin)
901 (__adl_rend, __adl_crbegin, __adl_crend, __adl_cdata, __adl_size)
902 (__adl_empty): Remove.
903 * include/bits/stl_iterator.h (disable_sized_sentinel): Specialize
904 for reverse_iterator.
905 * include/bits/stl_iterator_base_types.h (contiguous_iterator_tag):
906 Define new struct for C++20.
907 (iterator_traits<_Tp*>): Constrain partial specialization in C++20.
908 * include/std/concepts (__is_class_or_enum): Move to __detail
909 namespace.
910 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error line number.
911 * testsuite/20_util/forward/f_neg.cc: Likewise.
912 * testsuite/24_iterators/associated_types/incrementable.traits.cc: New
913 test.
914 * testsuite/24_iterators/associated_types/readable.traits.cc: New test.
915 * testsuite/24_iterators/contiguous/concept.cc: New test.
916 * testsuite/24_iterators/contiguous/tag.cc: New test.
917 * testsuite/24_iterators/customization_points/iter_move.cc: New test.
918 * testsuite/24_iterators/customization_points/iter_swap.cc: New test.
919 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: New test.
920 * testsuite/24_iterators/range_operations/advance.cc: New test.
921 * testsuite/24_iterators/range_operations/distance.cc: New test.
922 * testsuite/24_iterators/range_operations/next.cc: New test.
923 * testsuite/24_iterators/range_operations/prev.cc: New test.
924 * testsuite/26_numerics/adjacent_difference/requirements/
925 explicit_instantiation/2.cc: Rename types that conflict with C++20
926 concepts.
927 * testsuite/26_numerics/adjacent_difference/requirements/
928 explicit_instantiation/pod.cc: Likewise.
929 * testsuite/26_numerics/partial_sum/requirements/
930 explicit_instantiation/2.cc: Likewise.
931 * testsuite/26_numerics/partial_sum/requirements/
932 explicit_instantiation/pod.cc: Likewise.
933 * testsuite/experimental/iterator/requirements.cc: Likewise.
934 * testsuite/std/ranges/access/begin.cc: New test.
935 * testsuite/std/ranges/access/cbegin.cc: New test.
936 * testsuite/std/ranges/access/cdata.cc: New test.
937 * testsuite/std/ranges/access/cend.cc: New test.
938 * testsuite/std/ranges/access/crbegin.cc: New test.
939 * testsuite/std/ranges/access/crend.cc: New test.
940 * testsuite/std/ranges/access/data.cc: New test.
941 * testsuite/std/ranges/access/empty.cc: New test.
942 * testsuite/std/ranges/access/end.cc: New test.
943 * testsuite/std/ranges/access/rbegin.cc: New test.
944 * testsuite/std/ranges/access/rend.cc: New test.
945 * testsuite/std/ranges/access/size.cc: New test.
946 * testsuite/util/testsuite_iterators.h (contiguous_iterator_wrapper)
947 (test_range, test_sized_range): New test utilities.
948
9921ac3d
JW
949 * testsuite/util/testsuite_iterators.h (BoundsContainer::size()): Add
950 new member function.
951 (WritableObject::operator=): Constrain with enable_if when available.
952 (remove_cv): Use std::remove_if when available.
953 (test_container::it(int)): Use size().
954 (test_container::size()): Use BoundsContainer::size().
955
0ed4d408
JW
956 PR libstdc++/92267
957 * include/bits/stl_deque.h (_Deque_iterator(const _Deque_iterator&)):
958 Do not define as defaulted.
959 * testsuite/23_containers/deque/types/92267.cc: New test.
960
c61f8150
GP
9612019-10-26 Gerald Pfeifer <gerald@pfeifer.com>
962
963 * doc/xml/manual/codecvt.xml: Switch pubs.opengroup.org to https.
964 * doc/xml/manual/locale.xml (LC_ALL): Ditto.
965 * doc/xml/manual/messages.xml: Ditto.
af4e8d4d 966
65ab2a54
JDA
9672019-10-26 John David Anglin <danglin@gcc.gnu.org>
968
969 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
970
f4568f03
JW
9712019-10-25 Jonathan Wakely <jwakely@redhat.com>
972
0a70fb87
JW
973 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper)
974 (input_iterator_wrapper, forward_iterator_wrapper)
975 bidirectional_iterator_wrapper, random_access_iterator_wrapper): Remove
976 user-provided copy constructors and copy assignment operators so they
977 are defined implicitly.
978 (input_iterator_wrapper): Initialize members in default constructor.
979 (forward_iterator_wrapper): Remove assignments to members of base.
980
eadcde8e
JW
981 * include/bits/allocator.h: Check __cpp_constexpr_dynamic_alloc
982 before making the std::allocator destructor constexpr.
983 * testsuite/20_util/allocator/requirements/constexpr.cc: New test.
984
f4568f03
JW
985 * include/bits/range_cmp.h: Check __cpp_lib_concepts before defining
986 concepts. Fix comment.
eadcde8e 987 * include/bits/allocator.h
f4568f03 988
19dc1c31
GP
9892019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
990
a0f9baa2
GP
991 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
992 pubs.opengroup.org to https.
993
9942019-10-25 Gerald Pfeifer <gerald@pfeifer.com>
af4e8d4d 995
19dc1c31
GP
996 * doc/xml/gnu/gpl-3.0.xml: Switch www.gnu.org to https.
997
d57ebc34
ESR
9982019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
999
1000 * doc/xml/manual/status_cxx2020.xml: Add rows and update status.
1001
bbf0495d
JW
10022019-10-24 Jonathan Wakely <jwakely@redhat.com>
1003
75c6a925
JW
1004 * include/bits/allocator.h (allocator<void>): Restore the explicit
1005 specialization for C++20, but make its API consistent with the primary
1006 template.
1007 (allocator::~allocator()): Restore the destructor for C++20, but make
1008 it constexpr.
1009 * testsuite/20_util/allocator/rebind_c++20.cc: Check allocator<void>.
1010 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: Likewise.
1011 * testsuite/20_util/allocator/void.cc: Check that constructors and
1012 destructors are trivial. Check for converting constructor in C++20.
1013 * testsuite/ext/malloc_allocator/variadic_construct.cc: Simplify
1014 dejagnu target selector.
1015 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
1016
5ce55f3f
JW
1017 * include/experimental/executor (__use_future_ct, use_future_t):
1018 Define partial specializations for std::allocator.
1019 (__use_future_ch): Overload constructor for completion tokens using
1020 std::allocator.
1021
02819d39
JW
1022 PR libstdc++/88338 Implement P0898R3, C++20 concepts library
1023 * doc/xml/manual/status_cxx2020.xml: Update status.
1024 * doc/html/*: Regenerate.
1025 * testsuite/std/concepts/1.cc: New test.
1026 * testsuite/std/concepts/2.cc: New test.
1027
bbf0495d
JW
1028 * include/bits/random.h (uniform_random_bit_generator): Define for
1029 C++20.
1030 * testsuite/26_numerics/random/concept.cc: New test.
1031 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
1032
603aec67
JW
10332019-10-23 Jonathan Wakely <jwakely@redhat.com>
1034
6d188e4f
JW
1035 * include/std/functional (invoke): Add constexpr for C++20.
1036 * include/std/version (__cpp_lib_constexpr_invoke): Define.
1037 * testsuite/20_util/function_objects/invoke/constexpr.cc: New test.
1038
85f24114
JW
1039 PR c++/91369 Implement P0784R7 changes to allocation and construction
1040 * include/bits/alloc_traits.h: Include <bits/stl_construct.h>.
1041 (allocator_traits::_S_allocate, allocator_traits::_S_construct)
1042 (allocator_traits::_S_destroy, allocator_traits::_S_max_size)
1043 (allocator_traits::_S_select, allocator_traits::allocate)
1044 (allocator_traits::deallocate, allocator_traits::construct)
1045 (allocator_traits::destroy, allocator_traits::max_size)
1046 (allocator_traits::select_on_container_copy_construction)
1047 (allocator_traits<allocator<T>>): Add constexpr specifier for C++20.
1048 (allocator_traits<allocator<T>>::construct): Use construct_at.
1049 (allocator_traits<allocator<T>>::destroy): Use destroy_at.
1050 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Add constexpr
1051 specifier.
1052 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
1053 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move here
1054 from <bits/stl_construct.h>.
1055 * include/bits/allocator.h (allocator::~allocator): Remove for C++20.
1056 (allocator::allocate, allocate::deallocate): Define for C++20 and up.
1057 (operator==, operator!=): Add constexpr specifier for C++20.
1058 * include/bits/stl_construct.h: Don't include <ext/alloc_traits.h>.
1059 (destroy_at): For C++20 add constexpr specifier and support for
1060 destroying arrays.
1061 (construct_at): Define new function for C++20.
1062 (_Construct): Return result of placement new-expression. For C++11 and
1063 up add constexpr. For C++20 dispatch to std::construct_at during
1064 constant evaluation.
1065 (_Destroy(pointer)): Add constexpr specifier. For C++20 dispatch to
1066 std::destroy_at during constant evaluation.
1067 (_Destroy_aux::__destroy, _Destroy_n_aux::__destroy_n): Add constexpr
1068 specifier for C++20.
1069 (_Destroy(ForwardIterator, ForwardIterator))
1070 (_Destroy(ForwardIterator, Size)): Likewise. Do not elide trivial
1071 destructors during constant evaluation.
1072 (destroy, destroy_n): Add constexpr specifier for C++20.
1073 (_Destroy(ForwardIterator, ForwardIterator, Alloc&))
1074 (_Destroy(ForwardIterator, ForwardIterator, allocator<T>&)): Move to
1075 <bits/alloc_traits.h>, to remove dependency on allocators.
1076 * include/bits/stl_uninitialized.h: Include <ext/alloc_traits.h>.
1077 Include <bits/stl_pair.h> instead of <utility>.
1078 * include/ext/alloc_traits.h: Always include <bits/alloc_traits.h>.
1079 (__alloc_traits::construct, __alloc_traits::destroy)
1080 (__alloc_traits::_S_select_on_copy, __alloc_traits::_S_on_swap): Add
1081 constexpr specifier.
1082 * include/ext/malloc_allocator.h (operator==, operator!=): Add
1083 constexpr specifier for C++20.
1084 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
1085 * testsuite/20_util/headers/memory/synopsis.cc: Add constexpr.
1086 * testsuite/20_util/scoped_allocator/69293_neg.cc: Ignore additional
1087 errors due to constexpr function called after failed static_assert.
1088 * testsuite/20_util/specialized_algorithms/construct_at/1.cc: New test.
1089 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
1090 Ignore additional errors due to constexpr function called after failed
1091 static_assert.
1092 * testsuite/23_containers/vector/cons/destructible_neg.cc: Likewise.
1093
161c3bf9
JW
1094 * testsuite/20_util/bind/91371.cc: Fix test to compile as C++11.
1095
30a761c4
JW
1096 * include/debug/helper_functions.h (__valid_range): Change
1097 _GLIBCXX_CONSTEXPR to _GLIBCXX14_CONSTEXPR.
1098
84a2f4b3
JW
1099 * include/ext/throw_allocator.h (throw_allocator_base): Qualify
1100 size_t and ptrdiff_t.
1101
ec541f1b
JW
1102 * include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp:
1103 Use detail::rebind_traits.
1104 * include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp:
1105 Likewise.
1106 * include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Likewise.
1107 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Likewise.
1108 * include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Likewise.
1109 * include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Likewise.
1110 * include/ext/pb_ds/detail/binary_heap_/point_const_iterator.hpp:
1111 Likewise.
1112 * include/ext/pb_ds/detail/binomial_heap_base_/binomial_heap_base_.hpp:
1113 Likewise.
1114 * include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: Likewise.
1115 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Likewise.
1116 * include/ext/pb_ds/detail/cond_dealtor.hpp: Likewise.
1117 * include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp (has_eq_fn): Likewise.
1118 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Likewise.
1119 * include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Likewise.
1120 * include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Likewise.
1121 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1122 left_child_next_sibling_heap_.hpp: Likewise.
1123 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/node.hpp:
1124 Likewise.
1125 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
1126 point_const_iterator.hpp: Likewise.
1127 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Likewise.
1128 * include/ext/pb_ds/detail/ov_tree_map_/
1129 constructors_destructor_fn_imps.hpp: Likewise.
1130 * include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Likewise.
1131 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Likewise.
1132 * include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Likewise.
1133 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Likewise.
1134 * include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Likewise.
1135 * include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Likewise.
1136 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Likewise.
1137 * include/ext/pb_ds/detail/splay_tree_/node.hpp: Likewise.
1138 * include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Likewise.
1139 * include/ext/pb_ds/detail/trie_policy/sample_trie_access_traits.hpp:
1140 Likewise.
1141 * include/ext/pb_ds/detail/type_utils.hpp: Fix typo in comment.
1142 * include/ext/pb_ds/detail/types_traits.hpp (stored_value): Add
1143 bool parameter to control whether the hash value is stored.
1144 (select_base_type): New class template and partial specialization.
1145 (maybe_null_type): Likewise.
1146 (rebind_traits): New class template.
1147 (type_base): Remove four nearly identical specializations.
1148 (type_dispatch): Remove.
1149 (type_traits): Use select_base_type and maybe_null_type instead of
1150 type_base to control differences between specializations.
1151 * include/ext/pb_ds/list_update_policy.hpp: Use detail::rebind_traits.
1152 * include/ext/pb_ds/priority_queue.hpp: Likewise.
1153 * include/ext/pb_ds/tree_policy.hpp: Likewise.
1154 * include/ext/pb_ds/trie_policy.hpp: Likewise.
1155
603aec67
JW
1156 * include/backward/hash_set (hash_set): Use __alloc_traits.
1157 * include/backward/hashtable.h (_Hashtable): Likewise.
1158 * include/ext/alloc_traits.h (__alloc_traits::allocate): Add overload
1159 taking a hint.
1160 * include/ext/extptr_allocator.h (_ExtPtr_allocator::allocate): Ignore
1161 hint.
1162 * include/ext/slist (_Slist_base): Use __alloc_traits.
1163 * include/tr1/hashtable.h (_Hashtable): Likewise.
1164 * include/tr1/regex (match_results): Use vector::const_reference
1165 instead of assuming the allocator defines it.
1166 * testsuite/backward/hash_map/23528.cc: Use allocator_traits in C++11.
1167 * testsuite/tr1/6_containers/unordered_map/capacity/29134-map.cc: Use
1168 __gnu_test::max_size.
1169 * testsuite/tr1/6_containers/unordered_multimap/capacity/
1170 29134-multimap.cc: Likewise.
1171 * testsuite/tr1/6_containers/unordered_multiset/capacity/
1172 29134-multiset.cc: Likewise.
1173 * testsuite/tr1/6_containers/unordered_set/capacity/29134-set.cc:
1174 Likewise.
1175
2cae56bd
JW
11762019-10-22 Jonathan Wakely <jwakely@redhat.com>
1177
4190b7f1
JW
1178 * testsuite/util/testsuite_abi.h: Restore use of tr1/unordered_map
1179 when compiled as C++98.
1180
9e1f9bc5
JW
1181 * include/bits/memoryfwd.h (uses_allocator): Do not declare for C++98.
1182 * testsuite/17_intro/names.cc: Check uses_allocator in C++98.
1183
2cae56bd
JW
1184 * include/bits/alloc_traits.h
1185 (allocator_traits<allocator<T>>::allocate): Ignore hint for C++20.
1186 (allocator_traits<allocator<T>>::construct): Perform placement new
1187 directly for C++20, instead of calling allocator<T>::construct.
1188 (allocator_traits<allocator<T>>::destroy): Call destructor directly
1189 for C++20, instead of calling allocator<T>::destroy.
1190 (allocator_traits<allocator<T>>::max_size): Return value directly
1191 for C++20, instead of calling std::allocator<T>::max_size().
1192 (__do_alloc_on_copy, __do_alloc_on_move, __do_alloc_on_swap): Do not
1193 define for C++17 and up.
1194 (__alloc_on_copy, __alloc_on_move, __alloc_on_swap): Use if-constexpr
1195 for C++17 and up, instead of tag dispatching.
1196 * include/bits/allocator.h (allocator<void>): Remove for C++20.
1197 (allocator::pointer, allocator::const_pointer, allocator::reference)
1198 (allocator::const_reference, allocator::rebind): Remove for C++20.
1199 * include/bits/basic_string.h (basic_string): Use __alloc_traits to
1200 rebind allocator.
1201 * include/bits/memoryfwd.h (allocator<void>): Remove for C++20.
1202 * include/ext/debug_allocator.h: Use __alloc_traits for rebinding.
1203 * include/ext/malloc_allocator.h (malloc_allocator::~malloc_allocator)
1204 (malloc_allocator::pointer, malloc_allocator::const_pointer)
1205 (malloc_allocator::reference, malloc_allocator::const_reference)
1206 (malloc_allocator::rebind, malloc_allocator::max_size)
1207 (malloc_allocator::construct, malloc_allocator::destroy): Do not
1208 define for C++20.
1209 (malloc_allocator::_M_max_size): Define new function.
1210 * include/ext/new_allocator.h (new_allocator::~new_allocator)
1211 (new_allocator::pointer, new_allocator::const_pointer)
1212 (new_allocator::reference, new_allocator::const_reference)
1213 (new_allocator::rebind, new_allocator::max_size)
1214 (new_allocator::construct, new_allocator::destroy): Do not
1215 define for C++20.
1216 (new_allocator::_M_max_size): Define new function.
1217 * include/ext/rc_string_base.h (__rc_string_base::_Rep): Use
1218 __alloc_traits to rebind allocator.
1219 * include/ext/rope (_Rope_rep_base, _Rope_base): Likewise.
1220 (rope::rope(CharT, const allocator_type&)): Use __alloc_traits
1221 to construct character.
1222 * include/ext/slist (_Slist_base): Use __alloc_traits to rebind
1223 allocator.
1224 * include/ext/sso_string_base.h (__sso_string_base::_M_max_size):
1225 Use __alloc_traits.
1226 * include/ext/throw_allocator.h (throw_allocator): Do not use optional
1227 members of std::allocator, use __alloc_traits members instead.
1228 * include/ext/vstring.h (__versa_string): Use __alloc_traits.
1229 * include/ext/vstring_util.h (__vstring_utility): Likewise.
1230 * include/std/memory: Include <bits/alloc_traits.h>.
1231 * testsuite/20_util/allocator/8230.cc: Use __gnu_test::max_size.
1232 * testsuite/20_util/allocator/rebind_c++20.cc: New test.
1233 * testsuite/20_util/allocator/requirements/typedefs.cc: Do not check
1234 for pointer, const_pointer, reference, const_reference or rebind in
1235 C++20.
1236 * testsuite/20_util/allocator/requirements/typedefs_c++20.cc: New test.
1237 * testsuite/23_containers/deque/capacity/29134.cc: Use
1238 __gnu_test::max_size.
1239 * testsuite/23_containers/forward_list/capacity/1.cc: Likewise.
1240 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
1241 * testsuite/23_containers/map/capacity/29134.cc: Likewise.
1242 * testsuite/23_containers/multimap/capacity/29134.cc: Likewise.
1243 * testsuite/23_containers/multiset/capacity/29134.cc: Likewise.
1244 * testsuite/23_containers/set/capacity/29134.cc: Likewise.
1245 * testsuite/23_containers/vector/capacity/29134.cc: Likewise.
1246 * testsuite/ext/malloc_allocator/variadic_construct.cc: Do not run
1247 test for C++20.
1248 * testsuite/ext/new_allocator/variadic_construct.cc: Likewise.
1249 * testsuite/ext/vstring/capacity/29134.cc: Use __gnu_test::max_size.
1250 * testsuite/util/replacement_memory_operators.h: Do not assume
1251 Alloc::pointer exists.
1252 * testsuite/util/testsuite_allocator.h (__gnu_test::max_size): Define
1253 helper to call max_size for any allocator.
1254
eefb1290
AS
12552019-10-22 Andreas Schwab <schwab@suse.de>
1256
1257 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1258
7e4b7d7b
JW
12592019-10-18 Jonathan Wakely <jwakely@redhat.com>
1260
15abd932
JW
1261 PR libstdc++/92143
1262 * libsupc++/new_opa.cc (operator new) [__APPLE__]: Increase alignment
1263 to at least sizeof(void*).
1264
7e4b7d7b
JW
1265 * include/bits/range_cmp.h (ranges::less::operator()): Inline the
1266 logic from std::less::operator() to remove the dependency on it.
1267
47519a56
JW
12682019-10-17 Jonathan Wakely <jwakely@redhat.com>
1269
1a456495
JW
1270 * doc/doxygen/user.cfg.in (INPUT): Add new C++17 and C++20 headers.
1271
da8ddcec
JW
1272 * include/Makefile.am: Add new header.
1273 * include/Makefile.in: Regenerate.
1274 * include/bits/range_cmp.h: New header for C++20 function objects.
1275 * include/std/functional: Include new header.
1276 * testsuite/20_util/function_objects/identity/1.cc: New test.
1277 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: New test.
1278 * testsuite/20_util/function_objects/range.cmp/greater.cc: New test.
1279 * testsuite/20_util/function_objects/range.cmp/greater_equal.cc: New
1280 test.
1281 * testsuite/20_util/function_objects/range.cmp/less.cc: New test.
1282 * testsuite/20_util/function_objects/range.cmp/less_equal.cc: New test.
1283 * testsuite/20_util/function_objects/range.cmp/not_equal_to.cc: New
1284 test.
1285
47519a56
JW
1286 PR libstdc++/92124
1287 * include/bits/forward_list.h
1288 (_M_move_assign(forward_list&&, false_type)): Do not use
1289 __make_move_if_noexcept, instead move unconditionally.
1290 * include/bits/stl_deque.h (_M_move_assign2(deque&&, false_type)):
1291 Likewise.
1292 * include/bits/stl_list.h (_M_move_assign(list&&, false_type)):
1293 Likewise.
1294 * include/bits/stl_vector.h (_M_move_assign(vector&&, false_type)):
1295 Likewise.
1296 * testsuite/23_containers/vector/92124.cc: New test.
1297
44af818f
JW
12982019-10-16 Jonathan Wakely <jwakely@redhat.com>
1299
1300 * include/bits/c++config (_GLIBCXX_BUILTIN_IS_SAME_AS): Define to
1301 one of __is_same_as or __is_same when available.
1302 * include/std/concepts (__detail::__same_as): Use std::is_same_v.
1303 * include/std/type_traits (is_same) [_GLIBCXX_BUILTIN_IS_SAME_AS]:
1304 Use new macro instead of __is_same_as.
1305 (is_same) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Restore partial
1306 specialization.
1307 (is_same_v) [_GLIBCXX_BUILTIN_IS_SAME_AS]: Use new macro.
1308 (is_same_v) [!_GLIBCXX_BUILTIN_IS_SAME_AS]: Use std::is_same.
1309
8cf9bbd2
FD
13102019-10-16 François Dumont <fdumont@gcc.gnu.org>
1311
1312 * src/c++11/debug.cc (print_field): Replace constness_names <unknown>
1313 entry with <unknown constness>. Replace state_names <unknown> entry with
1314 <unknown state>.
1315
2bf2dacb
JW
13162019-10-11 Jonathan Wakely <jwakely@redhat.com>
1317
cfc219ae
JW
1318 * include/Makefile.am: Add new header.
1319 * include/Makefile.in: Regenerate.
1320 * include/precompiled/stdc++.h: Include <concepts>.
1321 * include/std/concepts: New header for C++20.
1322 * include/std/version (__cpp_lib_concepts): Define.
1323 * scripts/create_testsuite_files: Look for test files in new std
1324 directory.
1325 * testsuite/libstdc++-dg/conformance.exp: Likewise.
1326 * testsuite/std/concepts/concepts.callable/invocable.cc: New test.
1327 * testsuite/std/concepts/concepts.callable/regular_invocable.cc: New
1328 test.
1329 * testsuite/std/concepts/concepts.callable/relation.cc: New test.
1330 * testsuite/std/concepts/concepts.callable/strictweakorder.cc: New
1331 test.
1332 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
1333 floating_point.cc: New test.
1334 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
1335 New test.
1336 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
1337 signed_integral.cc: New test.
1338 * testsuite/std/concepts/concepts.lang/concept.arithmetic/
1339 unsigned_integral.cc: New test.
1340 * testsuite/std/concepts/concepts.lang/concept.assignable/1.cc: New
1341 test.
1342 * testsuite/std/concepts/concepts.lang/concept.common/1.cc: New test.
1343 * testsuite/std/concepts/concepts.lang/concept.commonref/1.cc: New
1344 test.
1345 * testsuite/std/concepts/concepts.lang/concept.constructible/1.cc:
1346 New test.
1347 * testsuite/std/concepts/concepts.lang/concept.convertible/1.cc:
1348 New test.
1349 * testsuite/std/concepts/concepts.lang/concept.copyconstructible/1.cc:
1350 New test.
1351 * testsuite/std/concepts/concepts.lang/concept.defaultconstructible/
1352 1.cc: New test.
1353 * testsuite/std/concepts/concepts.lang/concept.derived/1.cc:
1354 New test.
1355 * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
1356 New test.
1357 * testsuite/std/concepts/concepts.lang/concept.moveconstructible/1.cc:
1358 New test.
1359 * testsuite/std/concepts/concepts.lang/concept.same/1.cc:
1360 New test.
1361 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
1362 New test.
1363 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
1364 New test.
1365 * testsuite/std/concepts/concepts.lang/concept.swappable/
1366 swappable_with.cc: New test.
1367 * testsuite/std/concepts/concepts.object/copyable.cc: New test.
1368 * testsuite/std/concepts/concepts.object/movable.cc: New test.
1369 * testsuite/std/concepts/concepts.object/regular.cc: New test.
1370 * testsuite/std/concepts/concepts.object/semiregular.cc: New test.
1371
02f6fdff
JW
1372 * include/std/type_traits (is_same): Replace partial specialization
1373 by using __is_same_as built-in in primary template.
1374 (is_same_v): Use __is_same_as built-in instead of instantiating the
1375 is_same trait.
1376
07758d90
JW
1377 PR libstdc++/92059
1378 * include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
1379 special member functions as defaulted. Add noexcept to most members.
1380 (__dynamic_bitset_base(size_t, unsigned long long, const _Alloc&)):
1381 Mask off unwanted bits in the __val parameter. Avoid undefined left
1382 shifts.
1383 (__dynamic_bitset_base::_M_assign): Remove.
1384 (__dynamic_bitset_base::_M_do_reset): Use std::fill.
1385 (__dynamic_bitset_base::_M_are_all_aux): Avoid integer promotion when
1386 block_type has lower rank than int.
1387 (dynamic_bitset): Add noexcept to most members. Use injected-class-name
1388 in return types and parameter types.
1389 (dynamic_bitset::_M_Nb): Add default member initializer.
1390 (dynamic_bitset(), dynamic_bitset(const dynamic_bitset&)): Define as
1391 defaulted.
1392 (dynamic_bitset(dynamic_bitset&&)): Clear source object after move.
1393 (dynamic_bitset::operator=(const dynamic_bitset&)): Define as
1394 defaulted.
1395 (dynamic_bitset::operator=(dynamic_bitset&&)): Add noexcept-specifier.
1396 Define without using swap, to propagate allocator correctly.
1397 (dynamic_bitset(const char*, const _Alloc&)): Use strlen.
1398 (dynamic_bitset::_M_do_sanitize, dynamic_bitset::_M_do_fill): Use
1399 casts to avoid unwanted integer promotions.
1400 (dynamic_bitset::_M_copy_from_ptr): Rearrange template parameters and
1401 add default template arguments and default argument to simplify usage.
1402 (dynamic_bitset::_M_copy_from_string): Adjust call to _M_copy_from_ptr.
1403 (operator==(const dynamic_bitset&, const dynamic_bitset&))
1404 (operator<(const dynamic_bitset&, const dynamic_bitset&)): Use _M_Nb.
1405 * include/tr2/dynamic_bitset.tcc (dynamic_bitset::_M_copy_from_ptr):
1406 Adjust template parameters to match declaration.
1407 * testsuite/tr2/dynamic_bitset/cmp.cc: New test.
1408 * testsuite/tr2/dynamic_bitset/cons.cc: New test.
1409 * testsuite/tr2/dynamic_bitset/copy.cc: New test.
1410 * testsuite/tr2/dynamic_bitset/move.cc: New test.
1411 * testsuite/tr2/dynamic_bitset/pr92059.cc: New test.
1412
2bf2dacb
JW
1413 * include/bits/charconv.h (__to_chars_len): Avoid -Wsign-compare
1414 warnings.
1415
9cfc400f
JW
14162019-10-10 Jonathan Wakely <jwakely@redhat.com>
1417
1418 PR libstdc++/91057
1419 * src/c++98/locale.cc [_GLIBCXX_LONG_DOUBLE_COMPAT]
1420 (find_ldbl_sync_facet): Fix parameter type and missing return.
1421
89e0a492
MP
14222019-10-09 Marek Polacek <polacek@redhat.com>
1423
1424 PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound.
1425 PR c++/69531 - DR 1307: Differently bounded array parameters.
1426 PR c++/88128 - DR 330: Qual convs and pointers to arrays of pointers.
1427 * testsuite/23_containers/span/lwg3255.cc: Adjust test to match the
1428 post-P0388R4 behavior.
1429
531b0a31
JW
14302019-10-09 Jonathan Wakely <jwakely@redhat.com>
1431
cc386cf2
JW
1432 PR libstdc++/91057
1433 * src/c++98/locale.cc (locale::id::_M_id()) [__GTHREADS]: Use atomic
1434 compare-exchange or double-checked lock to ensure only one thread sets
1435 the _M_index variable.
1436 [_GLIBCXX_LONG_DOUBLE_COMPAT]: Call find_ldbl_sync_facet to detect
1437 facets that share another facet's ID.
1438 [_GLIBCXX_LONG_DOUBLE_COMPAT] (find_ldbl_sync_facet): New function.
1439
531b0a31
JW
1440 PR libstdc++/78552
1441 * src/c++98/locale_init.cc (locale::classic()): Do not construct a new
1442 locale object for every call.
1443 (locale::_S_initialize_once()): Construct C locale here.
1444
db4fd465
JW
14452019-10-08 Jonathan Wakely <jwakely@redhat.com>
1446
07f37a7f
JW
1447 * doc/Makefile.am (doc-html-docbook-regenerate): New target.
1448 (${docbook_outdir}/html): Do not create unused 'html/ext' directory.
1449 * doc/Makefile.in: Regenerate.
1450 * doc/xml/manual/documentation_hacking.xml: Document new target.
1451 * doc/html/*: Regenerate.
1452
db4fd465
JW
1453 * doc/xml/manual/allocator.xml: Use archived copy of CUJ article.
1454 * doc/html/*: Regenerate.
1455
2c637422
FD
14562019-10-06 François Dumont <fdumont@gcc.gnu.org>
1457
8ab38f6c
FD
1458 * include/bits/stl_algo.h
1459 (__copy_n_a(_IIte, _Size, _OIte)): New.
1460 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New declaration.
1461 (__copy_n(_IIte, _Size, _OIte, input_iterator_tag)): Adapt to use
1462 latter.
1463 * include/bits/streambuf_iterator.h (istreambuf_iterator<>): Declare
1464 std::__copy_n_a friend.
1465 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*)): New.
1466 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1.cc: New.
1467 * testsuite/25_algorithms/copy_n/istreambuf_iterator/1_neg.cc: New.
1468 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2_neg.cc: New.
1469
6e556303
FD
1470 * include/bits/stl_iterator_base_types.h (__iterator_category_t): Define
1471 for C++11.
1472 (_RequireInputIte): Likewise and use __enable_if_t.
1473 * include/std/numeric
1474 (__is_random_access_iter): Use __iterator_category_t.
1475
2c637422
FD
1476 * include/bits/stl_algo.h (copy_n): Add __glibcxx_requires_can_increment
1477 debug checks.
1478 * testsuite/25_algorithms/copy_n/debug/1_neg.cc: New.
1479 * testsuite/25_algorithms/copy_n/debug/2_neg.cc: New.
1480
36edf9ca
FD
14812019-10-04 François Dumont <fdumont@gcc.gnu.org>
1482
1483 * include/debug/forward_list
1484 (_Sequence_traits<__debug::forward_list<>>::_S_size): Returns __dp_sign
1485 distance when not empty.
1486 * include/debug/list (_Sequence_traits<__debug::list<>>::_S_size):
1487 Likewise.
1488 * include/debug/helper_functions.h (__dp_sign_max_size): New
1489 _Distance_precision enum entry.
1490 (__valid_range_aux(_IIte, _IIte, _Distance_traits<>::__type,
1491 __false_type)): Adapt.
1492 * include/debug/safe_iterator.tcc
1493 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator&)): Review
1494 distance computation.
1495
8384956a
JW
14962019-10-04 Jonathan Wakely <jwakely@redhat.com>
1497
2fc11587
JW
1498 PR libstdc++/81091
1499 PR libstdc++/91947
1500 * configure.ac: Use AC_SYS_LARGEFILE to enable 64-bit file APIs.
1501 * config.h.in: Regenerate:
1502 * configure: Regenerate:
1503 * include/Makefile.am (${host_builddir}/largefile-config.h): New
1504 target to generate config header for filesystem library.
1505 (${host_builddir}/c++config.h): Rename macros for large file support.
1506 * include/Makefile.in: Regenerate.
1507 * src/c++17/fs_dir.cc: Include new config header.
1508 * src/c++17/fs_ops.cc: Likewise.
1509 (filesystem::file_size): Use uintmax_t for size.
1510 * src/filesystem/dir.cc: Include new config header.
1511 * src/filesystem/ops.cc: Likewise.
1512 (experimental::filesystem::file_size): Use uintmax_t for size.
1513
0a789c10
JW
1514 * testsuite/util/testsuite_abi.h: Use std::unordered_map instead of
1515 std::tr1::unordered_map.
1516 * testsuite/util/testsuite_allocator.h: Likewise.
1517
3459c905
JW
1518 * include/tr1/hashtable.h: Add header for __gnu_cxx::__alloc_traits.
1519
44e4da65
JW
1520 * include/tr1/hashtable.h (tr1::_Hashtable::_M_allocate_node): Use
1521 __gnu_cxx::__alloc_traits for allocator construct function.
1522 (tr1::_Hashtable::_M_deallocate_node): Likewise for destroy function.
1523
8384956a
JW
1524 * include/precompiled/stdc++.h: Include <span> for C++20.
1525 * testsuite/17_intro/names.cc: Do not define 'e' for C++20.
1526
ebf8247e
RO
15272019-10-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1528
1529 * include/parallel/multiway_merge.h (_RAIter3): Replace _C by _Cp.
1530
709310e7
JW
15312019-10-02 Jonathan Wakely <jwakely@redhat.com>
1532
352d2690
JW
1533 * config/abi/pre/gnu.ver: Tighten up greedy wildcards.
1534
709310e7
JW
1535 * doc/xml/manual/parallel_mode.xml: Add caveat about support for
1536 recent standards.
1537 * doc/html/*: Regenerate.
1538
57766351
JW
15392019-10-01 Jonathan Wakely <jwakely@redhat.com>
1540
a16bc2f3
JW
1541 * include/experimental/algorithm (experimental::sample): Qualify call
1542 to __sample correctly.
1543 * include/parallel/algo.h (sample, for_each_n): Add using-declarations
1544 for algorithms that don't have parallel implementations.
1545
e12097ed
JW
1546 * include/parallel/algobase.h (equal, lexicographical_compare): Add
1547 _GLIBCXX20_CONSTEXPR and dispatch to sequential algorithm when being
1548 constant evaluated.
1549 * include/parallel/algorithmfwd.h (equal, lexicographical_compare):
1550 Add _GLIBCXX20_CONSTEXPR.
1551
61e619b4
JW
1552 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Skip test for
1553 parallel mode.
1554 * testsuite/20_util/hash/84998.cc: Likewise.
1555 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: Likewise.
1556 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: Likewise.
1557 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
1558 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
1559 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: Likewise.
1560 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: Likewise.
1561 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
1562 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
1563 Likewise.
1564 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
1565 Likewise.
1566 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
1567 Likewise.
1568 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
1569 Likewise.
1570 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
1571 Likewise.
1572 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: Likewise.
1573 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1574 * testsuite/25_algorithms/copy/86658.cc: Likewise.
1575 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1576 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1577 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1578 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1579
57766351
JW
1580 * include/parallel/algo.h: Replace non-reserved names.
1581 * include/parallel/multiway_merge.h: Likewise.
1582 * include/parallel/multiway_mergesort.h: Likewise.
1583 * include/parallel/numericfwd.h: Likewise.
1584 * testsuite/17_intro/names.cc: Add RAI to test macros.
1585
3d0f0d3a
FD
15862019-09-30 François Dumont <fdumont@gcc.gnu.org>
1587
1588 * include/debug/array: Add C++20 constexpr to comparison operators.
1589 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Adapt
1590 dg-error line numbers.
1591 * testsuite/23_containers/array/tuple_interface/
1592 tuple_element_debug_neg.cc: Likewise.
1593
4aec2991
AT
15942019-09-30 Andreas Tobler <andreast@gcc.gnu.org>
1595
b5445359
AT
1596 * include/experimental/internet: Include netinet/in.h if we have
1597 _GLIBCXX_HAVE_NETINET_IN_H defined.
1598
4aec2991
AT
1599 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Ignore the
1600 FreeBSD warning about lower advertised precision of tgammal.
1601 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1602 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc: Likewise.
1603 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc: Likewise.
1604 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc: Likewise.
1605 * testsuite/special_functions/10_cyl_neumann/check_nan.cc: Likewise.
1606 * testsuite/special_functions/19_sph_bessel/check_nan.cc: Likewise.
1607 * testsuite/special_functions/21_sph_neumann/check_nan.cc: Likewise.
1608 * testsuite/tr1/5_numerical_facilities/special_functions/
1609 08_cyl_bessel_i/check_nan.cc: Likewise.
1610 * testsuite/tr1/5_numerical_facilities/special_functions/
1611 09_cyl_bessel_j/check_nan.cc: Likewise.
1612 * testuite/tr1/5_numerical_facilities/special_functions/
1613 10_cyl_bessel_k/check_nan.cc: Likewise.
1614 * testsuite/tr1/5_numerical_facilities/special_functions/
1615 11_cyl_neumann/check_nan.cc: Likewise.
1616 * testsuite/tr1/5_numerical_facilities/special_functions/
1617 21_sph_bessel/check_nan.cc: Likewise.
1618 * testsuite/tr1/5_numerical_facilities/special_functions/
1619 23_sph_neumann/check_nan.cc: Likewise.
1620
6438d29f
JW
16212019-09-30 Jonathan Wakely <jwakely@redhat.com>
1622
582c57a1
JW
1623 * include/std/span (span(element_type(&)[N]))
1624 (span(array<value_type, N>&), span(const array<value_type, N>&)):
1625 Deduce array element type to allow safe const conversions (LWG 3255).
1626 [!_GLIBCXX_P1394] (span(Container&), span(const Container&)): Use
1627 remove_cv_t on arguments to __is_std_span and __is_std_array.
1628 * testsuite/23_containers/span/lwg3255.cc: New test.
1629
6438d29f
JW
1630 PR libstdc++/77936
1631 * include/parallel/checkers.h (__is_sorted): Remove unused variable.
1632
97d57665
FD
16332019-09-28 François Dumont <fdumont@gcc.gnu.org>
1634
1635 * include/bits/stl_algo.h (merge): Fix documentation.
1636 * include/debug/functions.h (__check_sorted_aux): Add C++20 constexpr.
1637 (__check_sorted): Likewise and remove nested irreflexive check.
1638 (__check_sorted_set_aux, __check_sorted_set): Add C++20 constexpr.
1639 (__check_partitioned_lower, __check_partitioned_upper): Likewise.
1640 (_Irreflexive_checker::_S_is_valid): Likewise.
1641 (__is_irreflexive, __is_irreflexive_pred): Likewise.
1642 * include/debug/helper_functions.h (__get_distance): Add constexpr.
1643 (__valid_range_aux): Add C++20 constexpr.
1644 (__valid_range(_Iter, _Iter, _Distance_traits<_Iter>::__type&)):
1645 Likewise and add std::is_constant_evaluated check.
1646 (__valid_range_aux(_Iter, _Iter, std::input_iterator_tag)): New.
1647 (__valid_range_aux(_Iter, _Iter, std::random_accss_iterator_tag)): New.
1648 (__valid_range_aux(_Integral, _Integral, std::__true_type)): New,
1649 use latter.
1650 (__valid_range(_Iter, _Iter)): Adapt to use latter, add constexpr and
1651 __builtin_is_contant_evaludated check..
1652 (__can_advance, __base): Add constexpr.
1653 * include/debug/macros.h [_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED]
1654 (_GLIBCXX_DEBUG_VERIFY_COND_AT): New.
1655 (__glibcxx_check_sorted): Use __glibcxx_check_irreflexive.
1656 (__glibcxx_check_sorted_pred): Use __glibcxx_check_irreflexive_pred.
1657 * testsuite/25_algorithms/binary_search/constexpr.cc: Use irreflexive
1658 std::less.
1659 * testsuite/25_algorithms/is_sorted/constexpr.cc: Likewise.
1660 * testsuite/25_algorithms/merge/constexpr.cc: Fix order in camm. Fix
1661 lambda to be irreflexive.
1662
e9085da5
MR
16632019-09-27 Maciej W. Rozycki <macro@wdc.com>
1664
1665 * configure: Regenerate.
1666
f7a3a382
JW
16672019-09-27 Jonathan Wakely <jwakely@redhat.com>
1668
1669 PR libstdc++/91910
1670 * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Load pointer
1671 atomically and lock the mutex before accessing the sequence.
1672 (_Safe_local_iterator_base::_M_detach()): Likewise.
1673 (_Safe_iterator_base::_M_reset()): Clear _M_sequence atomically.
1674
8eb60b2f
JW
16752019-09-26 Jonathan Wakely <jwakely@redhat.com>
1676
c9fb0a85
JW
1677 * include/debug/array (to_array): Define for debug mode.
1678
7a9942f5
JW
1679 * include/bits/stl_pair.h (pair): Add _GLIBCXX20_CONSTEXPR to
1680 piecewise construction constructor, assignment operators, and swap.
1681 * include/std/tuple (pair::pair(piecewise_construct_t, tuple, tuple)):
1682 Add _GLIBCXX20_CONSTEXPR.
1683 (pair::pair(tuple, tuple, _Index_tuple, _Index_tuple)): Likewise.
1684 * testsuite/20_util/pair/constexpr_assign.cc: New test.
1685 * testsuite/20_util/pair/constexpr_swap.cc: New test.
1686
d5f7e049
JW
1687 * include/experimental/internet (operator==, operator<): Fix loop
1688 condition to avoid reading past the end of the array.
1689
8eb60b2f
JW
1690 * include/std/array: Remove references to profile mode.
1691 * include/std/bitset: Likewise.
1692 * include/std/deque: Likewise.
1693 * include/std/forward_list: Likewise.
1694 * include/std/list: Likewise.
1695 * include/std/map: Likewise.
1696 * include/std/set: Likewise.
1697 * include/std/unordered_map: Likewise.
1698 * include/std/unordered_set: Likewise.
1699 * include/std/vector: Likewise.
1700 * testsuite/17_intro/headers/c++1998/profile_mode.cc: New test.
1701 * testsuite/17_intro/headers/c++2011/profile_mode.cc: New test.
1702
21f7f998
JW
17032019-09-25 Jonathan Wakely <jwakely@redhat.com>
1704
1705 * include/bits/regex.h
1706 (basic_regex::assign(const C*, size_t, flag_type)): Add default
1707 argument (LWG 3296).
1708 * testsuite/28_regex/basic_regex/assign/char/lwg3296.cc: New test.
1709 * testsuite/28_regex/basic_regex/assign/wchar_t/lwg3296.cc: New test.
1710
47d17f70
JW
17112019-09-24 Jonathan Wakely <jwakely@redhat.com>
1712
fe69bee3
JW
1713 * include/std/variant (variant::index()): Remove impossible case.
1714
47d17f70
JW
1715 PR libstdc++/91871
1716 * testsuite/util/testsuite_hooks.h
1717 (conversion::iterator_to_const_iterator()): Do not return an invalid
1718 iterator. Test direct-initialization and direct-list-initialization
1719 as well as implicit conversion.
1720
1e8822d3
JW
17212019-09-23 Jonathan Wakely <jwakely@redhat.com>
1722
1723 PR libstdc++/91788 (partial)
1724 * include/std/variant (variant::index()): Improve codegen for cases
1725 where conversion to size_t already works correctly.
1726
193410e3
AS
17272019-09-23 Andreas Schwab <schwab@suse.de>
1728
1729 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
1730
52f6afe0
JW
17312019-09-12 Jonathan Wakely <jwakely@redhat.com>
1732
1733 PR libstdc++/91748
1734 * include/bits/stl_algo.h (for_each_n): Fix random access iterator
1735 case.
1736 * testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
1737 access iterators.
1738
ce7f1ce4
JW
17392019-09-11 Jonathan Wakely <jwakely@redhat.com>
1740
c5748fdb
JW
1741 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker.__call__):
1742 Fix syntax error.
1743
ce7f1ce4
JW
1744 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Add -Wno-volatile
1745 for C++2a and up. Define HAS_52748_FIXED and fix incorrect tests.
1746 * testsuite/tr1/3_function_objects/result_of.cc: Add -Wno-volatile
1747 for C++2a and up.
1748
28f00757
JW
17492019-09-10 Jonathan Wakely <jwakely@redhat.com>
1750
0f8b14ee
JW
1751 * include/std/type_traits (__do_common_type_impl): Implement
1752 additional COND-RES(CREF(D1), CRED(D2)) condition for C++20.
1753 (basic_common_reference, common_reference, common_reference_t): Define
1754 for C++20.
1755 * testsuite/20_util/common_reference/requirements/alias_decl.cc: New
1756 test.
1757 * testsuite/20_util/common_reference/requirements/
1758 explicit_instantiation.cc: New test.
1759 * testsuite/20_util/common_reference/requirements/typedefs.cc: New
1760 test.
1761
28f00757
JW
1762 * include/std/charconv (to_chars): Rename to __to_chars_i. Define
1763 non-template overloads for each signed and unsigned integer type and
1764 char. Define deleted overload for bool (LWG 3266).
1765 * testsuite/20_util/to_chars/1_neg.cc: Remove.
1766 * testsuite/20_util/to_chars/3.cc: New test.
1767 * testsuite/20_util/to_chars/lwg3266.cc: New test.
1768
6508fa9c
CL
17692019-09-10 Christophe Lyon <christophe.lyon@st.com>
1770
1771 * acinclude.m4: Handle uclinux*.
1772 * configure: Regenerate.
1773 * configure.host: Handle uclinux*
1774
5d727a4b
CL
17752019-09-10 Christophe Lyon <christophe.lyon@st.com>
1776 Mickaël Guêné <mickael.guene@st.com>
1777
1778 * libsupc++/eh_personality.cc (get_ttype_entry): Add FDPIC
1779 support.
1780
391d5d2e
JW
17812019-09-10 Jonathan Wakely <jwakely@redhat.com>
1782
e2c11cd1
JW
1783 PR libstdc++/91711
1784 * testsuite/23_containers/span/get_neg.cc: Avoid ambiguity due to
1785 0ul being a valid null pointer constant.
1786
391d5d2e
JW
1787 * include/std/type_traits (__remove_cv_t): New alias template.
1788 (is_void, is_integral, is_floating_point, is_pointer)
1789 (is_member_object_pointer, is_member_function_pointer, is_null_pointer)
1790 (is_member_point), __is_signed_integer, __is_unsigned_integer)
1791 (__make_unsigned_selector, __make_signed_selector, remove_pointer)
1792 (__decay_selector): Use __remove_cv_t.
1793 (remove_cv): Add partial specializations for cv-qualified types.
1794 (__decay_t): New alias template.
1795 (__decay_and_strip, __common_type_impl, __result_of_impl): Use
1796 __decay_t.
1797 (__enable_if_t): Move earlier in the file.
1798 (_Require): Use __enable_if_t.
1799 (swap(T&, T&)): Use _Require.
1800 (swap(T(&)[N])): Use __enable_if_t.
1801
b30ee71a
ESR
18022019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1803
1804 Implement C++20 p1424 - 'constexpr' feature macro concerns,
1805 Issue 3256 - Feature testing macro for constexpr algorithms,
1806 and Issue 3257 - Missing feature testing macro update from P0858.
1807 * include/std/version (__cpp_lib_constexpr_algorithms): Bump value.
1808 * include/bits/algorithmfwd.h: Ditto.
1809 * include/std/utility: Ditto.
1810 * testsuite/25_algorithms/constexpr_macro.cc: Ditto.
1811 * testsuite/25_algorithms/cpp_lib_constexpr.cc: New check for
1812 __cpp_lib_constexpr macro in <algorith>.
1813 * testsuite/20_util/exchange/constexpr.cc: Add check for
1814 __cpp_lib_constexpr macro in <utility>.
1815 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Remove check for
1816 __cpp_lib_constexpr_algorithms.
1817 * testsuite/25_algorithms/all_of/constexpr.cc: Ditto.
1818 * testsuite/25_algorithms/any_of/constexpr.cc: Ditto.
1819 * testsuite/25_algorithms/binary_search/constexpr.cc: Ditto.
1820 * testsuite/25_algorithms/copy/constexpr.cc: Ditto.
1821 * testsuite/25_algorithms/copy_backward/constexpr.cc: Ditto.
1822 * testsuite/25_algorithms/copy_if/constexpr.cc: Ditto.
1823 * testsuite/25_algorithms/copy_n/constexpr.cc: Ditto.
1824 * testsuite/25_algorithms/count/constexpr.cc: Ditto.
1825 * testsuite/25_algorithms/count_if/constexpr.cc: Ditto.
1826 * testsuite/25_algorithms/equal/constexpr.cc: Ditto.
1827 * testsuite/25_algorithms/equal_range/constexpr.cc: Ditto.
1828 * testsuite/25_algorithms/fill/constexpr.cc: Ditto.
1829 * testsuite/25_algorithms/fill_n/constexpr.cc: Ditto.
1830 * testsuite/25_algorithms/find/constexpr.cc: Ditto.
1831 * testsuite/25_algorithms/find_end/constexpr.cc: Ditto.
1832 * testsuite/25_algorithms/find_first_of/constexpr.cc: Ditto.
1833 * testsuite/25_algorithms/find_if/constexpr.cc: Ditto.
1834 * testsuite/25_algorithms/find_if_not/constexpr.cc: Ditto.
1835 * testsuite/25_algorithms/for_each/constexpr.cc: Ditto.
1836 * testsuite/25_algorithms/generate/constexpr.cc: Ditto.
1837 * testsuite/25_algorithms/generate_n/constexpr.cc: Ditto.
1838 * testsuite/25_algorithms/is_heap/constexpr.cc: Ditto.
1839 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Ditto.
1840 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Ditto.
1841 * testsuite/25_algorithms/is_permutation/constexpr.cc: Ditto.
1842 * testsuite/25_algorithms/is_sorted/constexpr.cc: Ditto.
1843 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: Ditto.
1844 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: Ditto.
1845 * testsuite/25_algorithms/lower_bound/constexpr.cc: Ditto.
1846 * testsuite/25_algorithms/merge/constexpr.cc: Ditto.
1847 * testsuite/25_algorithms/mismatch/constexpr.cc: Ditto.
1848 * testsuite/25_algorithms/none_of/constexpr.cc: Ditto.
1849 * testsuite/25_algorithms/partition_copy/constexpr.cc: Ditto.
1850 * testsuite/25_algorithms/partition_point/constexpr.cc: Ditto.
1851 * testsuite/25_algorithms/remove/constexpr.cc: Ditto.
1852 * testsuite/25_algorithms/remove_copy/constexpr.cc: Ditto.
1853 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Ditto.
1854 * testsuite/25_algorithms/remove_if/constexpr.cc: Ditto.
1855 * testsuite/25_algorithms/replace_copy/constexpr.cc: Ditto.
1856 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: Ditto.
1857 * testsuite/25_algorithms/replace_if/constexpr.cc: Ditto.
1858 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Ditto.
1859 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Ditto.
1860 * testsuite/25_algorithms/search/constexpr.cc: Ditto.
1861 * testsuite/25_algorithms/search_n/constexpr.cc: Ditto.
1862 * testsuite/25_algorithms/set_difference/constexpr.cc: Ditto.
1863 * testsuite/25_algorithms/set_intersection/constexpr.cc: Ditto.
1864 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: Ditto.
1865 * testsuite/25_algorithms/set_union/constexpr.cc: Ditto.
1866 * testsuite/25_algorithms/transform/constexpr.cc: Ditto.
1867 * testsuite/25_algorithms/unique/constexpr.cc: Ditto.
1868 * testsuite/25_algorithms/unique_copy/constexpr.cc: Ditto.
1869 * testsuite/25_algorithms/upper_bound/constexpr.cc: Ditto.
1870
3b63f537
ESR
18712019-09-09 Edward Smith-Rowland <3dw4rd@verizon.net>
1872
1873 Update docs for recent <span> and constexpr lib changes.
1874 * doc/xml/manual/status_cxx2020.xml: Update p0202r3, p0858r0, p0879r0,
1875 p1023r0, p1085r2 status.
1876 * doc/html/manual/status.html: Regenerate.
1877
d0e086ae
AP
18782019-09-09 Antony Polukhin <antoshkka@gmail.com>
1879
1880 * include/bits/charconv.h (__detail::__to_chars_10_impl): Replace
1881 final offsets with constants.
1882
27dada7d
JW
18832019-09-09 Jonathan Wakely <jwakely@redhat.com>
1884
1885 * include/bits/range_access.h (__adl_to_address): Remove.
1886 * include/std/span (__is_base_derived_safe_convertible_v): Replace
1887 with span::__is_compatible.
1888 (__is_std_array_v): Replace with __is_std_array class template and
1889 partial specializations.
1890 (__is_std_array, __is_std_span): New class templates and partial
1891 specializations.
1892 (span::__is_compatible): New alias template for SFINAE constraints.
1893 (span::span(element_type (&)[N])): Remove redundant constraints. Do
1894 not use __adl_data to obtain a pointer.
1895 (span::span(array<value_type, N>&)): Likewise.
1896 (span::span(const array<value_type, N>&)): Likewise.
1897 [_GLIBCXX_P1394] (span::iter_reference_t, span::iterator_t)
1898 (span::iter_value_t, span::derived_from): New alias templates for
1899 SFINAE constraints, until the equivalents are supported in <concepts>
1900 and <iterator>.
1901 [_GLIBCXX_P1394] (span::__is_compatible_iterator): New alias template
1902 for SFINAE constraints.
1903 [_GLIBCXX_P1394] (span::is_compatible_range): New class template for
1904 SFINAE constraints.
1905 [_GLIBCXX_P1394] (span::span(Range&&)): Improve constraints.
1906 [_GLIBCXX_P1394] (span::span(ContiguousIterator, Sentinel)): Likewise.
1907 Use std::to_address instead of __adl_to_address.
1908 [_GLIBCXX_P1394] (span::span(ContiguousIterator, size_type)): Likewise.
1909 [!_GLIBCXX_P1394] (span::__is_compatible_container): New alias
1910 template for SFINAE constraints.
1911 [!_GLIBCXX_P1394] (span::span(Container&))
1912 (span::span(const Container&)): Improve constraints.
1913 [!_GLIBCXX_P1394] (span::span(pointer, size_type))
1914 (span::span(pointer, pointer)): Remove redundant cast of pointer.
1915 (span(const span<OType, OExtent>&)): New constructor.
1916
4ef5bbd8
JW
19172019-09-06 Jonathan Wakely <jwakely@redhat.com>
1918
1919 * include/bits/range_access.h (ssize): Define for C++20.
1920 * testsuite/24_iterators/range_access_cpp20.cc: New test.
1921 * doc/xml/manual/status_cxx2020.xml: Update P1227R2 status.
1922 * doc/html/*: Regenerate.
1923
3c086f8d
FW
19242019-09-06 Florian Weimer <fweimer@redhat.com>
1925
1926 * configure: Regenerate.
1927
b5c433ce
JW
19282019-09-05 Jonathan Wakely <jwakely@redhat.com>
1929
1930 * doc/xml/manual/status_cxx2020.xml: Update status for P0122R7 and
1931 P1024R3. Remove entry for P0920R2.
1932 * include/std/span (__cpp_lib_span): Change value.
1933 (__extent_storage, __extent_storage<dynamic_extent>): Remove default
1934 constructor.
1935 (span): Replace __extent_storage base class with data member.
1936 (span::_S_subspan_extent): New function.
1937 (span::empty()): Add nodiscard attribute.
1938 (span::front, span::back, span::operator[]): Check preconditions.
1939 (span::first, span::last, span::subspan): Add noexcept. Improve
1940 precondition checks (LWG 3103).
1941 (get): Remove redundant condition from static_assert.
1942 (tuple_element<I, span<T, E>>): Fix static_assert message and simplify.
1943 (as_writable_bytes): Add inline specifier.
1944 * include/std/version (__cpp_lib_span): Change value.
1945 * testsuite/23_containers/span/back_neg.cc: Remove stray semi-colon.
1946 * testsuite/23_containers/span/front_neg.cc: Likewise.
1947 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
1948 * testsuite/23_containers/span/last_neg.cc: Improve test.
1949 * testsuite/23_containers/span/subspan_neg.cc: Likewise.
1950 * testsuite/23_containers/span/1.cc: New test.
1951 * testsuite/23_containers/span/2.cc: New test.
1952 * testsuite/23_containers/span/back_assert_neg.cc: New test.
1953 * testsuite/23_containers/span/first_2_assert_neg.cc: New test.
1954 * testsuite/23_containers/span/first_assert_neg.cc: New test.
1955 * testsuite/23_containers/span/first_neg.cc: New test.
1956 * testsuite/23_containers/span/front_assert_neg.cc: New test.
1957 * testsuite/23_containers/span/index_op_assert_neg.cc: New test.
1958 * testsuite/23_containers/span/last_2_assert_neg.cc: New test.
1959 * testsuite/23_containers/span/last_assert_neg.cc: New test.
1960 * testsuite/23_containers/span/subspan_2_assert_neg.cc: New test.
1961 * testsuite/23_containers/span/subspan_3_assert_neg.cc: New test.
1962 * testsuite/23_containers/span/subspan_4_assert_neg.cc: New test.
1963 * testsuite/23_containers/span/subspan_5_assert_neg.cc: New test.
1964 * testsuite/23_containers/span/subspan_6_assert_neg.cc: New test.
1965 * testsuite/23_containers/span/subspan_assert_neg.cc: New test.
1966
95e9a761
JM
19672019-09-05 JeanHeyd Meneide <phdofthehouse@gmail.com>
1968
1969 * include/Makefile.am: Add <span> header.
1970 * include/Makefile.in: Regenerate.
1971 * include/bits/range_access.h (__adl_begin, __adl_end, __adl_cbegin)
1972 (__adl_cend, __adl_rbegin, __adl_rend, __adl_crbegin, __adl_crend)
1973 (__adl_data, __adl_cdata, __adl_size, __adl_empty, __adl_to_address):
1974 New functions for performing argument-dependent lookup of range
1975 customization points.
1976 * include/bits/stl_iterator.h (__normal_iterator): Add
1977 _GLIBCXX20_CONSTEXPR to all functions.
1978 * include/std/span: New header.
1979 * include/std/version (__cpp_lib_span): Define feature test macro.
1980 * testsuite/23_containers/span/contiguous_range_neg.cc: New test.
1981 * testsuite/23_containers/span/everything.cc: New test.
1982 * testsuite/23_containers/span/get_neg.cc: New test.
1983 * testsuite/23_containers/span/last_neg.cc: New test.
1984 * testsuite/23_containers/span/subspan_neg.cc: New test.
1985 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: New test.
1986 * testsuite/23_containers/span/tuple_element_oob_neg.cc: New test.
1987 * testsuite/23_containers/span/tuple_size_neg.cc: New test.
1988
efd9a01b
JW
19892019-09-05 Jonathan Wakely <jwakely@redhat.com>
1990
1991 * doc/xml/manual/allocator.xml: Remove URL for bibliography entry.
1992 * doc/html/*: Regenerate.
1993
ad4d1d21
MC
19942019-09-04 Mike Crowe <mac@mcrowe.com>
1995
1996 PR libstdc++/41861
1997 * acinclude.m4 (GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT): Check for new
1998 pthread_cond_clockwait function.
1999 * configure.ac: Use GLIBCXX_CHECK_PTHREAD_COND_CLOCKWAIT.
2000 * configure: Regenerate.
2001 * config.h.in: Regenerate.
2002 * include/std/condition_variable: (condition_variable): Rename
2003 __steady_clock_t typedef and add system_clock. Change __clock_t to be
2004 a typedef for the preferred clock to convert arbitrary other clocks to.
2005 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (wait_until): Add a steady_clock
2006 overload.
2007 (wait_until): Change __clock_t overload to use system_clock.
2008 [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT] (__wait_until_impl): Add
2009 steady_clock overload that calls pthread_cond_clockwait.
2010 (__wait_until_impl): Change __clock_t overload to use system_clock.
2011 (condition_variable_any) [_GLIBCXX_USE_PTHREAD_COND_CLOCKWAIT]: Use
2012 steady_clock for __clock_t if pthread_cond_clockwait is available.
2013
76e0dd66
MC
20142019-09-04 Mike Crowe <mac@mcrowe.com>
2015
2016 * testsuite/30_threads/condition_variable/members/2.cc (test01):
2017 Parameterise so that test can be run against an arbitrary clock.
2018 (main): Test using std::chrono::steady_clock and a user-defined
2019 clock in addition to the previous std::chrono::system_clock.
2020 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2021
2f2aeda9
UW
20222019-09-03 Ulrich Weigand <uweigand@de.ibm.com>
2023
2024 * crossconfig.m4: Remove references to spu.
2025 * configure: Regenerate.
2026 * doc/xml/manual/appendix_contributing.xml: Remove references
2027 to __ea as "badword" for spu.
2028 * doc/html/manual/source_code_style.html: Regenerate.
2029 * include/tr1/ell_integral.tcc (__ellint_rd): Do not attempt
2030 to avoid __ea (as "badword" for spu).
2031 (__ellint_rj): Likewise.
2032
c6c2d1bc
CLT
20332019-09-03 Chung-Lin Tang <cltang@codesourcery.com>
2034
2035 PR other/79543
2036 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
2037 scanning to conform to the GNU Coding Standards.
2038 * configure: Regenerate.
2039
d2faf10f
JW
20402019-09-02 Jonathan Wakely <jwakely@redhat.com>
2041
2042 * src/c++17/memory_resource.cc: Use __constinit keyword.
2043
30f43083
JW
20442019-09-02 Jonathan Wakely <jwakely@redhat.com>
2045
2046 * doc/xml/manual/abi.xml: Document 9.x library versions.
2047 * doc/html/*: Regenerate.
2048
6e672b18
JW
20492019-09-02 Jonathan Wakely <jwakely@redhat.com>
2050
2051 * include/std/charconv (__detail::__to_chars_2_len): Use std::log2p1.
2052 (__detail::__to_chars_8_len): Remove.
2053 (__detail::__to_chars_8): Inline length calculation here.
2054 (__detail::__from_chars_binary): Use numeric_limits instead of
2055 CHAR_BIT.
2056
8756957f
RO
20572019-09-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2058
2059 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
2060 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt: Likewise.
2061 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
2062 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
2063 Likewise.
2064
a37ab089
FD
20652019-09-01 François Dumont <fdumont@gcc.gnu.org>
2066
2067 * testsuite_files/util/testsuite_performance.h
2068 (resource_counter::start): Ignore unused malloc(0) result.
2069
3e7254c5
GP
20702019-09-01 Gerald Pfeifer <gerald@pfeifer.com>
2071
2072 * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
2073 Model Object Technologies): Adjust name and link.
2074
7259a9d5
AP
20752019-08-30 Antony Polukhin <antoshkka@gmail.com>
2076
2077 * include/std/charconv (__detail::__to_chars_8)
2078 __detail::__to_chars_16): Replace array of precomputed digits with
2079 arithmetic operations to avoid CPU cache misses. Remove zero
2080 termination from array of digits to allow symbol merge with generic
2081 implementation of __detail::__to_chars. Replace final offsets with
2082 constants. Use __detail::__to_chars_len_2 instead of a generic
2083 __detail::__to_chars_len.
2084 (__detail::__to_chars): Remove zero termination from array of digits.
2085 (__detail::__to_chars_2): Leading digit is always '1'.
2086
1ecaf589
JW
20872019-08-30 Jonathan Wakely <jwakely@redhat.com>
2088
2089 * testsuite/23_containers/vector/cons/89164_c++17.cc: Fix errors.
2090
f76cf133
UB
20912019-08-30 Uros Bizjak <ubizjak@gmail.com>
2092
2093 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
2094
61f5cb23
JW
20952019-08-30 Jonathan Wakely <jwakely@redhat.com>
2096
2097 PR libstdc++/89164
2098 * include/bits/stl_algobase.h (__copy_move): Give descriptive names
2099 to template parameters.
2100 * include/bits/stl_uninitialized.h (uninitialized_copy)
2101 (uninitialized_fill, uninitialized_fill_n): Add static assertions to
2102 diagnose invalid uses.
2103 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
2104 Adjust expected error.
2105 * testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
2106 New test.
2107 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
2108 89164.cc: New test.
2109 * testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
2110 New test.
2111 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
2112 89164.cc: New test.
2113 * testsuite/23_containers/vector/cons/89164.cc: New test.
2114 * testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
2115
d02a0412
JW
21162019-08-29 Jonathan Wakely <jwakely@redhat.com>
2117
2118 PR libstdc++/91067
2119 * acinclude.m4 (libtool_VERSION): Bump to 6:28:0.
2120 * configure: Regenerate.
2121 * config/abi/pre/gnu.ver (GLIBCXX_3.4.28): Add new version. Export
2122 missing symbols.
2123 * testsuite/27_io/filesystem/iterators/91067.cc: Test move
2124 constructors.
2125 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2126
aff0632d 21272019-08-29 Jakub Jelinek <jakub@redhat.com>
ae32cd03
JJ
2128
2129 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2130 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2131
d8c26520
JW
21322019-08-28 Jonathan Wakely <jwakely@redhat.com>
2133
2134 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2135 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2136 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2137 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2138 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2139 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2140 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2141
4872de4a
JM
21422019-08-23 Joseph Myers <joseph@codesourcery.com>
2143
2144 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2145 (std::filesystem::__gnu_posix::lstat): Add return type.
2146
72459cfd
JW
21472019-08-20 Jonathan Wakely <jwakely@redhat.com>
2148
9e3c41ab
JW
2149 * doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
2150
eb0e8589
JW
2151 * include/std/numeric (reduce): Fix Doxygen markup.
2152
72459cfd
JW
2153 PR libstdc++/91371
2154 * include/std/type_traits (is_function): Simplify definition. Remove
2155 partial specializations for function types.
2156 (__is_referenceable): Simplify definition.
2157 * testsuite/20_util/bind/91371.cc: New test.
2158 * testsuite/20_util/is_function/91371.cc: New test.
2159 * testsuite/20_util/is_function/value.cc: Check more pointer types.
2160 * testsuite/20_util/is_member_function_pointer/91371.cc: New test.
2161 * testsuite/20_util/is_object/91371.cc: New test.
2162
4305b26e
UB
21632019-08-16 Uros Bizjak <ubizjak@gmail.com>
2164
2165 * config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.
2166
d91f618d
JW
21672019-08-15 Jonathan Wakely <jwakely@redhat.com>
2168
2169 PR libstdc++/91456
2170 * include/bits/std_function.h (__check_func_return_type): Remove.
2171 (function::_Callable): Use std::__is_invocable_impl instead of
2172 __check_func_return_type.
2173 * include/std/type_traits (__is_invocable_impl): Add another defaulted
2174 template parameter. Define a separate partial specialization for
2175 INVOKE and INVOKE<void>. For INVOKE<R> replace is_convertible check
2176 with a check that models delayed temporary materialization.
2177 * testsuite/20_util/function/91456.cc: New test.
2178 * testsuite/20_util/is_invocable/91456.cc: New test.
2179
07fd852f
JW
21802019-08-14 Jonathan Wakely <jwakely@redhat.com>
2181
2182 * include/std/type_traits (__is_nullptr_t): Add deprecated attribute.
2183
7a91c710
ESR
21842019-08-14 Edward Smith-Rowland <3dw4rd@verizon.net>
2185
2186 Implement C++20 p0879 - Constexpr for swap and swap related functions.
2187 * include/std/version (__cpp_lib_constexpr_swap_algorithms): New macro.
2188 * include/bits/algorithmfwd.h (__cpp_lib_constexpr_swap_algorithms):
2189 New macro.
2190 (iter_swap, make_heap, next_permutation, partial_sort_copy, pop_heap)
2191 (prev_permutation, push_heap, reverse, rotate, sort_heap, swap)
2192 (swap_ranges, nth_element, partial_sort, sort): Add constexpr.
2193 * include/bits/move.h (swap): Add constexpr.
2194 * include/bits/stl_algo.h (__move_median_to_first, __reverse, reverse)
2195 (__gcd, __rotate, rotate, __partition, __heap_select)
2196 (__partial_sort_copy, partial_sort_copy, __unguarded_partition)
2197 (__unguarded_partition_pivot, __partial_sort, __introsort_loop, __sort)
2198 (__introselect, __chunk_insertion_sort, next_permutation)
2199 (prev_permutation, partition, partial_sort, nth_element, sort)
2200 (__iter_swap::iter_swap, iter_swap, swap_ranges): Add constexpr.
2201 * include/bits/stl_algobase.h (__iter_swap::iter_swap, iter_swap)
2202 (swap_ranges): Add constexpr.
2203 * include/bits/stl_heap.h (__push_heap, push_heap, __adjust_heap,
2204 __pop_heap, pop_heap, __make_heap, make_heap, __sort_heap, sort_heap):
2205 Add constexpr.
2206 * include/std/type_traits (swap): Add constexpr.
2207 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Add constexpr.
2208 * testsuite/25_algorithms/iter_swap/constexpr.cc: New test.
2209 * testsuite/25_algorithms/make_heap/constexpr.cc: New test.
2210 * testsuite/25_algorithms/next_permutation/constexpr.cc: New test.
2211 * testsuite/25_algorithms/nth_element/constexpr.cc: New test.
2212 * testsuite/25_algorithms/partial_sort/constexpr.cc: New test.
2213 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc: New test.
2214 * testsuite/25_algorithms/partition/constexpr.cc: New test.
2215 * testsuite/25_algorithms/pop_heap/constexpr.cc: New test.
2216 * testsuite/25_algorithms/prev_permutation/constexpr.cc: New test.
2217 * testsuite/25_algorithms/push_heap/constexpr.cc: New test.
2218 * testsuite/25_algorithms/reverse/constexpr.cc: New test.
2219 * testsuite/25_algorithms/rotate/constexpr.cc: New test.
2220 * testsuite/25_algorithms/sort/constexpr.cc: New test.
2221 * testsuite/25_algorithms/sort_heap/constexpr.cc: New test.
2222 * testsuite/25_algorithms/swap/constexpr.cc: New test.
2223 * testsuite/25_algorithms/swap_ranges/constexpr.cc: New test.
2224
6fd4b25b
JW
22252019-08-12 Jonathan Wakely <jwakely@redhat.com>
2226
0124d2c5
JW
2227 PR libstdc++/90361
2228 * src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.
2229
6fd4b25b
JW
2230 * include/std/tuple (__unpack_std_tuple): New variable template and
2231 partial specializations.
2232 (apply, make_from_tuple): Add noexcept-specifier.
2233 * testsuite/20_util/tuple/apply/2.cc: New test.
2234 * testsuite/20_util/tuple/make_from_tuple/2.cc: New test.
2235
c787deb0
AO
22362019-08-09 Corentin Gay <gay@adacore.com>
2237
2238 * testsuite/ext/random/beta_distribution/operators/serialize.cc,
2239 testsuite/ext/random/hypergeometric_distribution/operators/serialize.cc,
2240 testsuite/ext/random/normal_mv_distribution/operators/serialize.cc,
2241 testsuite/ext/random/triangular_distribution/operators/serialize.cc,
2242 testsuite/ext/random/von_mises_distribution/operators/serialize.cc:
2243 Add call to `VERIFY`.
2244
22452019-08-09 Alexandre Oliva <oliva@adacore.com>
2246
2247 * include/ext/random
2248 (normal_mv_distribution::param_type::param_type): New private
2249 ctor taking a decomposed varcov matrix, for use by...
2250 (operator>>): ... this, befriended.
2251 * include/ext/random.tcc (operator>>): Use it.
2252 (normal_mv_distribution::param_type::_M_init_lower): Adjust
2253 member function name in exception message.
2254
cb0de9b6
JW
22552019-08-08 Jonathan Wakely <jwakely@redhat.com>
2256
2257 P0325R4 to_array from LFTS with updates
2258 * include/experimental/array (to_array): Qualify call to __to_array.
2259 * include/std/array (__cpp_lib_to_array, to_array): Define for C++20.
2260 * include/std/version (__cpp_lib_to_array): Likewise.
2261 * testsuite/23_containers/array/creation/1.cc: New test.
2262 * testsuite/23_containers/array/creation/2.cc: New test.
2263 * testsuite/23_containers/array/creation/3_neg.cc: New test.
2264 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
2265 Use zero for dg-error line number.
2266
a38b51bc
JW
22672019-08-06 Jonathan Wakely <jwakely@redhat.com>
2268
ffc500dd
JW
2269 P1651R0 bind_front should not unwrap reference_wrapper
2270 * include/std/functional (bind_front): Don't unwrap reference_wrapper.
2271 * include/std/version (__cpp_lib_bind_front): Update value.
2272 * testsuite/20_util/function_objects/bind_front/1.cc: Fix test for
2273 feature test macro.
2274 * testsuite/20_util/function_objects/bind_front/2.cc: New test.
2275
a38b51bc
JW
2276 * include/std/numbers [!__STRICT_ANSI__ && _GLIBCXX_USE_FLOAT128]
2277 (e_v, log2e_v, log10e_v, pi_v, inv_pi_v, inv_sqrtpi_v, ln2_v, ln10_v)
2278 (sqrt2_v, sqrt3_v, inv_sqrt3, egamma_v, phi_v): Add explicit
2279 specializations for __float128.
2280 * testsuite/26_numerics/numbers/float128.cc: New test.
2281
011fc8c6
GP
22822019-08-04 Gerald Pfeifer <gerald@pfeifer.com>
2283
2284 * doc/xml/manual/documentation_hacking.xml: doxygen.org is now
2285 doxygen.nl.
2286
3a66e68a
ESR
22872019-08-01 Edward Smith-Rowland <3dw4rd@verizon.net>
2288
2289 Implement C++20 p0202 - Add Constexpr Modifiers to Functions
2290 in <algorithm> and <utility> Headers.
2291 Implement C++20 p1023 - constexpr comparison operators for std::array.
2292 * include/bits/algorithmfwd.h (all_of, any_of, binary_search, copy,
2293 copy_backward, copy_if, copy_n, equal_range, fill, find_end,
2294 find_if_not, includes, is_heap, is_heap_until, is_partitioned,
2295 is_permutation, is_sorted, is_sorted_until, iter_swap, lower_bound,
2296 none_of, partition_copy, partition_point, remove, remove_if,
2297 remove_copy, remove_copy_if, replace_copy, replace_copy_if,
2298 reverse_copy, rotate_copy, uunique, upper_bound, adjacent_find, count,
2299 count_if, equal, find, find_first_of, find_if, for_each, generate,
2300 generate_n, lexicographical_compare, merge, mismatch, replace,
2301 replace_if, search, search_n, set_difference, set_intersection,
2302 set_symmetric_difference, set_union, transform, unique_copy):
2303 Mark constexpr.
2304 * include/bits/cpp_type_traits.h (__miter_base): Mark constexpr.
2305 * include/bits/predefined_ops.h (_Iter_less_val::operator(),
2306 _Val_less_iter::operator(), _Iter_equal_to_iter::operator(),
2307 _Iter_equal_to_val::operator(), _Iter_equals_val::operator()):
2308 Use const ref instead of ref arg;
2309 (_Iter_less_val, __iter_less_val, _Val_less_iter, __val_less_iter,
2310 __iter_equal_to_iter, __iter_equal_to_val, __iter_comp_val,
2311 _Iter_comp_val, _Val_comp_iter, __val_comp_iter, __iter_equals_val,
2312 _Iter_equals_iter, __iter_comp_iter, _Iter_pred, __pred_iter,
2313 _Iter_comp_to_val, __iter_comp_val, _Iter_comp_to_iter,
2314 __iter_comp_iter): Mark constexpr.
2315 * include/bits/stl_algo.h (__find_if, __find_if_not, __find_if_not_n,
2316 __search, __search_n_aux, __search_n, __find_end, find_end, all_of,
2317 none_of, any_of, find_if_not, is_partitioned, partition_point,
2318 __remove_copy_if, remove_copy, remove_copy_if, copy_if, __copy_n,
2319 copy_n, partition_copy, __remove_if, remove, remove_if, __adjacent_find,
2320 __unique, unique, __unique_copy, reverse_copy, rotate_copy,
2321 __unguarded_linear_insert, __insertion_sort, __unguarded_insertion_sort,
2322 __final_insertion_sort, lower_bound, __upper_bound, upper_bound,
2323 __equal_range, equal_range, binary_search, __includes, includes,
2324 __next_permutation, __prev_permutation, __replace_copy_if, replace_copy,
2325 replace_copy_if, __count_if, is_sorted, __is_sorted_until,
2326 is_sorted_until, __is_permutation, is_permutation, for_each, find,
2327 find_if, find_first_of, adjacent_find, count, count_if, search,
2328 search_n, transform, replace, replace_if, generate, generate_n,
2329 unique_copy, __merge, merge, __set_union, set_union, __set_intersection,
2330 set_intersection, __set_difference, set_difference,
2331 __set_symmetric_difference, set_symmetric_difference): Mark constexpr.
2332 * include/bits/stl_algobase.h (__memmove, __memcmp): New maybe constexpr
2333 wrappers around __builtin_memmove and __builtin_memcmp
2334 respectively;
2335 (__niter_base, __niter_wrap, __copy_m, __copy_move_a, __copy_move_a2,
2336 copy, move, __copy_move_b, __copy_move_backward_a,
2337 __copy_move_backward_a2, copy_backward, move_backward, __fill_a, fill,
2338 __fill_n_a, fill_n, equal, __lc_rai::__newlast1, __lc_rai::__cnd2,
2339 __lexicographical_compare_impl, __lexicographical_compare,
2340 __lexicographical_compare<true>::__lc, __lexicographical_compare_aux,
2341 __lower_bound, lower_bound, equal, __equal4, lexicographical_compare,
2342 __mismatch, mismatch, __is_heap_until, __is_heap, is_heap_until,
2343 is_heap): Mark constexpr.
2344 * include/bits/stl_heap.h (__is_heap_until, __is_heap, is_heap_until,
2345 is_heap): Mark constexpr.
2346 * include/bits/stl_iterator.h (__niter_base, __miter_base): Mark constexpr.
2347 * include/std/array: Make comparison ops constexpr.
2348 * include/std/utility: Make exchange constexpr.
2349 * include/std/version (__cpp_lib_constexpr_algorithms): New macro.
2350 * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
2351 * testsuite/23_containers/array/tuple_interface/
2352 tuple_element_neg.cc: Adjust.
2353 * testsuite/20_util/exchange/constexpr.cc: New.
2354 * testsuite/23_containers/array/comparison_operators/constexpr.cc: New.
2355 * testsuite/25_algorithms/constexpr_macro.cc: New.
2356 * testsuite/25_algorithms/adjacent_find/constexpr.cc: New.
2357 * testsuite/25_algorithms/all_of/constexpr.cc: New.
2358 * testsuite/25_algorithms/any_of/constexpr.cc: New.
2359 * testsuite/25_algorithms/binary_search/constexpr.cc: New.
2360 * testsuite/25_algorithms/copy/constexpr.cc: New.
2361 * testsuite/25_algorithms/copy_backward/constexpr.cc: New.
2362 * testsuite/25_algorithms/copy_if/constexpr.cc: New.
2363 * testsuite/25_algorithms/copy_n/constexpr.cc: New.
2364 * testsuite/25_algorithms/count/constexpr.cc: New.
2365 * testsuite/25_algorithms/count_if/constexpr.cc: New.
2366 * testsuite/25_algorithms/equal/constexpr.cc: New.
2367 * testsuite/25_algorithms/equal_range/constexpr.cc: New.
2368 * testsuite/25_algorithms/fill/constexpr.cc: New.
2369 * testsuite/25_algorithms/fill_n/constexpr.cc: New.
2370 * testsuite/25_algorithms/find/constexpr.cc: New.
2371 * testsuite/25_algorithms/find_end/constexpr.cc: New.
2372 * testsuite/25_algorithms/find_first_of/constexpr.cc: New.
2373 * testsuite/25_algorithms/find_if/constexpr.cc: New.
2374 * testsuite/25_algorithms/find_if_not/constexpr.cc: New.
2375 * testsuite/25_algorithms/for_each/constexpr.cc: New.
2376 * testsuite/25_algorithms/generate/constexpr.cc: New.
2377 * testsuite/25_algorithms/generate_n/constexpr.cc: New.
2378 * testsuite/25_algorithms/is_heap/constexpr.cc: New.
2379 * testsuite/25_algorithms/is_heap_until/constexpr.cc: New.
2380 * testsuite/25_algorithms/is_partitioned/constexpr.cc: New.
2381 * testsuite/25_algorithms/is_permutation/constexpr.cc: New.
2382 * testsuite/25_algorithms/is_sorted/constexpr.cc: New.
2383 * testsuite/25_algorithms/is_sorted_until/constexpr.cc: New.
2384 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc: New.
2385 * testsuite/25_algorithms/lower_bound/constexpr.cc: New.
2386 * testsuite/25_algorithms/merge/constexpr.cc: New.
2387 * testsuite/25_algorithms/mismatch/constexpr.cc: New.
2388 * testsuite/25_algorithms/none_of/constexpr.cc: New.
2389 * testsuite/25_algorithms/partition_copy/constexpr.cc: New.
2390 * testsuite/25_algorithms/partition_point/constexpr.cc: New.
2391 * testsuite/25_algorithms/remove/constexpr.cc: New.
2392 * testsuite/25_algorithms/remove_copy/constexpr.cc: New.
2393 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: New.
2394 * testsuite/25_algorithms/remove_if/constexpr.cc: New.
2395 * testsuite/25_algorithms/replace_copy/constexpr.cc: New.
2396 * testsuite/25_algorithms/replace_copy_if/constexpr.cc: New.
2397 * testsuite/25_algorithms/replace_if/constexpr.cc: New.
2398 * testsuite/25_algorithms/reverse_copy/constexpr.cc: New.
2399 * testsuite/25_algorithms/rotate_copy/constexpr.cc: New.
2400 * testsuite/25_algorithms/search/constexpr.cc: New.
2401 * testsuite/25_algorithms/search_n/constexpr.cc: New.
2402 * testsuite/25_algorithms/set_difference/constexpr.cc: New.
2403 * testsuite/25_algorithms/set_intersection/constexpr.cc: New.
2404 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc: New.
2405 * testsuite/25_algorithms/set_union/constexpr.cc: New.
2406 * testsuite/25_algorithms/transform/constexpr.cc: New.
2407 * testsuite/25_algorithms/unique/constexpr.cc: New.
2408 * testsuite/25_algorithms/unique_copy/constexpr.cc: New.
2409 * testsuite/25_algorithms/upper_bound/constexpr.cc: New.
2410
949fdadb
JW
24112019-07-31 Jonathan Wakely <jwakely@redhat.com>
2412
3090082c
JW
2413 * include/std/memory (make_obj_using_allocator): Qualify call to
2414 uses_allocator_construction_args.
2415
960b9ae0
JW
2416 P0631R4 Math Constants
2417 * include/Makefile.am: Add new header.
2418 * include/Makefile.in: Regenerate.
2419 * include/precompiled/stdc++.h: Include new header.
2420 * include/std/numbers: New header.
2421 * include/std/version (__cpp_lib_math_constants): Define.
2422 * testsuite/26_numerics/numbers/1.cc: New test.
2423 * testsuite/26_numerics/numbers/2.cc: New test.
2424 * testsuite/26_numerics/numbers/3.cc: New test.
2425 * testsuite/26_numerics/numbers/nonfloat_neg.cc: New test.
2426
27e6c1f4
JW
2427 * include/std/bit: Add Doxygen comments.
2428
949fdadb
JW
2429 PR libstdc++/91308
2430 * include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
2431 constraints on deleter that should only apply to the constructor.
2432 (unique_ptr<T[], D>::__safe_conversion_up): Likewise.
2433 (unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
2434 constraints on deleter here.
2435 * testsuite/20_util/unique_ptr/assign/91308.cc: New test.
2436
50c2df93
JW
24372019-07-29 Jonathan Wakely <jwakely@redhat.com>
2438
2439 PR libstdc++/51333
2440 * libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
2441 constructor inline.
2442 * libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
2443 constructor.
2444 * testsuite/18_support/51333.cc: New test.
2445
c5993c9a
GP
24462019-07-28 Gerald Pfeifer <gerald@pfeifer.com>
2447
2448 * doc/xml/manual/documentation_hacking.xml: Fix broken reference
2449 to the Doxygen manual. Avoid a "here" link on the way.
2450 Fix another broken link to Doxygen docblocks.
2451
a5378f9b
JW
24522019-07-26 Jonathan Wakely <jwakely@redhat.com>
2453
2454 * include/std/bit (__cpp_lib_endian): Define.
2455 * include/std/version (__cpp_lib_endian): Define.
2456 * testsuite/26_numerics/endian/2.cc: New.
2457 * testsuite/26_numerics/endian/3.cc: New.
2458 * testsuite/26_numerics/endian/4.cc: New.
2459
ac2dca4d
FD
24602019-07-26 François Dumont <fdumont@gcc.gnu.org>
2461
2462 * testsuite/util/testsuite_iterators.h
2463 (bidirectional_iterator_wrapper): Fix type comment.
2464 (random_access_iterator_wrapper): Likewise.
2465
45c7215c
JW
24662019-07-25 Jonathan Wakely <jwakely@redhat.com>
2467
2468 * include/std/bit (endian): Move definition here as per P1612R1.
2469 * include/std/type_traits (endian): Remove definition from here.
2470 * testsuite/20_util/endian/1.cc: Rename to ...
2471 * testsuite/26_numerics/endian/1.cc: ... here. Adjust header.
2472
6343b6bf
ML
24732019-07-25 Martin Liska <mliska@suse.cz>
2474 Dominik Infuhr <dominik.infuehr@theobroma-systems.com>
2475
2476 PR c++/23383
2477 * testsuite/ext/bitmap_allocator/check_delete.cc: Add
2478 -fno-allocation-dce.
2479 * testsuite/ext/bitmap_allocator/check_new.cc: Likewise.
2480 * testsuite/ext/new_allocator/check_delete.cc: Likewise.
2481 * testsuite/ext/new_allocator/check_new.cc: Likewise.
2482
281ab2fb
JW
24832019-07-22 Jonathan Wakely <jwakely@redhat.com>
2484
2ac8e322
JW
2485 * testsuite/26_numerics/bit/bitops.count/*: Rename to ...
2486 * testsuite/26_numerics/bit/bit.count/*: Here.
2487
f35da524
JW
2488 * include/std/bit (__rotl, __rotr): Change second parameter from
2489 unsigned int to int and handle negative values.
2490 (rotl, rotr): Remove check for __STRICT_ANSI__. Change second
2491 parameter from unsigned int to int. Add nodiscard attribute.
2492 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
2493 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
2494 shifts.
2495 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
2496 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
2497 shifts.
2498
281ab2fb
JW
2499 * include/std/bit (__ceil2): Make unrepresentable results undefined,
2500 as per P1355R2. Add debug assertion. Perform one left shift, not two,
2501 so that out of range values cause undefined behaviour. Ensure that
2502 shift will still be undefined if left operand is promoted.
2503 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
2504 unrepresentable values with checks that they are not core constant
2505 expressions.
2506 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.
2507
2be3193b
FD
25082019-07-19 François Dumont <fdumont@gcc.gnu.org>
2509
2510 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): Fix
2511 sized deallocation size computation.
2512
22469e42
AS
25132019-07-19 Andreas Schwab <schwab@linux-m68k.org>
2514
2515 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
2516
f48d9d19
FD
25172019-07-18 François Dumont <fdumont@gcc.gnu.org>
2518
2519 * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New.
2520 (~_Temporary_buffer()): Use latter.
2521 (_Temporary_buffer(_FIterator, size_type)): Likewise.
2522
5d688cb2
AS
25232019-07-17 Andreas Schwab <schwab@suse.de>
2524
2525 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2526
e6c847fb
JM
25272019-07-16 Jason Merrill <jason@redhat.com>
2528
2529 * include/std/memory (uses_allocator_construction_args): Add parens
2530 around constraint.
2531
804e2d06
JW
25322019-07-12 Jonathan Wakely <jwakely@redhat.com>
2533
b979ca0f
JW
2534 * testsuite/29_atomics/atomic_float/1.cc: Fix comment.
2535
0d67cd38
JW
2536 * include/experimental/string_view (__detail::__idt): Remove.
2537 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
2538 Use __type_identity_t instead of __detail::__idt;
2539 * include/std/string_view (__detail::__idt): Remove.
2540 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
2541 Use __type_identity_t instead of __detail::__idt;
2542 * include/std/type_traits (__type_identity_t): New alias template.
2543
804e2d06
JW
2544 * doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
2545 and floating point atomics.
2546
a90fe12c
JW
25472019-07-11 Jonathan Wakely <jwakely@redhat.com>
2548
f6822be7
JW
2549 * doc/xml/manual/configure.xml: Improve documentation of
2550 --enable-libstdcxx-time option.
2551
a90fe12c
JW
2552 * include/bits/atomic_base.h (__atomic_impl): New namespace for
2553 wrappers around atomic built-ins.
2554 (__atomic_float, __atomic_ref): New class templates for use as base
2555 classes.
2556 * include/std/atomic (atomic<float>, atomic<double>)
2557 (atomic<long double>): New explicit specializations.
2558 (atomic_ref): New class template.
2559 (__cpp_lib_atomic_ref): Define.
2560 * include/std/version (__cpp_lib_atomic_ref): Define.
2561 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
2562 * testsuite/29_atomics/atomic_float/1.cc: New test.
2563 * testsuite/29_atomics/atomic_float/requirements.cc: New test.
2564 * testsuite/29_atomics/atomic_ref/deduction.cc: New test.
2565 * testsuite/29_atomics/atomic_ref/float.cc: New test.
2566 * testsuite/29_atomics/atomic_ref/generic.cc: New test.
2567 * testsuite/29_atomics/atomic_ref/integral.cc: New test.
2568 * testsuite/29_atomics/atomic_ref/pointer.cc: New test.
2569 * testsuite/29_atomics/atomic_ref/requirements.cc: New test.
2570
a10b664e
JW
25712019-07-06 Jonathan Wakely <jwakely@redhat.com>
2572
2573 * include/ext/atomicity.h (__exchange_and_add, __atomic_add): Replace
2574 throw() with _GLIBCXX_NOTHROW.
2575 (__atomic_add_dispatch): Return after performing atomic increment.
2576
0dc7adb0
JW
25772019-07-05 Jonathan Wakely <jwakely@redhat.com>
2578
2579 * include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
2580 (__exchange_and_add): Replace static specifier with always_inline
2581 attribute.
2582 (__exchange_and_add_single, __atomic_add_single): Likewise.
2583 (__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
2584 combine !__gthread_active_p() and !__GTHREADS branches.
2585
67699bf6
JW
25862019-07-03 Jonathan Wakely <jwakely@redhat.com>
2587
2588 PR libstdc++/91067
2589 * acinclude.m4 (libtool_VERSION): Bump to 6:27:0.
2590 * configure: Regenerate.
2591 * config/abi/pre/gnu.ver (GLIBCXX_3.4.27): Add new version. Export
2592 missing symbols.
2593 * testsuite/27_io/filesystem/iterators/91067.cc: New test.
2594 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2595
4887c9e8
JW
25962019-07-02 Jonathan Wakely <jwakely@redhat.com>
2597
2598 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
2599 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
2600 instead of __is_identifier to detect Clang support.
2601
758d7478
JW
26022019-07-02 Jim Wilson <jimw@sifive.com>
2603
2604 * configure.ac (BUILD_PDF): Also test for doxygen, dot, xsltproc,
2605 and xmllint.
2606 * configure: Regenerate.
2607
e11c4871
JW
26082019-06-27 Jonathan Wakely <jwakely@redhat.com>
2609
2610 PR libstdc++/91012
2611 * src/c++17/fs_path.cc (filesystem_error::_Impl): Use a string_view
2612 for the what_arg parameters.
2613 (filesystem_error::filesystem_error): Pass system_error::what() to
2614 the _Impl constructor.
2615 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Ensure that
2616 filesystem_error::what() contains system_error::what().
2617
47f79054
JW
26182019-06-26 Jonathan Wakely <jwakely@redhat.com>
2619
22ff8929
JW
2620 * include/std/charconv (chars_format): Define bitmask type.
2621 * testsuite/20_util/to_chars/chars_format.cc: New test.
2622
47f79054
JW
2623 * include/bits/fs_path.h (path::__is_encoded_char): Use __is_one_of.
2624 * include/std/bit (_If_is_unsigned_integer_type): Remove.
2625 (_If_is_unsigned_integer): Use __is_unsigned_integer.
2626 (rotl(byte, unsigned), rotr(byte, unsigned), countl_zero(byte))
2627 (countl_one(byte), countr_zero(byte), countr_one(byte))
2628 (popcount(byte), ispow2(byte), ceil2(byte), floor2(byte))
2629 (log2p1(byte)): Remove.
2630 * include/std/charconv (__detail::__is_one_of): Move to <type_traits>.
2631 (__detail::__is_int_to_chars_type): Remove.
2632 (__detail::__integer_to_chars_result_type): Use __is_signed_integer
2633 and __is_unsigned_integer.
2634 * include/std/type_traits (__is_one_of): Move here from <charconv>.
2635 (__is_signed_integer, __is_unsigned_integer): New helpers.
2636 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
2637 std::byte overload.
2638 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
2639 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
2640 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
2641 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
2642 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
2643 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
2644 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
2645 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
2646 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
2647 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.
2648
e88d863c
JW
26492019-06-25 Jonathan Wakely <jwakely@redhat.com>
2650
2651 * include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
2652 function.
2653
32bab8b6
JJ
26542019-06-25 Jakub Jelinek <jakub@redhat.com>
2655
2656 * include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
2657 _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
2658 Define to OpenMP 5.0 pragmas even for GCC 10.0+.
2659 (_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
2660
ff164b60
JW
26612019-06-24 Jonathan Wakely <jwakely@redhat.com>
2662
a3c8d7fb
JW
2663 * include/std/numeric (midpoint(T, T)): Change implementation for
2664 floating-point types to avoid incorrect rounding of denormals.
2665 * testsuite/26_numerics/midpoint/floating.cc: Add check for correct
2666 rounding with denormals.
2667 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
2668 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2669
ff164b60
JW
2670 * testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
2671
94872d7f
JW
26722019-06-20 Jonathan Wakely <jwakely@redhat.com>
2673
86f73527
JW
2674 * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
2675 stage of bootstrap.
2676 * configure: Regenerate.
2677
d306dee3
JW
2678 * include/std/variant (_Variant_storage, _Extra_visit_slot_needed):
2679 Qualify calls to __never_valueless.
2680
9f35dcd4
JW
2681 * doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
2682 C++17 working draft.
2683
94872d7f
JW
2684 * testsuite/libstdc++-prettyprinters/simple.cc: Use non-palindromic
2685 vector<bool> for test.
2686 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2687
638ad333
JW
26882019-06-19 Jonathan Wakely <jwakely@redhat.com>
2689
2690 * include/bits/stream_iterator.h (istream_iterator::_M_equal()): Make
2691 private.
2692 (istream_iterator::_M_read()): Do not check stream state before
2693 attempting extraction. Set stream pointer to null when extraction
2694 fails (P0738R2).
2695 (operator==(const istream_iterator&, const istream_iterator&)): Change
2696 to be a hidden friend of istream_iterator.
2697 (operator!=(const istream_iterator&, const istream_iterator&)):
2698 Likewise.
2699 (ostream_iterator::ostream_iterator()): Add default constructor.
2700 (ostream_iterator::ostream_iterator(ostream_type*, const C*)): Use
2701 addressof.
2702 * testsuite/24_iterators/istream_iterator/1.cc: New test.
2703 * testsuite/24_iterators/ostream_iterator/1.cc: New test.
2704 * testsuite/24_iterators/ostream_iterator/70766.cc: Also check
2705 constructor taking a string.
2706 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
2707 New test.
2708
36d0dada
MW
27092019-06-19 Michael Weghorn <m.weghorn@posteo.de>
2710 Jonathan Wakely <jwakely@redhat.com>
2711
2712 PR libstdc++/90945
2713 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Use
2714 values of type bool for vector<bool> elements.
2715 * testsuite/libstdc++-prettyprinters/simple.cc: Test vector<bool>.
2716 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2717
74fda2dc
JW
27182019-06-19 Jonathan Wakely <jwakely@redhat.com>
2719
0fd9e848
JW
2720 PR libstdc++/90920 partially revert r263433
2721 * include/bits/stl_algo.h (__rotate): Restore checks for empty ranges.
2722 (rotate): Remove checks.
2723 * testsuite/25_algorithms/rotate/90920.cc: New test.
2724
74fda2dc
JW
2725 * include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
2726 category used in invocable check.
2727 (reduce(Iter, Iter, T)): Pass initial value as rvalue.
2728 * testsuite/26_numerics/reduce/2.cc: New test.
2729
0c65926f
JW
27302019-06-18 Jonathan Wakely <jwakely@redhat.com>
2731
ed920373
JW
2732 * include/bits/algorithmfwd.h: Change title of doc group.
2733 * include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
2734 P0024R2.
2735 * include/bits/stl_numeric.h: Define doc group and add algos to it.
2736 * include/std/numeric (__is_random_access_iter): New internal trait.
2737 (reduce, transform_reduce, exclusive_scan, inclusive_scan)
2738 (transform_exclusive_scan, transform_inclusive_scan): Likewise.
2739 * testsuite/25_algorithms/for_each/for_each_n.cc: New test.
2740 * testsuite/26_numerics/exclusive_scan/1.cc: New test.
2741 * testsuite/26_numerics/inclusive_scan/1.cc: New test.
2742 * testsuite/26_numerics/reduce/1.cc: New test.
2743 * testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
2744 * testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
2745 * testsuite/26_numerics/transform_reduce/1.cc: New test.
2746 * testsuite/util/testsuite_iterators.h (test_container::size()): New
2747 member function.
2748
0c65926f
JW
2749 * include/c_global/cstddef (std::byte): Perform arithmetic operations
2750 in unsigned int to avoid promotion (LWG 2950).
2751
26b1320e
JW
27522019-06-17 Jonathan Wakely <jwakely@redhat.com>
2753
39f901e9
JW
2754 * testsuite/20_util/allocator/1.cc: Add sized delete, which fixes a
2755 failure on AIX.
2756
360a758e
JW
2757 * include/c_global/cmath (__lerp, lerp): Add noexcept (LWG 3201).
2758
26b1320e
JW
2759 PR libstdc++/90281 Fix string conversions for filesystem::path
2760 * include/bits/fs_path.h (u8path) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
2761 Use codecvt_utf8_utf16 instead of codecvt_utf8. Use
2762 __str_codecvt_in_all to fail for partial conversions and throw on
2763 error.
2764 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS && _GLIBCXX_USE_CHAR8_T]
2765 (path::_Cvt<char8_t>): Add explicit specialization.
2766 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Remove
2767 overloads.
2768 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2769 if-constexpr instead of dispatching to _S_wconvert. Use codecvt
2770 instead of codecvt_utf8. Use __str_codecvt_in_all and
2771 __str_codecvt_out_all.
2772 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2773 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
2774 (path::_S_str_convert) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2775 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
2776 with allocator. Use __str_codecvt_out_all. Fallthrough to POSIX code
2777 after converting to UTF-8.
2778 (path::_S_str_convert): Use codecvt instead of codecvt_utf8. Use
2779 __str_codecvt_in_all.
2780 (path::string): Fix initialization of string types with different
2781 allocators.
2782 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2783 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2784 * include/bits/locale_conv.h (__do_str_codecvt): Reorder static and
2785 runtime conditions.
2786 (__str_codecvt_out_all, __str_codecvt_in_all): New functions that
2787 return false for partial conversions.
2788 * include/experimental/bits/fs_path.h (u8path):
2789 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Implement correctly for mingw.
2790 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_wconvert): Add
2791 missing handling for char8_t. Use codecvt and codecvt_utf8_utf16
2792 instead of codecvt_utf8. Use __str_codecvt_in_all and
2793 __str_codecvt_out_all.
2794 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::_Cvt::_S_convert): Use
2795 codecvt instead of codecvt_utf8. Use __str_codecvt_out_all.
2796 (path::string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2797 codecvt_utf8_utf16 instead of codecvt_utf8. Construct return values
2798 with allocator. Use __str_codecvt_out_all and __str_codecvt_in_all.
2799 (path::string) [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2800 __str_codecvt_in_all.
2801 (path::u8string) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use
2802 codecvt_utf8_utf16 instead of codecvt_utf8. Use __str_codecvt_out_all.
2803 * src/c++17/fs_path.cc (path::_S_convert_loc): Use
2804 __str_codecvt_in_all.
2805 * src/filesystem/path.cc (path::_S_convert_loc): Likewise.
2806 * testsuite/27_io/filesystem/path/construct/90281.cc: New test.
2807 * testsuite/27_io/filesystem/path/factory/u8path.cc: New test.
2808 * testsuite/27_io/filesystem/path/native/string.cc: Test with empty
2809 strings and with Unicode characters outside the basic multilingual
2810 plane.
2811 * testsuite/27_io/filesystem/path/native/alloc.cc: New test.
2812 * testsuite/experimental/filesystem/path/construct/90281.cc: New test.
2813 * testsuite/experimental/filesystem/path/factory/u8path.cc: New test.
2814 * testsuite/experimental/filesystem/path/native/alloc.cc: New test.
2815 * testsuite/experimental/filesystem/path/native/string.cc: Test with
2816 empty strings and with Unicode characters outside the basic
2817 multilingual plane.
2818
b0c849fa
FD
28192019-06-17 François Dumont <fdumont@gcc.gnu.org>
2820 Jonathan Wakely <jwakely@redhat.com>
2821
2822 * include/bits/hashtable.h (struct _Hashtable::_Scoped_node): New type.
2823 (_Hashtable::_M_insert_unique_node): Add key_type parameter. Don't
2824 deallocate node if insertion fails.
2825 (_Hashtable::_M_insert_multi_node): Likewise.
2826 (_Hashtable::_M_reinsert_node): Pass additional key argument.
2827 (_Hashtable::_M_reinsert_node_multi): Likewise. Remove FIXME.
2828 (_Hashtable::_M_extract_node(size_t, __node_base*)): New function.
2829 (_Hashtable::extract(const_iterator)): Use _M_extract_node.
2830 (_Hashtable::extract(const _Key&)): Likewise.
2831 (_Hashtable::_M_merge_unique): Pass additional key argument.
2832 (_Hashtable::_M_emplace<Args>(true_type, Args&&...)): Likewise. Use
2833 _Scoped_node.
2834 (_Hashtable::_M_insert): Likewise.
2835 * include/bits/hashtable_policy.h (_Map_base::operator[]): Likewise.
2836 (_Hashtable_alloc): Add comments to functions with misleading names.
2837
9a9c7a62
JW
28382019-06-17 Jonathan Wakely <jwakely@redhat.com>
2839
2840 * testsuite/20_util/bad_function_call/what.cc: Include <string> header
2841 for std::string.
2842 * testsuite/20_util/shared_ptr/cons/weak_ptr_expired.cc: Likewise.
2843 * testsuite/20_util/tuple/cons/allocator_with_any.cc: Include <memory>
2844 header for std::allocator.
2845 * testsuite/23_containers/array/tuple_interface/tuple_element.cc: Add
2846 using-declaration for std::size_t.
2847 * testsuite/23_containers/array/tuple_interface/tuple_size.cc:
2848 Likewise.
2849 * testsuite/23_containers/deque/cons/55977.cc: Include <istream> for
2850 std::istream.
2851 * testsuite/23_containers/vector/cons/55977.cc: Likewise.
2852 * testsuite/experimental/map/erasure.cc: Include <string> for
2853 std::string.
2854 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
2855
c68c4c98
JW
28562019-06-14 Jonathan Wakely <jwakely@redhat.com>
2857
cc28d234
JW
2858 * include/experimental/type_traits (experimental::nonesuch): Use
2859 pragma to disable -Wctor-dtor-privacy warnings.
2860 * include/std/type_traits (__is_convertible_helper<From, To, false>)
2861 (__is_nt_convertible_helper<From, To, false>, __nonesuch): Likewise.
2862
c68c4c98
JW
2863 * include/std/version (__cpp_lib_bind_front): Add missing macro.
2864
cd0b94e6
JW
28652019-06-12 Jonathan Wakely <jwakely@redhat.com>
2866
95b3d0fd
JW
2867 * include/std/algorithm (__cpp_lib_parallel_algorithm): Fix value.
2868 * include/std/memory (__cpp_lib_parallel_algorithm): Likewise.
2869 * include/std/numeric (__cpp_lib_parallel_algorithm): Likewise.
2870 * testsuite/25_algorithms/pstl/feature_test.cc: New test.
2871
801b2266
JW
2872 * include/std/variant (get<T>, get<N>, get_if<N>, get_if<T>)
2873 (variant::emplace): Change static_assert messages from "should be"
2874 to "must be".
2875 (hash<monostate>::operator()): Remove name of unused parameter.
2876
ce657a74
JW
2877 * include/std/mutex (scoped_lock::~scoped_lock()): Use fold
2878 expression.
2879
cd0b94e6
JW
2880 * include/Makefile.am: Add new <bits/charconv.h> header.
2881 * include/Makefile.in: Regenerate.
2882 * include/bits/basic_string.h (to_string(int), to_string(unsigned))
2883 (to_string(long), to_string(unsigned long), to_string(long long))
2884 (to_string(unsigned long long)): Rewrite to use __to_chars_10_impl.
2885 * include/bits/charconv.h: New header.
2886 (__detail::__to_chars_len): Move here from <charconv>.
2887 (__detail::__to_chars_10_impl): New function extracted from
2888 __detail::__to_chars_10.
2889 * include/std/charconv (__cpp_lib_to_chars): Add, but comment out.
2890 (__to_chars_unsigned_type): New class template that reuses
2891 __make_unsigned_selector_base::__select to pick a type.
2892 (__unsigned_least_t): Redefine as __to_chars_unsigned_type<T>::type.
2893 (__detail::__to_chars_len): Move to new header.
2894 (__detail::__to_chars_10): Add inline specifier. Move code doing the
2895 output to __detail::__to_chars_10_impl and call that.
2896 * include/std/version (__cpp_lib_to_chars): Add, but comment out.
2897 * testsuite/21_strings/basic_string/numeric_conversions/char/
2898 to_string.cc: Fix reference in comment. Remove unused variable.
2899 * testsuite/21_strings/basic_string/numeric_conversions/char/
2900 to_string_int.cc: New test.
2901
d37c29f9
ESR
29022019-06-09 Edward Smith-Rowland <3dw4rd@verizon.net>
2903
2904 Fix ConstexprIterator requirements tests - No constexpr algorithms!
2905 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2906 Replace copy with hand-rolled loop.
2907 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2908 Ditto.
2909
79f31e3d
ESR
29102019-06-08 Edward Smith-Rowland <3dw4rd@verizon.net>
2911
2912 Test for C++20 p0858 - ConstexprIterator requirements.
2913 * testsuite/21_strings/basic_string_view/requirements/constexpr_iter.cc:
2914 New test.
2915 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
2916 New test.
2917
f32ee8a2
TR
29182019-06-07 Thomas Rodgers <trodgers@redhat.com>
2919
2920 Rename PSTL macro's consistent with libstdc++ (and llvm upstream
2921 project) standards.
2922 * include/bits/c++config: Rename all macros of the form __PSTL* to
2923 _PSTL*.
2924 * include/std/algorithm: Likewise.
2925 * include/std/execution: Likewise.
2926 * include/std/numeric: Likewise.
2927 * include/std/memory: Likewise.
2928 * include/pstl/glue_memory_impl.h: Likewise.
2929 * include/pstl/numeric_impl.h: Likewise.
2930 * include/pstl/glue_memory_defs.h: Likewise.
2931 * include/pstl/execution_defs.h: Likewise.
2932 * include/pstl/utils.h: Likewise.
2933 * include/pstl/algorithm_fwd.h: Likewise.
2934 * include/pstl/unseq_backend_simd.h: Likewise.
2935 * include/pstl/glue_execution_defs.h: Likewise.
2936 * include/pstl/algorithm_impl.h: Likewise.
2937 * include/pstl/parallel_impl.h: Likewise.
2938 * include/pstl/memory_impl.h: Likewise.
2939 * include/pstl/glue_numeric_defs.h: Likewise.
2940 * include/pstl/parallel_backend_utils.h: Likewise.
2941 * include/pstl/glue_algorithm_defs.h: Likewise.
2942 * include/pstl/parallel_backend.h: Likewise.
2943 * include/pstl/glue_numeric_impl.h: Likewise.
2944 * include/pstl/parallel_backend_tbb.h: Likewise.
2945 * include/pstl/numeric_fwd.h: Likewise.
2946 * include/pstl/glue_algorithm_impl.h: Likewise.
2947 * include/pstl/execution_impl.h: Likewise.
2948 * include/pstl/pstl_config.h: Likewise.
2949 * testsuite/util/pstl/pstl_test_config.h: Likewise.
2950 * testsuite/util/pstl/test_utils.h: Likewise.
2951 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
2952 Likewise.
2953 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
2954 Likewise.
2955 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
2956 Likewise.
2957 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
2958 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: Likewise.
2959 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
2960 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: Likewise.
2961 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
2962 Likewise.
2963 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: Likewise.
2964 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: Likewise.
2965 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: Likewise.
2966 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: Likewise.
2967 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
2968 Likewise.
2969 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: Likewise.
2970 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: Likewise.
2971 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: Likewise.
2972 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: Likewise.
2973 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
2974 Likewise.
2975 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
2976 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: Likewise.
2977 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
2978 Likewise.
2979 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
2980 Likewise.
2981 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: Likewise.
2982 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
2983 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
2984 Likewise.
2985 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
2986 Likewise.
2987 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
2988 Likewise.
2989 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
2990 Likewise.
2991 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
2992 Likewise.
2993 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
2994 Likewise.
2995 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
2996 Likewise.
2997 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
2998 Likewise.
2999 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
3000 Likewise.
3001 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
3002 Likewise.
3003 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
3004 Likewise.
3005 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: Likewise.
3006
3007 Rename header guards to be consistent with upstream project's
3008 conventions.
3009 * include/pstl/glue_memory_impl.h: Rename all macros of the form
3010 _PSTL_(.*)_H to _PSTL_\U\1_H.
3011 * include/pstl/numeric_impl.h: Likewise.
3012 * include/pstl/glue_memory_defs.h: Likewise.
3013 * include/pstl/execution_defs.h: Likewise.
3014 * include/pstl/utils.h: Likewise.
3015 * include/pstl/algorithm_fwd.h: Likewise.
3016 * include/pstl/unseq_backend_simd.h: Likewise.
3017 * include/pstl/glue_execution_defs.h: Likewise.
3018 * include/pstl/algorithm_impl.h: Likewise.
3019 * include/pstl/parallel_impl.h: Likewise.
3020 * include/pstl/memory_impl.h: Likewise.
3021 * include/pstl/glue_numeric_defs.h: Likewise.
3022 * include/pstl/parallel_backend_utils.h: Likewise.
3023 * include/pstl/glue_algorithm_defs.h: Likewise.
3024 * include/pstl/parallel_backend.h: Likewise.
3025 * include/pstl/glue_numeric_impl.h: Likewise.
3026 * include/pstl/parallel_backend_tbb.h: Likewise.
3027 * include/pstl/numeric_fwd.h: Likewise.
3028 * include/pstl/glue_algorithm_impl.h: Likewise.
3029 * include/pstl/execution_impl.h: Likewise.
3030 * include/pstl/pstl_config.h: Likewise.
3031 * testsuite/util/pstl/pstl_test_config.h: Likewise.
3032
3033 Synchronize libstdc++ parallel algorithms with upstream
3034 project.
3035 * include/pstl/algorithm_fwd.h: Synchronize with
3036 upstream PSTL project.
3037 * include/pstl/algorithm_impl.h: Likewise.
3038 * include/pstl/execution_defs.h: Likewise.
3039 * include/pstl/execution_impl.h: Likewise.
3040 * include/pstl/glue_algorithm_impl.h: Likewise.
3041 * include/pstl/glue_execution_defs.h: Likewise.
3042 * include/pstl/numeric_fwd.h: Likewise.
3043 * include/pstl/numeric_impl.h: Likewise.
3044 * include/pstl/parallel_backend.h: Likewise.
3045 * include/pstl/pstl_config.h: Likewise.
3046 * include/pstl/unseq_backend_simd.h: Likewise.
3047 * include/pstl/parallel_backend_serial.h: New file.
3048 * include/Makefile.am (pstl_headers): Add
3049 parallel_backend_serial.h.
3050 * include/Makefile.in: Regenerate.
3051
3052 Clean up non-conforming names
3053 * include/pstl/algorithm_impl.h (__parallel_set_union_op):
3054 Uglfiy copy_range1 and copy_range2
3055 (__pattern_walk2_n): Rename local n to __n
3056 * include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
3057 Rename parameter _T to _Tp.
3058
3059 Integrate non-TBB serial backend support
3060 * include/bits/c++config: Adjust TBB detection logic to select serial
3061 PSTL backend if no TBB present.
3062 * testsuite/utils/pstl/test_utils.h: Remove check for
3063 _PSTL_USE_PAR_POLICIES
af4e8d4d 3064
2b326685
JW
30652019-06-07 Jonathan Wakely <jwakely@redhat.com>
3066
c1b4c4f4
JW
3067 * testsuite/24_iterators/container_access.cc: Move dg-options before
3068 dg-do directive so the target check uses the -std option.
3069
2b326685
JW
3070 PR libstdc++/90770
3071 * configure: Regenerate.
3072 * src/Makefile.am (stamp-debug): Also test for missing makefile.
3073 * src/Makefile.in: Regenerate.
3074
d355635e
JW
30752019-06-06 Jonathan Wakely <jwakely@redhat.com>
3076
beb0086f
JW
3077 * include/std/array: Do not include <stdexcept>.
3078 * include/std/optional: Include <exception> and
3079 <bits/exception_defines.h> instead of <stdexcept>.
3080 * testsuite/20_util/function_objects/searchers.cc: Include <cctype>
3081 for std::isalnum.
3082 * testsuite/20_util/tuple/cons/deduction.cc: Include <memory> for
3083 std::allocator.
3084 * testsuite/23_containers/map/erasure.cc: Include <string>.
3085 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3086
ad60f428
JW
3087 * testsuite/23_containers/deque/requirements/dr438/assign_neg.cc: Add
3088 dg-prune-output for different C++98 diagnostic.
3089 * testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc:
3090 Likewise.
3091 * testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc:
3092 Likewise.
3093 * testsuite/23_containers/deque/requirements/dr438/insert_neg.cc:
3094 Likewise.
3095 * testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
3096 Likewise.
3097 * testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc:
3098 Likewise.
3099 * testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc:
3100 Likewise.
3101 * testsuite/23_containers/list/requirements/dr438/insert_neg.cc:
3102 Likewise.
3103 * testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
3104 Likewise.
3105 * testsuite/23_containers/vector/requirements/dr438/
3106 constructor_1_neg.cc: Likewise.
3107 * testsuite/23_containers/vector/requirements/dr438/
3108 constructor_2_neg.cc: Likewise.
3109 * testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
3110 Likewise.
3111 * testsuite/libstdc++-prettyprinters/compat.cc: Do not run for C++98.
3112
d561a18e
JW
3113 * testsuite/23_containers/unordered_map/requirements/debug_container.cc:
3114 Do not test allocator rebinding extension for C++2a.
3115 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
3116 dg-do directive for C++17 and C++2a.
3117
a2dbc0bf
JW
3118 * testsuite/23_containers/deque/requirements/explicit_instantiation/
3119 1_c++0x.cc: Remove redundant test.
3120 * testsuite/23_containers/deque/requirements/explicit_instantiation/
3121 2.cc: Use target selector instead of preprocessor condition.
3122 * testsuite/23_containers/deque/requirements/explicit_instantiation/
3123 3.cc: Do not run test for C++2a.
3124 * testsuite/23_containers/forward_list/requirements/
3125 explicit_instantiation/3.cc: Likewise.
3126 * testsuite/23_containers/forward_list/requirements/
3127 explicit_instantiation/5.cc: Do not test allocator rebinding extension
3128 for C++2a.
3129 * testsuite/23_containers/list/requirements/explicit_instantiation/
3130 1_c++0x.cc: Remove redundant test.
3131 * testsuite/23_containers/list/requirements/explicit_instantiation/
3132 2.cc: Use target selector instead of preprocessor condition.
3133 * testsuite/23_containers/list/requirements/explicit_instantiation/
3134 3.cc: Do not run test for C++2a.
3135 * testsuite/23_containers/list/requirements/explicit_instantiation/
3136 5.cc: Do not test allocator rebinding extension for C++2a.
3137 * testsuite/23_containers/map/requirements/explicit_instantiation/
3138 1_c++0x.cc: Remove redundant test.
3139 * testsuite/23_containers/map/requirements/explicit_instantiation/
3140 2.cc: Adjust comment.
3141 * testsuite/23_containers/map/requirements/explicit_instantiation/
3142 3.cc: Do not run test for C++2a.
3143 * testsuite/23_containers/map/requirements/explicit_instantiation/
3144 5.cc: Do not test allocator rebinding extension for C++2a.
3145 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
3146 1_c++0x.cc: Remove redundant test.
3147 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
3148 3.cc: Do not run test for C++2a.
3149 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
3150 5.cc: Do not test allocator rebinding extension for C++2a.
3151 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
3152 3.cc: Do not run test for C++2a.
3153 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
3154 5.cc: Do not test allocator rebinding extension for C++2a.
3155 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
3156 Do not run test for C++2a.
3157 * testsuite/23_containers/set/requirements/explicit_instantiation/
3158 1_c++0x.cc: Remove redundant test.
3159 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
3160 Do not test allocator rebinding extension for C++2a.
3161 * testsuite/23_containers/unordered_map/requirements/
3162 explicit_instantiation/3.cc: Likewise.
3163 * testsuite/23_containers/unordered_map/requirements/
3164 explicit_instantiation/5.cc: Do not test allocator rebinding extension
3165 for C++2a.
3166 * testsuite/23_containers/unordered_multimap/requirements/
3167 explicit_instantiation/3.cc: Do not run test for C++2a.
3168 * testsuite/23_containers/unordered_multimap/requirements/
3169 explicit_instantiation/5.cc: Do not test allocator rebinding extension
3170 for C++2a.
3171 * testsuite/23_containers/unordered_multiset/requirements/
3172 explicit_instantiation/3.cc: Do not run test for C++2a.
3173 * testsuite/23_containers/unordered_multiset/requirements/
3174 explicit_instantiation/5.cc: Do not test allocator rebinding extension
3175 for C++2a.
3176 * testsuite/23_containers/unordered_set/requirements/
3177 explicit_instantiation/3.cc: Do not run test for C++2a.
3178 * testsuite/23_containers/unordered_set/requirements/
3179 explicit_instantiation/5.cc: Do not test allocator rebinding extension
3180 for C++2a.
3181 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
3182 2.cc: Remove redundant test.
3183 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
3184 3.cc: Do not run test for C++2a.
3185 * testsuite/23_containers/vector/requirements/explicit_instantiation/
3186 3.cc: Likewise.
3187
209ee624
JW
3188 * include/std/type_traits (is_empty, is_polymorphic, is_final)
3189 (is_abstract, is_aggregate): Remove static_assert.
3190 * testsuite/20_util/is_abstract/incomplete_neg.cc: Check for error
3191 from builtin only.
3192 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise. Add
3193 missing -std=gnu++17 option.
3194 * testsuite/20_util/is_empty/incomplete_neg.cc: New test.
3195 * testsuite/20_util/is_final/incomplete_neg.cc: New test.
3196 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: Check for error
3197 from builtin only.
3198
061a7450
JW
3199 * testsuite/18_support/set_terminate.cc: Do not run for C++98 mode.
3200 * testsuite/18_support/set_unexpected.cc: Likewise.
3201 * testsuite/20_util/is_nothrow_invocable/value.cc: Test converting to
3202 void.
3203 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix constexpr
3204 function to be valid in C++11.
3205 * testsuite/26_numerics/complex/proj.cc: Do not run for C++98 mode.
3206 * testsuite/experimental/names.cc: Do not run for C++98 mode. Do not
3207 include Library Fundamentals or Networking headers in C++11 mode.
3208 * testsuite/ext/char8_t/atomic-1.cc: Do not run for C++98 mode.
3209
d355635e
JW
3210 * include/std/tuple (_TC): Replace with _TupleConstraints.
3211 (_TupleConstraints): New helper for SFINAE constraints, with more
3212 expressive member functions to reduce duplication when used.
3213 (tuple::_TC2, tuple::_TMC, tuple::_TNTC): Remove.
3214 (tuple::_TCC): Replace dummy type parameter with bool non-type
3215 parameter that can be used to check the pack size.
3216 (tuple::_ImplicitDefaultCtor, tuple::_ExplicitDefaultCtor)
3217 (tuple::_ImplicitCtor, tuple::_ExplicitCtor): New alias templates for
3218 checking constraints in constructors.
3219 (tuple::__valid_args, tuple::_UseOtherCtor, tuple::__use_other_ctor):
3220 New SFINAE helpers.
3221 (tuple::tuple): Use new helpers to reduce repitition in constraints.
3222 (tuple::tuple(allocator_arg_t, const Alloc&)): Constrain.
3223 (tuple<T1, T2>::_TCC, tuple<T1, T2>::_ImplicitDefaultCtor)
3224 (tuple<T1, T2>::_ExplicitDefaultCtor, tuple<T1, T2>::_ImplicitCtor)
3225 (tuple<T1, T2>::_ExplicitCtor): New alias templates for checking
3226 constraints in constructors.
3227 (tuple::__is_alloc_arg()): New SFINAE helpers.
3228 (tuple<T1, T2>::tuple): Use new helpers to reduce repitition in
3229 constraints.
3230 (tuple<T1, T2>::tuple(allocator_arg_t, const Alloc&)): Constrain.
3231 * testsuite/20_util/tuple/cons/90700.cc: New test.
3232 * testsuite/20_util/tuple/cons/allocators.cc: Add default constructor
3233 to meet new constraint on allocator-extended default constructor.
3234
ffef1e30
JW
32352019-06-03 Jonathan Wakely <jwakely@redhat.com>
3236
3237 * include/bits/stl_map.h (map): Disable static assert for C++98 mode.
3238 * include/bits/stl_multimap.h (multimap): Likewise.
3239
7cfe71d1
FD
32402019-06-03 François Dumont <fdumont@gcc.gnu.org>
3241
3242 Rename variables and cleanup comments.
3243 * include/bits/hashtable_policy.h
3244 * include/bits/hashtable.h
3245
ebaf3659
JW
32462019-06-03 Jonathan Wakely <jwakely@redhat.com>
3247
bf5824f9
JW
3248 * doc/xml/manual/status_cxx2020.xml: Add missing row for P0920R2.
3249 Fix bgcolor for P0340R3.
3250 * doc/html/*: Regenerate.
3251
512a80ec
JW
3252 PR libstdc++/90686
3253 * doc/xml/manual/status_cxx2014.xml: Document what's missing from
3254 <experimental/memory_resource>.
3255 * doc/xml/manual/status_cxx2020.xml: Document status of P1285R0,
3256 P0339R6, P0340R3, P1164R1 and P1357R1.
3257 * doc/html/*: Regenerate.
3258
ebaf3659
JW
3259 * doc/xml/manual/status_cxx2020.xml: Document P1463R1 status.
3260 * include/bits/forward_list.h [__cplusplus > 201703]: Enable
3261 allocator::value_type assertion for C++2a.
3262 * include/bits/hashtable.h: Likewise.
3263 * include/bits/stl_deque.h: Likewise.
3264 * include/bits/stl_list.h: Likewise.
3265 * include/bits/stl_map.h: Likewise.
3266 * include/bits/stl_multimap.h: Likewise.
3267 * include/bits/stl_multiset.h: Likewise.
3268 * include/bits/stl_set.h: Likewise.
3269 * include/bits/stl_vector.h: Likewise.
3270 * testsuite/23_containers/deque/48101-3_neg.cc: New test.
3271 * testsuite/23_containers/forward_list/48101-3_neg.cc: New test.
3272 * testsuite/23_containers/list/48101-3_neg.cc: New test.
3273 * testsuite/23_containers/map/48101-3_neg.cc: New test.
3274 * testsuite/23_containers/multimap/48101-3_neg.cc: New test.
3275 * testsuite/23_containers/multiset/48101-3_neg.cc: New test.
3276 * testsuite/23_containers/set/48101-3_neg.cc: New test.
3277 * testsuite/23_containers/unordered_map/48101-3_neg.cc: New test.
3278 * testsuite/23_containers/unordered_multimap/48101-3_neg.cc: New test.
3279 * testsuite/23_containers/unordered_multiset/48101-3_neg.cc: New test.
3280 * testsuite/23_containers/unordered_set/48101-3_neg.cc: New test.
3281 * testsuite/23_containers/vector/48101-3_neg.cc: New test.
3282
d030d4c5
GP
32832019-05-31 Gerald Pfeifer <gerald@pfeifer.com>
3284
3285 * doc/xml/manual/allocator.xml: Move hoard.org back to http.
3286
b1bb4869
JW
32872019-05-31 Jonathan Wakely <jwakely@redhat.com>
3288
3289 * include/std/tuple (tuple<>): Add noexcept to allocator-extended
3290 constructors.
3291 (tuple<T1, T2>::__nothrow_default_constructible()): New helper
3292 function.
3293 (tuple<T1, T2>::tuple(), explicit tuple<T1, T2>::tuple()): Use helper.
3294
3263fb9c
JW
32952019-05-31 Jonathan Wakely <jwakely@redhat.com>
3296
ff0b7e88
JW
3297 * src/c++98/bitmap_allocator.cc: Add using-declaration for size_t.
3298
3228289e
JW
3299 PR libstdc++/90682
3300 * libsupc++/eh_term_handler.cc: Include eh_term_handler.h to get
3301 definition of _GLIBCXX_DEFAULT_TERM_HANDLER.
3302 * libsupc++/eh_term_handler.h: New header defining
3303 _GLIBCXX_DEFAULT_TERM_HANDLER.
3304 * libsupc++/eh_terminate.cc: Include eh_term_handler.h.
3305 (set_terminate): Restore default handler when argument is null.
3306 (set_unexpected): Likewise.
3307 * testsuite/18_support/set_terminate.cc: New test.
3308 * testsuite/18_support/set_unexpected.cc: New test.
3309
3263fb9c
JW
3310 * include/backward/hashtable.h (size_t, ptrdiff_t)
3311 (forward_iterator_tag, input_iterator_tag, _Construct, _Destroy)
3312 (distance, vector, pair, __iterator_category): Remove
3313 using-declarations that add these names to namespace __gnu_cxx.
3314 * include/ext/bitmap_allocator.h (size_t, ptrdiff_t): Likewise.
3315 * include/ext/debug_allocator.h (size_t): Likewise.
3316 * include/ext/functional (size_t, unary_function, binary_function)
3317 (mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t, const_mem_fun1_ref_t):
3318 Likewise.
3319 * include/ext/malloc_allocator.h (size_t, ptrdiff_t): Likewise.
3320 * include/ext/memory (ptrdiff_t, pair, __iterator_category): Likewise.
3321 * include/ext/mt_allocator.h (size_t, ptrdiff_t): Likewise.
3322 * include/ext/new_allocator.h (size_t, ptrdiff_t): Likewise.
3323 * include/ext/numeric (iota): Fix outdated comment.
3324 * include/ext/pool_allocator.h (size_t, ptrdiff_t): Likewise.
3325 * include/ext/rb_tree (_Rb_tree, allocator): Likewise.
3326 * include/ext/rope (size_t, ptrdiff_t, allocator, _Destroy): Likewise.
3327 * include/ext/ropeimpl.h (size_t, printf, basic_ostream)
3328 (__throw_length_error, _Destroy, std::__uninitialized_fill_n_a):
3329 Likewise.
3330 * include/ext/slist (size_t, ptrdiff_t, _Construct, _Destroy)
3331 (allocator, __true_type, __false_type): Likewise.
3332
608a080c
AP
33332019-05-31 Antony Polukhin <antoshkka@gmail.com>
3334
3335 PR libstdc++/71579
3336 * include/std/type_traits __type_identity, __is_complete_or_unbounded):
3337 New helpers for checking preconditions in traits.
3338 (is_trivial, is_trivially_copyable, is_standard_layout, is_pod)
3339 (is_literal_type, is_empty, is_polymorphic, is_final, is_abstract)
3340 (is_destructible, is_nothrow_destructible, is_constructible)
3341 (is_default_constructible, is_copy_constructible)
3342 (is_move_constructible, is_nothrow_default_constructible)
3343 (is_nothrow_constructible, is_nothrow_copy_constructible)
3344 (is_nothrow_move_constructible, is_copy_assignable, is_move_assignable)
3345 (is_nothrow_assignable, is_nothrow_copy_assignable)
3346 (is_nothrow_move_assignable, is_trivially_constructible)
3347 (is_trivially_copy_constructible, is_trivially_move_constructible)
3348 is_trivially_assignable, is_trivially_copy_assignable)
3349 (is_trivially_move_assignable, is_trivially_destructible)
3350 (alignment_of, is_swappable, is_nothrow_swappable, is_invocable)
3351 (is_invocable_r, is_nothrow_invocable)
3352 (has_unique_object_representations, is_aggregate): Add static_asserts
3353 to make sure that type traits are not misused with incomplete types.
3354 (__is_constructible_impl, __is_nothrow_default_constructible_impl)
3355 (__is_nothrow_constructible_impl, __is_nothrow_assignable_impl): New
3356 base characteristics without assertions that can be reused in other
3357 traits.
3358 * testsuite/20_util/is_complete_or_unbounded/memoization.cc: New test.
3359 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc: New
3360 test.
3361 * testsuite/20_util/is_complete_or_unbounded/value.cc: New test.
3362 * testsuite/20_util/is_abstract/incomplete_neg.cc: New test.
3363 * testsuite/20_util/is_aggregate/incomplete_neg.cc: New test.
3364 * testsuite/20_util/is_class/value.cc: Check incomplete type.
3365 * testsuite/20_util/is_function/value.cc: Likewise.
3366 * testsuite/20_util/is_move_constructible/incomplete_neg.cc: New test.
3367 * testsuite/20_util/is_nothrow_move_assignable/incomplete_neg.cc: New
3368 test.
3369 * testsuite/20_util/is_polymorphic/incomplete_neg.cc: New test.
3370 * testsuite/20_util/is_reference/value.cc: Check incomplete types.
3371 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
3372 * testsuite/20_util/is_union/value.cc: Likewise.
3373 * testsuite/20_util/is_void/value.cc: Likewise.
3374 * testsuite/util/testsuite_tr1.h: Add incomplete union type.
3375
aeedf077
JW
33762019-05-31 Jonathan Wakely <jwakely@redhat.com>
3377
3378 * include/bits/random.h (random_device::_M_init(const char*, size_t)):
3379 Add new private member function.
3380 * src/c++11/cow-string-inst.cc (random_device::_M_init(const string&))
3381 (random_device::_M_init_pretr1(const string&)): Call new private
3382 member with string data.
3383 * src/c++11/random.cc (random_device::_M_init(const char*, size_t)):
3384 Define.
3385 * testsuite/26_numerics/random/random_device/cons/default-cow.cc: New
3386 test using COW strings.
3387 * testsuite/26_numerics/random/random_device/cons/default.cc: Generate
3388 a value from the device.
3389 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
3390 Fix typo in token string.
3391
046af809
NDR
33922019-05-30 Nina Dinka Ranns <dinka.ranns@gmail.com>
3393
3394 LWG2788 basic_string spurious use of a default constructible allocator
3395 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
3396 (basic_string::_M_replace_dispatch): Construct temporary string with
3397 the current allocator.
3398 * testsuite/21_strings/basic_string/allocator/char/lwg2788.cc: New.
3399 * testsuite/21_strings/basic_string/allocator/wchar_t/lwg2788.cc: New.
3400
37ad0fc9
JW
34012019-05-30 Jonathan Wakely <jwakely@redhat.com>
3402
01b3b9e3
JW
3403 * doc/xml/manual/diagnostics.xml: Update list of headers that define
3404 exception classes.
3405 * doc/xml/manual/support.xml: Rewrite advice around NULL. Rewrite
3406 section about new/delete overloads. Improve section on verbose
3407 terminate handler.
3408 * doc/html/*: Regenerate.
3409
62971f46
JW
3410 * doc/xml/manual/status_cxx2020.xml: Add feature-test macro for
3411 P0811R3. Change status of P1353R0.
3412 * doc/html/*: Regenerate.
3413
37ad0fc9
JW
3414 * doc/xml/manual/status_cxx2011.xml: Use <variablelist> for
3415 documentation of implementation-defined types for [thread.req.native].
3416 * doc/xml/manual/status_cxx2017.xml: Update documentation of
3417 implementation-defined strings for [variant.bad.access]. Fix typo in
3418 documentation of implementation-defined support for [fs.conform.9945].
3419 * doc/html/*: Regenerate.
3420
b0c0d878
JW
34212019-05-29 Jonathan Wakely <jwakely@redhat.com>
3422
ea16f6ac
JW
3423 PR libstdc++/85494
3424 * testsuite/26_numerics/random/random_device/cons/token.cc: Fix test
3425 that fails on mingw-w64.
3426
3cb929a3
JW
3427 PR libstdc++/88881
3428 * src/c++17/fs_ops.cc [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
3429 (status(const path&, error_code&)): Use parent_path() to remove
3430 trailing slash.
3431 (symlink_status(const path&, error_code&)): Duplicate workaround for
3432 bug in _wstat for paths with trailing slash.
3433 * testsuite/27_io/filesystem/operations/remove_all.cc: Check path
3434 with trailing slash.
3435 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3436 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3437
e5ccb10a
JW
3438 * src/c++17/fs_path.cc (path::parent_path()): Create whole path at
3439 once instead of building it iteratively.
3440
65539b1e
JW
3441 * testsuite/util/testsuite_api.h: Remove names of unused parameters.
3442
b0c0d878
JW
3443 PR libstdc++/85494 use rdseed and rand_s in std::random_device
3444 * acinclude.m4 (GLIBCXX_CHECK_X86_RDSEED): Define macro to check if
3445 the assembler supports rdseed.
3446 * config.h.in: Regenerate.
3447 * configure: Regenerate.
3448 * configure.ac: Use GLIBCXX_CHECK_X86_RDSEED.
3449 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_CRT_RAND_S): Define.
3450 * doc/html/*: Regenerate.
3451 * doc/xml/manual/status_cxx2011.xml: Document new tokens.
3452 * include/bits/random.h (random_device::random_device()): Always call
3453 _M_init rather than _M_init_pretr1.
3454 (random_device::random_device(const string&)): Likewise.
3455 (random_device::operator()()): Always call _M_getval().
3456 (random_device::_M_file): Replace first member of union with an
3457 anonymous struct, with _M_file as its first member.
3458 * src/c++11/random.cc [_GLIBCXX_X86_RDRAND] (USE_RDRAND): Define.
3459 [_GLIBCXX_X86_RDSEED] (USE_RDSEED): Define.
3460 (USE_MT19937): Define if none of the above are defined.
3461 (USE_POSIX_FILE_IO): Define.
3462 (_M_strtoul): Remove.
3463 [USE_RDSEED] (__x86_rdseed): Define new function.
3464 [_GLIBCXX_USE_CRT_RAND_S] (__winxp_rand_s): Define new function.
3465 (random_device::_M_init(const string&)): Initialize new union members.
3466 Add support for "rdseed" and "rand_s" tokens. Decide what the
3467 "default" token does according to which USE_* macros are defined.
3468 [USE_POSIX_FILE_IO]: Store a file descriptor.
3469 [USE_MT19937]: Forward to _M_init_pretr1 instead.
3470 (random_device::_M_init_pretr1(const string&)) [USE_MT19937]: Inline
3471 code from _M_strtoul.
3472 [!USE_MT19937]: Call _M_init, transforming the old default token or
3473 numeric tokens to "default".
3474 (random_device::_M_fini()) [USE_POSIX_FILE_IO]: Use close not fclose.
3475 (random_device::_M_getval()): Use new union members to obtain a
3476 random number from the stored function pointer or file descriptor.
3477 [USE_MT19937]: Obtain a value from the mt19937 engine.
3478 (random_device::_M_getval_pretr1()): Call _M_getval().
3479 (random_device::_M_getentropy()) [USE_POSIX_FILE_IO]: Use _M_fd
3480 instead of fileno.
3481 [!USE_MT19937] (mersenne_twister): Do not instantiate when not needed.
3482 * testsuite/26_numerics/random/random_device/85494.cc: New test.
3483
d9b401df
JW
34842019-05-28 Jonathan Wakely <jwakely@redhat.com>
3485
441ed45c
JW
3486 PR libstdc++/90634
3487 * include/experimental/bits/fs_path.h (path::path(path&&)): Only call
3488 _M_split_cmpts() for a path with multiple components.
3489 (path::_S_is_dir_sep()): Add missing 'static' keyword to function.
3490 * src/filesystem/path.cc (path::_M_split_cmpts()): Count number of
3491 components and reserve space in vector. Return early when there is
3492 only one component.
3493 * testsuite/27_io/filesystem/path/construct/90634.cc: New test.
3494 * testsuite/experimental/filesystem/path/construct/90634.cc: New test.
3495
d9b401df
JW
3496 * testsuite/util/testsuite_fs.h (compare_paths): Use three-argument
3497 form of std::equals for C++11 compatibility.
3498
558f3941
GP
34992019-05-26 Gerald Pfeifer <gerald@pfeifer.com>
3500
3501 * doc/xml/manual/appendix_contributing.xml: Update pointer to
3502 C++ standard at ansi.org.
3503
2fb1b29d
JW
35042019-05-24 Jonathan Wakely <jwakely@redhat.com>
3505
09b4000c
JW
3506 * include/std/numeric (midpoint(T*, T*)): Fix incorrect result.
3507 * testsuite/26_numerics/midpoint/pointer.cc: Change "compile" test
3508 to "run".
3509
2fb1b29d
JW
3510 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Fix test.
3511 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused function.
3512
9a0af7e3
JW
35132019-05-23 Jonathan Wakely <jwakely@redhat.com>
3514
5f303216
JW
3515 * testsuite/20_util/function_objects/invoke/1.cc: Move C++17-specific
3516 tests to ...
3517 * testsuite/20_util/function_objects/invoke/3.cc: New test.
3518 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Change
3519 "compile" test to "run".
3520
fb3fc4bd
JW
3521 * doc/xml/manual/intro.xml: Document LWG DR 2996 change.
3522 * doc/html/*: Regenerate.
3523 * include/bits/shared_ptr.h (shared_ptr(shared_ptr&&, T*)): Add
3524 rvalue aliasing constructor.
3525 (static_pointer_cast, const_pointer, dynamic_pointer_cast)
3526 (reinterpret_pointer_cast): Add overloads taking rvalues.
3527 * include/bits/shared_ptr_base.h (__shared_ptr(__shared_ptr&&, T*)):
3528 Add rvalue aliasing constructor.
3529 * testsuite/20_util/shared_ptr/casts/1.cc: Change "compile" test to
3530 "run" and check return values as well as types.
3531 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
3532 * testsuite/20_util/shared_ptr/casts/rval.cc: New test.
3533 * testsuite/20_util/shared_ptr/cons/alias-rval.cc: New test.
3534 * testsuite/20_util/shared_ptr/cons/alias.cc: Remove unused return
3535 values.
3536
9a0af7e3
JW
3537 * doc/xml/manual/evolution.xml: Document LWG DR 2921 change.
3538 * doc/xml/manual/intro.xml: Likewise.
3539 * include/std/future (__create_task_state): Add default arguments
3540 to make providing an allocator optional.
3541 (packaged_task::packaged_task(F&&)): Call __create_task_state directly
3542 instead of delegating to another constructor.
3543 (packaged_task::packaged_task(allocator_arg_t, const A&, ...)): Do not
3544 define allocator-extended constructors for C++17 and later.
3545 * testsuite/30_threads/packaged_task/cons/alloc.cc: Only run test for
3546 C++11 and C++14.
3547 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
3548 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
3549 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
3550
0ce91914
HPN
35512019-05-23 Hans-Peter Nilsson <hp@axis.com>
3552
3553 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
3554 Don't run the libstdc++/83237 part on simulator targets.
3555
7dbab5dc
JW
35562019-05-23 Jonathan Wakely <jwakely@redhat.com>
3557
1a4f7c1b
JW
3558 * doc/xml/manual/status_cxx2017.xml: Add feature test macro for
3559 P0040R3.
3560 * doc/html/*: Regenerate.
3561
aa573a6a
JW
3562 * include/experimental/any (__any_caster): Use RTTI if comparing
3563 addresses fails, to support non-unique addresses in shared libraries.
3564 * include/std/any (__any_caster): Likewise.
3565
7dbab5dc
JW
3566 PR libstdc++/90220
3567 * include/experimental/any (__any_caster): Constrain to only be
3568 callable for object types. Use remove_cv_t instead of decay_t.
3569 If the type decays or isn't copy constructible, compare the manager
3570 function to a dummy specialization.
3571 (__any_caster): Add overload constrained for non-object types.
3572 (any::_Manager_internal<_Op>): Add dummy specialization.
3573 * testsuite/experimental/any/misc/any_cast.cc: Test function types
3574 and array types.
3575
52ea1caf
JW
35762019-05-22 Jonathan Wakely <jwakely@redhat.com>
3577
f9b22a0c
JW
3578 PR libstdc++/90557
3579 * src/c++17/fs_path.cc (path::_List::operator=(const _List&)): Fix
3580 reversed arguments to uninitialized_copy_n.
3581 * testsuite/27_io/filesystem/path/assign/copy.cc: Check that source
3582 is unchanged by copy assignment.
3583 * testsuite/util/testsuite_fs.h (compare_paths): Use std::equal to
3584 compare path components.
3585
52ea1caf
JW
3586 PR libstdc++/77691
3587 * include/experimental/memory_resource: Add system header pragma and
3588 do not define anything unless compiled as C++14 or later.
3589 (__resource_adaptor_common::__guaranteed_alignment): Remove.
3590 (__resource_adaptor_imp::do_allocate): If the requested alignment
3591 is a fundamental alignment then either allocate directly from _M_alloc
3592 or call the new _M_allocate function.
3593 (__resource_adaptor_imp::do_deallocate): Likewise for deallocation.
3594 (__resource_adaptor_imp::_M_allocate): New function that uses a copy
3595 of the allocator rebound to a POD type with the specified alignment.
3596 (__resource_adaptor_imp::_M_deallocate): Likewise for deallocation.
3597 * testsuite/experimental/memory_resource/new_delete_resource.cc:
3598 Adjust expected allocation sizes.
3599 * testsuite/experimental/memory_resource/resource_adaptor.cc: Remove
3600 xfail for Solaris x86.
3601
34d878c7
TR
36022019-05-21 Thomas Rodgers <trodgers@redhat.com>
3603
3604 LWG 3062 - Unnecessary decay_t in is_execution_policy_v
3605 * include/pstl/execution_defs.h (__enable_if_execution_policy):
3606 Use std::__remove_cvref_t when building with GCC.
3607
049f115a
JW
36082019-05-21 Jonathan Wakely <jwakely@redhat.com>
3609
f445f0f0
JW
3610 PR libstdc++/90252
3611 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3612 Use "additional_flags" to pass -ltbb to v3_target_compile command.
3613 Use check_v3_target_prop_cached to cache the result of the test.
3614
049f115a
JW
3615 * doc/xml/manual/shared_ptr.xml: Fix names of lock policy constants.
3616
83837311
TR
36172019-05-20 Thomas Rodgers <trodgers@redhat.com>
3618
3619 PR libstdc++/90252
3620 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3621 Changed v3_target_compile check from preprocess to executable.
3622 Added "-ltbb" to v3_target_compile flags.
3623
d748c543
TR
36242019-05-20 Thomas Rodgers <trodgers@redhat.com>
3625
3626 * testsuite/lib/libstdc++.exp (check_effective_target_tbb-backend):
3627 Add check for Thread Building Blocks 2018 or later.
3628
4c7399e9
JW
36292019-05-20 Jonathan Wakely <jwakely@redhat.com>
3630
3631 * testsuite/experimental/names.cc: Only include Networking TS headers
3632 on targets with the necessary Gthreads support.
3633
be9e458d
MP
36342019-05-20 Marek Polacek <polacek@redhat.com>
3635
3636 CWG 2094 - volatile scalars are trivially copyable.
3637 PR c++/85679
3638 * testsuite/20_util/is_trivially_copyable/value.cc: Change the expected
3639 result for volatile int.
3640
58487c21
JW
36412019-05-20 Jonathan Wakely <jwakely@redhat.com>
3642
7f67becc
JW
3643 * testsuite/17_intro/names.cc: Do not check 'ptr' on Solaris.
3644 * testsuite/experimental/names.cc: Include <experimental/filesystem>
3645 conditionally.
3646
58487c21
JW
3647 PR c++/90532 Ensure __is_constructible(T[]) is false
3648 * include/std/type_traits (__do_is_default_constructible_impl)
3649 (__is_default_constructible_atom, __is_default_constructible_safe):
3650 Remove.
3651 (is_default_constructible): Use is_constructible.
3652 * testsuite/20_util/is_constructible/value.cc: Check int[] case.
3653 * testsuite/20_util/is_default_constructible/value.cc: Likewise.
3654 * testsuite/20_util/is_trivially_constructible/value.cc: Likewise.
3655 * testsuite/20_util/is_trivially_default_constructible/value.cc:
3656 Likewise.
3657
e5178b98
PB
36582019-05-20 Pádraig Brady <pbrady@fb.com>
3659
3660 * libstdc++-v3/include/ext/new_allocator.h (deallocate): Pass the size
3661 to the deallocator with -fsized-deallocation.
3662
eb530cab
JW
36632019-05-20 Jonathan Wakely <jwakely@redhat.com>
3664
3665 * testsuite/experimental/memory_resource/new_delete_resource.cc: Fix
3666 test by passing correct alignment to deallocate function.
3667
1a0a3744
JW
36682019-05-18 Jonathan Wakely <jwakely@redhat.com>
3669
3670 PR libstdc++/90520
3671 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3672 Raise exception if unique_ptr tuple member has unknown structure.
3673 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__call__):
3674 Adjust worker to support new __uniq_ptr_data base class. Do not
3675 assume field called _M_head_impl is the first tuple element.
3676
6f1becb6
FD
36772019-05-17 François Dumont <fdumont@gcc.gnu.org>
3678
3679 * include/bits/stl_deque.h
3680 (_Deque_iterator<>::__ptr_to): Remove, use std::__ptr_rebind.
3681 (_Deque_base(_Deque_base&&, const allocator_type&)): New.
3682 (_Deque_base::_Deque_impl_data): New.
3683 (_Deque_base::_Deque_impl): Inherit latter.
3684 (_Deque_base::_Deque_impl::_M_swap_data): Move...
3685 (_Deque_base::_Deque_impl_data::_M_swap_data): ... here.
3686 (_Deque_base::_Deque_impl()): Add noexcept qualification.
3687 (_Deque_base::_Deque_impl(_Deque_impl&&, _Tp_alloc_type&&)): New.
3688 (_Deque_base::_Deque_impl::_M_get_Tp_allocator()): Remove static_cast.
3689 (deque<>::deque()): Default.
3690 (deque<>::deque(deque&&)): Default.
3691 (deque<>::deque(deque&&, const allocator_type&, false_type)): New.
3692 (deque<>::deque(deque&&, const allocator_type&, true_type)): New.
3693 (deque<>::deque(deque&&, const allocator_type&)): Delegate to latters.
3694 (deque<>::deque<_It>(_It, _It, const allocator_type&)): Use
3695 _M_range_initialize.
3696 (deque<>::assign<_It>(_It, _It)): Use _M_assign_aux.
3697 (deque<>::resize(size_type, const value_type&)): Share a single
3698 implementation.
3699 (deque<>::insert<_It>(const_iterator, _It, _It)): Use
3700 _M_range_insert_aux.
3701 [__cplusplus >= 201103L](_M_initialize_dispatch): Remove.
3702 [__cplusplus >= 201103L](_M_assign_dispatch): Remove.
3703 [__cplusplus >= 201103L](_M_insert_dispatch): Remove.
3704 * testsuite/23_containers/deque/allocator/default_init.cc: New.
3705
32a1aa70
JW
37062019-05-17 Jonathan Wakely <jwakely@redhat.com>
3707
c43c3af2
JW
3708 PR libstdc++/90246
3709 * include/std/variant (holds_alternative, get, get_if): Improve
3710 static assertion messages.
3711 (bad_variant_access::bad_variant_access()): Change default message.
3712 (__throw_bad_variant_access(bool)): New overload.
3713 (get): Use new overload.
3714 (visit, visit<R>): Improve exception message.
3715
ac781bc8
JW
3716 * testsuite/20_util/variant/compile.cc: Fix narrowing test for ILP32
3717 targets. Add more cases from P0608R3.
3718 * testsuite/20_util/variant/run.cc: Add more cases from P0608R3.
3719
593cda3e
JW
3720 * include/bits/random.h (seed_seq::param): Fix non-reserved name.
3721 * include/experimental/type_traits (is_detected_exact)
3722 (is_detected_exact_v): Likewise.
3723 * include/pstl/execution_defs.h (is_execution_policy)
3724 (is_execution_policy_v, __enable_if_execution_policy): Likewise.
3725 * include/pstl/execution_impl.h (__policy_traits): Likewise.
3726 * testsuite/17_intro/names.cc: Check for more non-reserved names.
3727 * testsuite/experimental/names.cc: New test.
3728
e625ccc2
JW
3729 PR libstdc++/85965
3730 * include/bits/hashtable.h (_Hashtable::~_Hashtable()): Remove static
3731 assertions from the destructor.
3732 * include/bits/hashtable_policy.h (_Hash_code_base::_M_hash_code):
3733 Move static_assert for hash function to here.
3734 (_Hash_table_base::_M_equals): Move static_assert for equality
3735 predicate to here.
3736 * include/bits/stl_tree.h (_Rb_tree::_S_value(_Const_Link_type)):
3737 Remove.
3738 (_Rb_tree::_S_key(_Const_Link_type)): Move assertions here. Access
3739 the value directly instead of calling _S_value.
3740 (_Rb_tree::_S_value(_Const_Base_ptr)): Remove.
3741 (_Rb_tree::_S_key(_Const_Base_ptr)): Do downcast and forward to
3742 _S_key(_Const_Link_type).
3743 * testsuite/23_containers/set/85965.cc: Check construction,
3744 destruction, assignment and size() do not trigger the assertions.
3745 * testsuite/23_containers/unordered_set/85965.cc: Likewise.
3746 * testsuite/23_containers/map/48101_neg.cc: Call find and adjust
3747 expected errors.
3748 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
3749 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
3750 * testsuite/23_containers/set/48101_neg.cc: Likewise.
3751 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
3752 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
3753 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
3754 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
3755
c471fb2f
JW
3756 * include/bits/invoke.h [__cplusplus < 201703L] (__invoke_r<void>):
3757 Use _GLIBCXX14_CONSTEXPR because void functions cannot be constexpr
3758 in C++11.
3759
32a1aa70
JW
3760 * doc/xml/manual/status_cxx2020.xml: Update P0608R3, P0777R1, and
3761 P1165R1 entries.
3762 * doc/html/*: Regenerate.
3763 * include/std/tuple (make_from_tuple): Use remove_reference_t instead
3764 of decay_t (P0777R1).
3765
935469da
FD
37662019-05-17 François Dumont <fdumont@gcc.gnu.org>
3767
3768 Move from state of allocators (LWG2593)
3769 * include/bits/stl_deque.h
3770 (_Deque_base(_Deque_base&&, false_type)): Remove.
3771 (_Deque_base(_Deque_base&&, true_type)): Remove.
3772 (_Deque_base(_Deque_base&&)): Adapt.
3773 (_Deque_base::_M_move_impl()): Remove.
3774 * testsuite/util/testsuite_allocator.h
3775 (propagating_allocator(propagating_allocator&&)): Preserve move from
3776 state.
3777 * testsuite/23_containers/deque/allocator/move_assign.cc (test02):
3778 Adapt.
3779 * testsuite/23_containers/forward_list/allocator/move_assign.cc (test02):
3780 Adapt.
3781 * testsuite/23_containers/list/allocator/move_assign.cc (test02): Adapt.
3782 * testsuite/23_containers/map/allocator/move_assign.cc (test02): Adapt.
3783 * testsuite/23_containers/multimap/allocator/move_assign.cc (test02):
3784 Adapt.
3785 * testsuite/23_containers/multiset/allocator/move_assign.cc (test02):
3786 Adapt.
3787 * testsuite/23_containers/set/allocator/move_assign.cc (test02): Adapt.
3788 * testsuite/23_containers/unordered_map/allocator/move_assign.cc
3789 (test02): Adapt.
3790 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc
3791 (test02): Adapt.
3792 * testsuite/23_containers/unordered_multiset/allocator/move_assign.cc
3793 (test02): Adapt.
3794 * testsuite/23_containers/unordered_set/allocator/move_assign.cc
3795 (test02): Adapt.
3796 * testsuite/23_containers/vector/allocator/move_assign.cc (test02):
3797 Adapt.
3798 * testsuite/23_containers/vector/bool/allocator/move_assign.cc (test02):
3799 Adapt.
3800 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc
3801 (test02): Adapt.
3802 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
3803 (test02): Adapt.
3804
0bc229db
JW
38052019-05-16 Jonathan Wakely <jwakely@redhat.com>
3806
71101282
JW
3807 * src/c++17/fs_ops.cc (absolute(const path&, error_code&))
3808 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Remove bogus assertion.
3809
d069df01
JW
3810 * include/std/variant (__overload_set): Remove.
3811 (_Arr): New helper.
3812 (_Build_FUN): New class template to define a single FUN overload,
3813 with specializations to prevent unwanted conversions, as per P0608R3.
3814 (_Build_FUNs): New class template to build an overload set of FUN.
3815 (_FUN_type): New alias template to perform overload resolution.
3816 (__accepted_type): Use integer_constant base for failure case. Use
3817 _FUN_type for successful case.
3818 (variant::__accepted_index): Use _Tp instead of _Tp&&.
3819 (variant::variant(_Tp&&)): Likewise.
3820 (variant::operator=(_Tp&&)): Likewise.
3821
b62dcd16
JW
3822 * include/std/variant (_Variant_storage<false, _Types...>::_M_reset):
3823 Replace raw visitation with a runtime check for the valueless state
3824 and a non-raw visitor.
3825 (_Variant_storage<false, _Types...>::_M_reset_impl): Remove.
3826 (variant::index()): Remove branch.
3827 (variant::swap(variant&)): Use valueless_by_exception() instead of
3828 comparing the index to variant_npos, and add likelihood attribute.
3829
eba20412
JW
3830 * include/bits/hashtable_policy.h (_Equal_helper): Remove.
3831 (_Hashtable_base::_Equal_hash_code): Define new class template.
3832 (_Hashtable_base::_M_equals): Use _Equal_hash_code instead of
3833 _Equal_helper.
3834
1f6ea968
JW
3835 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper::_S_get):
3836 Replace with _M_get non-static member function.
3837 (_Hashtable_ebo_helper::_S_cget): Replace with _M_cget non-static
3838 member function.
3839 (_Hash_code_base, _Local_iterator_base, _Hashtable_base):
3840 (_Hashtable_alloc): Adjust to use non-static members of EBO helper.
3841
0bc229db
JW
3842 * include/bits/hashtable_policy.h (_Hash_code_base::_M_swap): Use
3843 _S_get accessors for members in EBO helpers.
3844 (_Hash_code_base::_M_extract(), _Hash_code_base::_M_ranged_hash())
3845 (_Hash_code_base::_M_h1(), _Hash_code_base::_M_h2()): Remove non-const
3846 overloads.
3847 (_Hashtable_base::_M_swap): Use _S_get accessors for members in EBO
3848 helpers.
3849 (_Hashtable_base::_M_eq()): Remove non-const overload.
3850
e5d7010b
JW
38512019-05-15 Jonathan Wakely <jwakely@redhat.com>
3852
3853 * include/std/variant (visit, visit<R>): Qualify calls to __do_visit.
3854
ff8b2a0a
JW
38552019-05-14 Jonathan Wakely <jwakely@redhat.com>
3856
3857 * testsuite/util/testsuite_allocator.h (NullablePointer::operator bool):
3858 Fix return value.
3859
ccd1242e
RO
38602019-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3861
3862 * config/os/solaris/solaris2.10: Move to ...
3863 * config/os/solaris: ... this.
3864 * configure.host (os_include_dir): Adapt.
3865 (abi_baseline_pair): Remove Solaris 10 handling.
3866 * config/abi/post/i386-solaris2.10: Remove.
3867 * config/abi/post/sparc-solaris2.10: Remove.
3868 * config/abi/post/i386-solaris2.11: Rename to ...
3869 * config/abi/post/i386-solaris: ... this.
3870 * config/abi/post/sparc-solaris2.11: Rename to ...
3871 * config/abi/post/sparc-solaris: ... this.
3872
3873 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] [__sun]: Remove
3874 workaround.
3875
3876 * testsuite/ext/enc_filebuf/char/13598.cc: Remove *-*-solaris2.10
3877 xfail.
3878
956a62aa
JW
38792019-05-14 Jonathan Wakely <jwakely@redhat.com>
3880
3881 * include/std/variant (__visit_with_index): Remove typedef.
3882 (__deduce_visit_result): New tag type.
3883 (__raw_visit, __raw_idx_visit): New helper functions for "raw"
3884 visitation of possibly-valueless variants, forwarding to __do_visit
3885 with the relevant tag type.
3886 (_Variant_storage<false, _Types...>::_M_reset_impl): Use __raw_visit
3887 and make lambda return void.
3888 (__variant_construct): Likewise.
3889 (_Copy_assign_base::operator=, _Move_assign_base::operator=): Use
3890 __raw_idx_visit and make lambda return void.
3891 (_Multi_array::__untag_result): Add metafunction to check the function
3892 pointer type for a tag type that dictates the kind of visitation.
3893 (_Multi_array<_Ret(*)(_Visitor, _Variants...), __first, __rest...>):
3894 Use decltype(auto) instead of tagged function pointer type.
3895 (__gen_vtable_impl): Remove bool non-type parameter and unused
3896 _Variant_tuple parameter.
3897 (__gen_vtable_impl::__visit_invoke_impl): Remove.
3898 (__gen_vtable_impl::__do_visit_invoke): Remove.
3899 (__gen_vtable_impl::__do_visit_invoke_r): Remove.
3900 (__gen_vtable_impl::__visit_invoke): Use if-constexpr and __invoke_r
3901 for the visit<R> case, rather than dispatching to separate functions.
3902 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Use __raw_idx_visit and make
3903 lambda return void.
3904 (variant::swap): Likewise.
3905 (__do_visit): Replace two non-type template parameters with a single
3906 type parameter, so that the caller must specify the visitor's return
3907 type (or one of the tag types).
3908 (visit): Deduce a return type from the visitor and use the
3909 __deduce_visit_result tag to enforce that all overloads return the
3910 same type.
3911 (visit<R>): Call __do_visit<R> with explicit result type.
3912 (__variant_hash_call_base_impl::operator()): Use __raw_visit and make
3913 lambda return void.
3914
a73d2fa8
NDR
39152019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3916
3917 nonesuch is insufficiently useless (lwg2996)
3918 * include/std/type_traits (struct __nonesuch): Added private base
3919 class to make __nonesuch not an aggregate and removed deleted default
3920 constructor.
3921 * include/bits/stl_pair.h (struct __nonesuch_no_braces): Removed.
3922 (operator=(const pair&)): Use __nonesuch instead of
3923 __nonesuch_no_braces.
3924 (operator=(pair&&)): Likewise
3925 * include/std/tuple (operator=(const tuple&)): Use __nonesuch instead
3926 of __nonesuch_no_braces.
3927 (operator=(tuple&&)): Likewise
3928 * include/experimental/type_traits (struct nonesuch): Added private
3929 base class to make nonesuch not an aggregate and removed deleted
3930 default constructor.
3931 * testsuite/20_util/nonesuch/nonesuch.cc: New.
3932 * testsuite/experimental/type_traits/nonesuch.cc: New.
3933
8db7a05f
JW
39342019-05-14 Jonathan Wakely <jwakely@redhat.com>
3935
330b1747
JW
3936 * include/bits/std_function.h (_Simple_type_wrapper): Remove.
3937 (_Function_handler): Remove partial specializations for void return
3938 types and pointers to member.
3939 (_Function_handler::_M_manager): Adapt to removal of
3940 _Simple_type_wrapper.
3941 (_Function_handler::_M_invoke): Use __invoke_r instead of __invoke.
3942 * include/std/functional (_Bind_result::__enable_if_void)
3943 (_Bind_result::__disable_if_void): Remove sfinae helpers.
3944 (_Bind_result::__call): Use __invoke_r and remove overloads for void
3945 return types.
3946 * include/std/future (__future_base::_Task_state::_M_run)
3947 (__future_base::_Task_state::_M_run_delayed): Use __invoke_r and
3948 change return type of lambda expressions.
3949
78c2855d
JW
3950 * include/bits/invoke.h (__invoke_r): Define new function implementing
3951 the INVOKE<R> pseudo-function.
3952 * testsuite/20_util/function_objects/invoke/1.cc: Add more tests.
3953 * testsuite/20_util/function_objects/invoke/2.cc: New test.
3954
ce9f305e
JW
3955 * include/std/type_traits (__is_nt_convertible_helper): Define it
3956 unconditionally, not only for C++20.
3957 (__is_nothrow_convertible): Define internal trait for use in C++11.
3958 (__is_nt_invocable_impl: Fix by using __is_nothrow_convertible.
3959 (is_invocable_r_v, is_nothrow_invocable_r_v): Add missing parameter.
3960 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: New test.
3961 * testsuite/20_util/is_nothrow_convertible/value.cc: Check with type
3962 that has nothrow explicit conversion but potentially-throwing implicit
3963 conversion.
3964 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
3965 * testsuite/20_util/is_nothrow_invocable/value_ext.cc: Fix helper
3966 function to only consider implicit conversions.
3967 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Add comment.
3968
22b6a9c1
JW
3969 * include/std/iterator: Include <iosfwd> instead of <istream> and
3970 <ostream>.
3971
7198e982
JW
3972 * include/bits/stl_tree.h (_Rb_tree::erase(const Key*, const Key*)):
3973 Remove unused, non-standard function.
3974
0b3c00ff
JW
3975 * include/bits/regex.h (match_results::max_size()): Adjust return
3976 value to account for prefix/suffix/unmatched subs.
3977 (match_results::_M_resize(unsigned int)): Use _Base_type::assign to
3978 reset the contained sub matches.
3979 (match_results::_M_establish_failed_match(_Bi_iter)): Add new member
3980 function to set result state following a failed match.
3981 * include/bits/regex.tcc (__regex_algo_impl): Remove loop to set
3982 sub_match states after _M_resize. Use _M_establish_failed_match.
3983
8db7a05f
JW
3984 PR libstdc++/69724
3985 * include/std/thread (thread::_State_impl, thread::_S_make_state):
3986 Replace single _Callable parameter with variadic _Args pack, to
3987 forward them directly to the tuple of decayed copies.
3988 * testsuite/30_threads/thread/cons/69724.cc: New test.
3989
db33efde
NDR
39902019-05-14 Nina Dinka Ranns <dinka.ranns@gmail.com>
3991
3992 Inconsistency wrt Allocators in basic_string assignment (LWG2579)
3993 * include/bits/basic_string.h: (operator=(const basic_string&):
3994 Move allocator decision to assign.
3995 (assign(const basic_string&)): Move allocator decision here.
3996 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
3997 Add tests.
3998 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
3999 Add tests.
4000
1b18663e
JW
40012019-05-14 Jonathan Wakely <jwakely@redhat.com>
4002
c688848d
JW
4003 * testsuite/util/testsuite_allocator.h (memory_resource)
4004 (default_resource_mgr): Fix indentation.
4005
066f9ea2
JW
4006 * testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
4007 Use operator-> to access raw pointer member.
4008 * testsuite/23_containers/vector/59829.cc: Likewise.
4009 * testsuite/23_containers/vector/bool/80893.cc: Likewise.
4010 * testsuite/libstdc++-prettyprinters/cxx11.cc: Use NullablePointer.
4011 * testsuite/util/testsuite_allocator.h (NullablePointer): New utility
4012 for tests.
4013 (PointerBase, PointerBase_void): Derive from NullablePointer and use
4014 its constructors and equality operators. Change converting
4015 constructors to use operator-> to access private member of the other
4016 pointer type.
4017 (PointerBase_void::operator->()): Add, for access to private member.
4018 (operator-(PointerBase, PointerBase)): Change to hidden friend.
4019 (operator==(PointerBase, PointerBase)): Remove.
4020 (operator!=(PointerBase, PointerBase)): Remove.
4021
e25f488d
JW
4022 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__): Do
4023 not assume field called _M_head_impl is the first tuple element.
4024 * testsuite/libstdc++-prettyprinters/compat.cc: Make tuple
4025 implementation more accurate.
4026 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr with
4027 empty pointer type and non-empty deleter.
4028
1b18663e
JW
4029 LWG 2899 - Make is_move_constructible correct for unique_ptr
4030 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add move constructor,
4031 move assignment operator.
4032 (__uniq_ptr_impl::release(), __uniq_ptr_impl::reset(pointer)): Add.
4033 (__uniq_ptr_data): New class template with conditionally deleted
4034 special members.
4035 (unique_ptr, unique_ptr<T[], D>): Change type of data member from
4036 __uniq_ptr_impl<T, D> to __uniq_ptr_data<T, D>. Define move
4037 constructor and move assignment operator as defaulted.
4038 (unique_ptr::release(), unique_ptr<T[], D>::release()): Forward to
4039 __uniq_ptr_impl::release().
4040 (unique_ptr::reset(pointer), unique_ptr<T[], D>::reset<U>(U)): Forward
4041 to __uniq_ptr_impl::reset(pointer).
4042 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
4043 Check for new __uniq_ptr_data type.
4044 * testsuite/20_util/unique_ptr/dr2899.cc: New test.
4045
e6e08429
JW
40462019-05-13 Jonathan Wakely <jwakely@redhat.com>
4047
bceb07e3
JW
4048 PR libstdc++/90454.cc path construction from void*
4049 * include/bits/fs_path.h (path::_Path): Use remove_pointer so that
4050 pointers to void are rejected as well as void.
4051 * include/experimental/bits/fs_path.h (path::_Path): Likewise.
4052 * testsuite/27_io/filesystem/path/construct/80762.cc: Also check
4053 pointers to void.
4054 * testsuite/experimental/filesystem/path/construct/80762.cc: Likewise.
4055
e6e08429
JW
4056 * doc/xml/manual/policy_data_structures.xml: Comment out stray
4057 <remark> elements. Fix formatting of bibliography references.
4058
abac7fbe
ESR
40592019-05-13 Edward Smith-Rowland <3dw4rd@verizon.net>
4060
4061 * doc/xml/manual/status_cxx2020.xml: Document P0811R3 status.
4062
8afd780d 40632019-05-13 Jonathan Wakely <jwakely@redhat.com>
0d09ca25 4064
544be2be
JW
4065 Remove Profile Mode, deprecated since 7.1.0
4066 * doc/Makefile.am: Remove XML file for profile mode docs.
4067 * doc/Makefile.in: Regenerate.
4068 * doc/xml/authors.xml: Remove authors of profile mode docs.
4069 * doc/xml/manual/appendix_contributing.xml: Remove mention of profile
4070 mode.
4071 * doc/xml/manual/debug.xml: Likewise.
4072 * doc/xml/manual/evolution.xml: Document removal of profile mode.
4073 * doc/xml/manual/profile_mode.xml: Remove profile mode docs.
4074 * doc/xml/manual/spine.xml: Remove profile mode author credit.
4075 * doc/xml/manual/test.xml: Remove docs for dg-require-profile-mode
4076 directive.
4077 * doc/xml/manual/using.xml: Remove docs for profile mode headers and
4078 macro.
4079 * doc/html/*: Regenerate.
4080 * include/Makefile.am: Remove profile mode headers.
4081 * include/Makefile.in: Regenerate.
4082 * include/bits/c++config (std::__profile): Remove namespace.
4083 [_GLIBCXX_PROFILE]: Remove checks for macro.
4084 * include/profile/array: Remove.
4085 * include/profile/base.h: Remove.
4086 * include/profile/bitset: Remove.
4087 * include/profile/deque: Remove.
4088 * include/profile/forward_list: Remove.
4089 * include/profile/impl/profiler.h: Remove.
4090 * include/profile/impl/profiler_algos.h: Remove.
4091 * include/profile/impl/profiler_container_size.h: Remove.
4092 * include/profile/impl/profiler_hash_func.h: Remove.
4093 * include/profile/impl/profiler_hashtable_size.h: Remove.
4094 * include/profile/impl/profiler_list_to_slist.h: Remove.
4095 * include/profile/impl/profiler_list_to_vector.h: Remove.
4096 * include/profile/impl/profiler_map_to_unordered_map.h: Remove.
4097 * include/profile/impl/profiler_node.h: Remove.
4098 * include/profile/impl/profiler_state.h: Remove.
4099 * include/profile/impl/profiler_trace.h: Remove.
4100 * include/profile/impl/profiler_vector_size.h: Remove.
4101 * include/profile/impl/profiler_vector_to_list.h: Remove.
4102 * include/profile/iterator_tracker.h: Remove.
4103 * include/profile/list: Remove.
4104 * include/profile/map: Remove.
4105 * include/profile/map.h: Remove.
4106 * include/profile/multimap.h: Remove.
4107 * include/profile/multiset.h: Remove.
4108 * include/profile/ordered_base.h: Remove.
4109 * include/profile/set: Remove.
4110 * include/profile/set.h: Remove.
4111 * include/profile/unordered_base.h: Remove.
4112 * include/profile/unordered_map: Remove.
4113 * include/profile/unordered_set: Remove.
4114 * include/profile/vector: Remove.
4115 * scripts/run_doxygen: Do not process profile mode headers.
4116 * testsuite/23_containers/array/element_access/60497.cc: Don't use
4117 profile mode type.
4118 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
4119 Remove dg-skip-if for profile mode.
4120 * testsuite/23_containers/forward_list/capacity/1.cc: Remove
4121 preprocessor check for profile mode.
4122 * testsuite/23_containers/list/capacity/29134.cc: Likewise.
4123 * testsuite/23_containers/map/modifiers/extract.cc: Remove dg-skip-if
4124 for profile mode.
4125 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
4126 Likewise.
4127 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
4128 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
4129 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
4130 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
4131 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
4132 Likewise.
4133 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
4134 Likewise.
4135 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
4136 Likewise.
4137 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
4138 Likewise.
4139 * testsuite/23_containers/vector/bool/capacity/29134.cc: Remove
4140 preprocessor check for profile mode.
4141 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
4142 Likewise.
4143 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
4144 Remove dg-skip-if for profile mode.
4145 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
4146 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
4147 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
4148 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
4149 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
4150 * testsuite/Makefile.am: Remove profile_flags variable and
4151 * testsuite/Makefile.am: Remove profile_flags variable and
4152 check-profile target.
4153 * testsuite/Makefile.in: Regenerate.
4154 * testsuite/ext/profile/all.cc: Remove.
4155 * testsuite/ext/profile/mutex_extensions_neg.cc: Remove.
4156 * testsuite/ext/profile/profiler_algos.cc: Remove.
4157 * testsuite/ext/profile/replace_new.cc: Remove.
4158 * testsuite/ext/throw_allocator/deallocate_global.cc: Remove
4159 preprocessor check for profile mode.
4160 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
4161 * testsuite/lib/libstdc++.exp (check_v3_target_profile_mode): Remove.
4162 (check_v3_target_normal_mode): Do not check for profile mode macro.
4163 * testsuite/libstdc++-prettyprinters/80276.cc: Remove dg-skip-if for
4164 profile mode.
4165 * testsuite/libstdc++-prettyprinters/compat.cc: Likewise.
4166 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
4167 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
4168 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
4169 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
4170 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
4171 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
4172 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
4173 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
4174 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
4175
0d09ca25
JW
4176 Remove array_allocator extension, deprecated since 4.9.0
4177 * doc/xml/manual/allocator.xml: Remove documentation for
4178 array_allocator.
4179 * doc/xml/manual/evolution.xml: Document array_allocator removal.
4180 * doc/xml/manual/using.xml: Remove header from documentation.
4181 * include/Makefile.am: Remove <ext/array_allocator.h> header.
4182 * include/Makefile.in: Regenerate.
4183 * include/ext/array_allocator.h: Remove.
4184 * include/precompiled/extc++.h: Do not include removed header.
4185 * testsuite/ext/array_allocator/1.cc: Remove.
4186 * testsuite/ext/array_allocator/2.cc: Remove.
4187 * testsuite/ext/array_allocator/26875.cc: Remove.
4188 * testsuite/ext/array_allocator/3.cc: Remove.
4189 * testsuite/ext/array_allocator/check_deallocate_null.cc: Remove.
4190 * testsuite/ext/array_allocator/check_delete.cc: Remove.
4191 * testsuite/ext/array_allocator/check_new.cc: Remove.
4192 * testsuite/ext/array_allocator/variadic_construct.cc: Remove.
4193 * testsuite/ext/headers.cc: Do not include removed header.
4194
e9c54233
FD
41952019-05-11 François Dumont <fdumont@gcc.gnu.org>
4196
4197 * include/bits/stl_bvector.h
4198 (operator==(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4199 Make hidden friend.
4200 (operator<(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4201 Likewise.
4202 (operator!=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4203 Likewise.
4204 (operator>(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4205 Likewise.
4206 (operator<=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4207 Likewise.
4208 (operator>=(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4209 Likewise.
4210 (operator-(const _Bit_iterator_base&, const _Bit_iterator_base&)):
4211 Likewise.
4212 (_Bit_iterator::operator+(difference_type)): Likewise and allow NRVO
4213 copy elision.
4214 (_Bit_iterator::operator-(difference_type)): Likewise.
4215 (operator+(ptrdiff_t, const _Bit_iterator&)): Make hidden friend.
4216 (_Bit_const_iterator::operator+(difference_type)): Likewise and allow
4217 NRVO copy elision.
4218 (_Bit_const_iterator::operator-(difference_type)): Likewise.
4219 (operator+(ptrdiff_t, const _Bit_const_iterator&)): Make hidden friend.
4220
302b6996
JW
42212019-05-10 Jonathan Wakely <jwakely@redhat.com>
4222
1a1e427c
JW
4223 PR libstdc++/81266
4224 * testsuite/util/thread/all.h: Do not use remove_pointer for
4225 std::thread::native_handle_type.
4226
4b7a3ab8
JW
4227 PR libstdc++/90397
4228 * include/std/variant (_Variant_storage<false, Types...>::_M_storage())
4229 (_Variant_storage<true, Types...>::_M_reset()))
4230 (_Variant_storage<true, Types...>::_M_storage())): Add noexcept.
4231 (__get_storage): Likewise.
4232 (variant): Add noexcept to friend declarations for __get and
4233 __get_storage.
4234
7fb65a87
JW
4235 PR libstdc++/90388
4236 * include/bits/unique_ptr.h (default_delete, default_delete<T[]>):
4237 Use _Require for constraints.
4238 (operator>(nullptr_t, const unique_ptr<T,D>&)): Implement exactly as
4239 per the standard.
4240 (__uniq_ptr_hash): New base class with conditionally-disabled call
4241 operator.
4242 (hash<unique_ptr<T,D>>): Derive from __uniq_ptr_hash.
4243 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
4244 * testsuite/20_util/unique_ptr/hash/90388.cc: New test.
4245
302b6996
JW
4246 * include/bits/shared_ptr.h: Improve docs.
4247 * include/bits/shared_ptr_base.h: Likewise.
4248 * include/bits/stl_uninitialized.h: Likewise.
4249 * include/bits/unique_ptr.h: Likewise.
4250 * libsupc++/new: Likewise.
4251
b2536b7c
FD
42522019-05-09 François Dumont <fdumont@gcc.gnu.org>
4253
4254 * include/bits/stl_deque.h
4255 (operator==(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4256 Make hidden friend.
4257 (operator!=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4258 Likewise.
4259 (operator<(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4260 Likewise.
4261 (operator<=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4262 Likewise.
4263 (operator>(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4264 Likewise.
4265 (operator>=(const _Deque_iterator<>&, const _Deque_iterator<>&)):
4266 Likewise.
4267 (_Deque_iterator<>::operator+(difference_type)): Likewise and allow NRVO
4268 copy elision.
4269 (_Deque_iterator<>::operator-(difference_type)): Likewise.
4270
857c7202
FD
42712019-05-08 François Dumont <fdumont@gcc.gnu.org>
4272
4273 PR libstdc++/90277
4274 * testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
4275 (test01): Reserve for number of insertions to avoid rehash during test.
4276 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
4277 (test01): Likewise.
4278 * testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
4279 (test01): Likewise.
4280 (test02): Likewise.
4281 (test03): Likewise.
4282
041aa6ab
JW
42832019-05-08 Jonathan Wakely <jwakely@redhat.com>
4284
4285 * include/experimental/bits/fs_path.h: Improve docs.
4286 * include/experimental/bits/net.h: Fix wrong header name in comment.
4287 Do not document implementation details.
4288 * include/experimental/netfwd: Fix doxygen grouping.
4289
73e828be
JW
42902019-05-07 Jonathan Wakely <jwakely@redhat.com>
4291
0e7bd559
JW
4292 * include/bits/stl_pair.h: Improve docs.
4293 * include/std/tuple: Likewise.
4294
c34d3fd3
JW
4295 * doc/doxygen/doxygroups.cc (std::literals): Add documentation for
4296 inline namespace.
4297 * include/std/chrono: Improve docs.
4298 * include/std/ratio: Do not document implementation details.
4299 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
4300 line numbers.
4301 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
4302
f61a12b3
JW
4303 PR libstdc++/89102
4304 * doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
4305 * include/std/chrono (__duration_common_type_wrapper): Replace with ...
4306 (__duration_common_type): New helper.
4307 (common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
4308 __duration_common_type.
4309 (__timepoint_common_type_wrapper): Replace with ...
4310 (__timepoint_common_type): New helper.
4311 (common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
4312 Use __time_point_common_type.
4313 * include/std/type_traits (common_type<>): Define, as per LWG 2408.
4314 (__common_type_impl): If either argument is transformed by decay,
4315 use the common_type of the decayed types.
4316 (__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
4317 decayed, use __do_common_type_impl to get the common_type.
4318 (common_type<_Tp>): Use common_type<_Tp, _Tp>.
4319 (__do_member_type_wrapper, __member_type_wrapper)
4320 (__expanded_common_type_wrapper): Remove.
4321 (__common_type_pack, __common_type_fold): New helpers.
4322 (common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
4323 __member_type_wrapper and __expanded_common_type_wrapper.
4324 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
4325 Test zero-length template argument list.
4326 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
4327 Test single argument cases and argument types that should decay.
4328 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
4329 Adjust expected error.
4330 * testsuite/20_util/duration/literals/range_neg.cc: Use zero for
4331 dg-error lineno.
4332 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
4333 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
4334 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
4335
73e828be
JW
4336 * doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
4337
f4e678ef
NDR
43382019-05-01 Nina Dinka Ranns <dinka.ranns@gmail.com>
4339
4340 Make allocator propagation more consistent for
4341 operator+(basic_string) (P1165R1)
4342 * include/bits/basic_string.h
4343 (operator+(basic_string&&, basic_string&&): Changed resulting
4344 allocator to always be the one from the first parameter.
4345 * include/bits/basic_string.tcc
4346 (operator+(const _CharT*, const basic_string&)): Changed
4347 resulting allocator to be SOCCC on the second parameter's allocator.
4348 (operator+(_CharT, const basic_string&)): Likewise.
4349 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
4350 New.
4351 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
4352 New.
4353
99f12959
JW
43542019-05-07 Jonathan Wakely <jwakely@redhat.com>
4355
2313938e
JW
4356 * include/bits/regex.h: Improve docs.
4357 * include/bits/regex.tcc: Do not document implementation details.
4358
99f12959
JW
4359 * testsuite/19_diagnostics/error_code/hash.cc: New test.
4360
3997383b
FD
43612019-05-06 François Dumont <fdumont@gcc.gnu.org>
4362
4363 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
4364 Add type printer for container types in std::__debug namespace.
4365 * testsuite/lib/gdb-test.exp (whatis-regexp-test): New.
4366 (gdb-tests): Use distinct parameters for the type of test and use of
4367 regex.
4368 (gdb-test): Check for regex test even if 'whatis' test.
4369 * testsuite/libstdc++-prettyprinters/80276.cc: Adapt for _GLIBCXX_DEBUG
4370 mode.
4371 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
4372 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
4373 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
4374 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
4375 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
4376 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
4377 * testsuite/libstdc++-prettyprinters/whatis2.cc: Likewise.
4378
fe6fb0d1
JW
43792019-05-04 Jonathan Wakely <jwakely@redhat.com>
4380
5b503252
JW
4381 * include/std/system_error (error_category): Fix comment.
4382
854a5c77
JW
4383 PR libstdc++/90299
4384 * src/c++17/fs_ops.cc (absolute(const path&)): Report an error if the
4385 argument is an empty path.
4386 (absolute(const path&, error_code&)): Use invalid_argument as error
4387 code instead of no_such_file_or_directory.
4388 * testsuite/27_io/filesystem/operations/absolute.cc: Check handling
4389 of non-existent paths and empty paths with both overloads of absolute.
4390
2f7f1aca
JW
4391 * include/std/system_error (error_category, error_code)
4392 (error_condition): Improve docs.
4393 * libsupc++/exception: Add missing @addtogroup Doxygen command.
4394 * libsupc++/exception_ptr.h (exception_ptr): Link equality operators
4395 to class documentation. Suppress documentation for implementation
4396 details.
4397 * libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
4398 Suppress documentation for implementation details.
4399
fe6fb0d1
JW
4400 * include/std/system_error (error_code): Remove friend declaration
4401 for hash<error_code>.
4402 (hash<error_code>::operator()): Use public member functions to access
4403 value and category.
4404 (hash<error_condition>::operator()): Use address of category, not
4405 its object representation.
4406 * src/c++11/compatibility-c++0x.cc (hash<error_code>::operator()):
4407 Use public member functions to access value and category.
4408 * testsuite/19_diagnostics/error_condition/hash.cc: New test.
4409
de6f5f57
FD
44102019-05-04 François Dumont <fdumont@gcc.gnu.org>
4411
4412 * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment.
4413 * include/bits/hashtable_policy.h
4414 (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill.
4415 (_Power2_rehash_policy::_M_bkt_for_elements): Likewise.
4416 (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not
4417 smaller than input value rather than always greater. Preserve
4418 _M_next_resize if called with 0 input. Use __builtin_floorl.
4419 (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of
4420 elements + number of insertions is greater than _M_next_resize. Start
4421 with 11 buckets if not told otherwise. Use __builtin_floorl.
4422 (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements.
4423 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
4424 Preserve _M_next_resize if called with 0 input. Use __builtin_floorl.
4425 (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not
4426 told otherwise. Use __builtin_floorl.
4427 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test
4428 to also validate _Power2_rehash_policy.
4429 * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc:
4430 Adapt.
4431
56e5b093
JW
44322019-05-03 Jonathan Wakely <jwakely@redhat.com>
4433
e339291f
JW
4434 PR libstdc++/61761
4435 * testsuite/26_numerics/complex/proj.cc: Don't assume <cmath> defines
4436 std::copysign.
4437
56e5b093
JW
4438 PR libstdc++/52119
4439 * include/ext/numeric_traits.h (__glibcxx_min): Avoid integer
4440 overflow warning with -Wpedantic -Wsystem-headers.
4441
acd482ba
JW
44422019-05-02 Jonathan Wakely <jwakely@redhat.com>
4443
315f8b5f
JW
4444 PR libstdc++/90314
4445 * include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Use variadic macro.
4446 * include/bits/move.h (swap): Remove extra parentheses.
4447
b752e2c9
JW
4448 * include/experimental/bits/lfts_config.h: Improve doc markup.
4449 * include/experimental/optional: Improve docs.
4450 (_Has_addressof_mem, _Has_addressof_free, _Has_addressof)
4451 (__constexpr_addressof): Remove.
4452 (optional::operator->()): Use std::__addressof().
4453 * include/std/optional (optional::operator->()): Adjust whitespace.
4454 * testsuite/experimental/optional/constexpr/observers/2.cc: Check
4455 that operator-> is still constexpr with overloaded operator&. Change
4456 to compile-only test.
4457 * testsuite/experimental/optional/constexpr/observers/3.cc: Change to
4458 compile-only test.
4459
efa9d8ee
JW
4460 * include/bits/shared_ptr.h: Improve docs.
4461 * include/bits/shared_ptr_atomic.h: Likewise.
4462 * include/bits/unique_ptr.h: Likewise. Adjust whitespace.
4463
8c6a71e4
JW
4464 * include/bits/basic_string.h: Fix iterator/index confusion in
4465 Doxygen comments.
4466 * include/bits/range_access.h: Fix Doxygen warnings.
4467 * include/bits/refwrap.h: Do not document implementation details.
4468 (ref, cref): Group docs with reference_wrapper.
4469 * include/std/fstream: Fix Doxygen markup.
4470 * libsupc++/initializer_list (begin, end): Group docs with
4471 initializer_list.
4472
50d5fcf5
JW
4473 * doc/doxygen/user.cfg.in: Set MARKDOWN_SUPPORT=YES.
4474
725708ab
JW
4475 * include/bits/unique_lock.h: Fix/improve doxygen markup.
4476 * include/std/mutex: Likewise.
4477 * include/std/shared_mutex: Likewise.
4478
d727fdc4
JW
4479 * include/bits/fs_dir.h: Fix/improve doxygen markup.
4480 * include/bits/fs_fwd.h: Likewise.
4481 * include/bits/fs_ops.h: Likewise.
4482 * include/bits/fs_path.h: Likewise.
4483 * include/std/filesystem: Likewise.
4484
3084625d
JW
4485 * include/experimental/bits/net.h: Fix/improve doxygen markup.
4486 * include/experimental/buffer: Likewise.
4487 * include/experimental/executor: Likewise.
4488 * include/experimental/internet: Likewise.
4489 * include/experimental/io_context: Likewise.
4490 * include/experimental/net: Likewise.
4491 * include/experimental/netfwd: Likewise.
4492 * include/experimental/socket: Likewise.
4493 * include/experimental/timer: Likewise.
4494
1ababc8b
JW
4495 * doc/doxygen/doxygroups.cc: Move description of experimental group
4496 here.
4497 * include/experimental/algorithm: Add to libfund-ts doc group.
4498 * include/experimental/any: Likewise. Do not document implementation
4499 details.
4500 * include/experimental/array: Add to libfund-ts doc group.
4501 * include/experimental/bits/lfts_config.h: Define libfund-ts doc group
4502 for Library Fundamentals.
4503 * include/experimental/chrono: Add to libfund-ts doc group.
4504 * include/experimental/deque: Likewise.
4505 * include/experimental/forward_list: Likewise.
4506 * include/experimental/functional: Likewise.
4507 * include/experimental/iterator: Likewise.
4508 * include/experimental/list: Likewise.
4509 * include/experimental/map: Likewise.
4510 * include/experimental/memory: Likewise.
4511 * include/experimental/memory_resource: Likewise. Improve docs.
4512 details.
4513 * include/experimental/numeric: Add to libfund-ts doc group.
4514 * include/experimental/optional: Likewise.
4515 * include/experimental/propagate_const: Likewise.
4516 * include/experimental/random: Likewise.
4517 * include/experimental/ratio: Likewise.
4518 * include/experimental/regex: Likewise.
4519 * include/experimental/set: Likewise.
4520 * include/experimental/source_location: Likewise.
4521 * include/experimental/string: Likewise.
4522 * include/experimental/string_view: Likewise.
4523 * include/experimental/system_error: Likewise.
4524 * include/experimental/tuple: Likewise.
4525 * include/experimental/type_traits: Likewise.
4526 * include/experimental/unordered_map: Likewise.
4527 * include/experimental/unordered_set: Likewise.
4528 * include/experimental/utility: Likewise.
4529 * include/experimental/vector: Likewise.
4530 * testsuite/experimental/any/misc/any_cast_neg.cc: Adjust dg-error.
4531 * testsuite/experimental/array/neg.cc: Adjust dg-error.
4532 * testsuite/experimental/propagate_const/assignment/move_neg.cc:
4533 Likewise.
4534 * testsuite/experimental/propagate_const/cons/move_neg.cc: Likewise.
4535 * testsuite/experimental/propagate_const/requirements2.cc: Likewise.
4536 * testsuite/experimental/propagate_const/requirements3.cc: Likewise.
4537 * testsuite/experimental/propagate_const/requirements4.cc: Likewise.
4538 * testsuite/experimental/propagate_const/requirements5.cc: Likewise.
4539
caace300
JW
4540 * include/experimental/bits/fs_dir.h: Fix Doxygen markup.
4541 * include/experimental/bits/fs_fwd.h: Improve docs.
4542 * include/experimental/bits/fs_ops.h: fix Doxygen markup.
4543 * include/experimental/bits/fs_path.h: Likewise.
4544 (path, filesystem_error, u8path): Improve docs.
4545 * include/experimental/filesystem: Link to docs for TS.
4546
c05ab418
JW
4547 * config/allocator/new_allocator_base.h (__allocator_base): Add
4548 workaround for Doxygen bug #6945.
4549 * include/std/memory: Improve docs. Define group for pointer safety.
4550 * include/std/scoped_allocator: Improve docs. Use "undocumented"
4551 conditional to suppress documentation for implementation details.
4552
d16250de
JW
4553 * include/bits/specfun.h: Improve docs.
4554 * include/tr1/cmath: Likewise. Fix nesting of preprocessor conditions
4555 and namespaces.
4556
19aaf814
JW
4557 * doc/doxygen/doxygroups.cc (std::tr2, std::__gnu_cxx): Improve docs.
4558 (std::experimental): Add docs.
4559 * doc/doxygen/user.cfg.in (PREDEFINED): Expand macros for __cxx11
4560 namespace to nothing when generating docs.
4561 * include/bits/regex_constants.h (std::regex_constants): Improve docs.
4562 * include/std/chrono (std::chrono): Likewise.
4563 * include/std/functional (std::placeholders): Likewise.
4564 * include/std/thread (std::this_thread): Likewise.
4565
69b1efc7
JW
4566 * include/parallel/settings.h: Fix Doxygen markup.
4567
574dfb67
JW
4568 * include/ext/pb_ds/detail/bin_search_tree_/*_imps.hpp: Do not define
4569 anything unless PB_DS_CLASS_C_DEC is defined.
4570 * include/ext/pb_ds/detail/binary_heap_/*_imps.hpp: Likewise.
4571 * include/ext/pb_ds/detail/binomial_heap_/*_imps.hpp: Likewise.
4572 * include/ext/pb_ds/detail/binomial_heap_base_/*_imps.hpp: Likewise.
4573 * include/ext/pb_ds/detail/cc_hash_table_map_/*_imps.hpp: Likewise.
4574 * include/ext/pb_ds/detail/gp_hash_table_map_/*_imps.hpp: Likewise.
4575 * include/ext/pb_ds/detail/hash_fn/*_imp.hpp: Likewise.
4576 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/*_imps.hpp:
4577 Likewise.
4578 * include/ext/pb_ds/detail/list_update_map_/*_imps.hpp: Likewise.
4579 * include/ext/pb_ds/detail/ov_tree_map_/*_imps.hpp: Likewise.
4580 * include/ext/pb_ds/detail/pairing_heap_/*_imps.hpp: Likewise.
4581 * include/ext/pb_ds/detail/pat_trie_/*_imps.hpp: Likewise.
4582 * include/ext/pb_ds/detail/rb_tree_map_/*_imps.hpp: Likewise.
4583 * include/ext/pb_ds/detail/rc_binomial_heap_/*_imps.hpp: Likewise.
4584 * include/ext/pb_ds/detail/resize_policy*_imp.hpp: Likewise.
4585 * include/ext/pb_ds/detail/splay_tree_/*_imps.hpp: Likewise.
4586 * include/ext/pb_ds/detail/thin_heap_/*_imps.hpp: Likewise.
4587 * include/ext/pb_ds/detail/trie_policy*_imp.hpp: Likewise.
4588 * include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp:
4589 Likewise.
4590 * include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Likewise.
4591 * include/ext/pb_ds/detail/unordered_iterator/point_const_iterator.hpp:
4592 Likewise.
4593 * include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp:
4594 Likewise.
4595
acd482ba
JW
4596 * doc/doxygen/user.cfg.in: Regenerate with Doxygen 1.8.14 and set
4597 GROUP_NESTED_COMPOUNDS=YES and SORT_BY_SCOPE_NAME=NO. Add various
4598 _GLIBCXX_xxx macros and __attribute__(X) to PREDEFINED macros that
4599 Doxygen expands.
4600
7ee7c293
RO
46012019-05-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4602
4603 * config/abi/post/i386-solaris2.10/baseline_symbols.txt: Regenerate.
4604 * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: Likewise.
4605 * config/abi/post/i386-solaris2.11/baseline_symbols.txt: Likewise.
4606 * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: Likewise.
4607 * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: Likewise.
4608 * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
4609 Likewise.
4610 * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: Likewise.
4611 * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
4612 Likewise.
4613
4f75543d
JW
46142019-05-01 Jonathan Wakely <jwakely@redhat.com>
4615
4616 PR libstdc++/61761
4617 * include/std/complex (__complex_proj): Return parameter unchanged.
4618 [_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
4619 floating-point types to take std::complex arguments.
4620 [_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
4621 floating-point types.
4622 * testsuite/26_numerics/complex/proj.cc: New test.
4623
9e3501f7
JJ
46242019-04-30 Jakub Jelinek <jakub@redhat.com>
4625
4626 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Change _Lock_policyE2 exports
4627 to _Lock_policyE[012].
4628 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
4629
95767c65
JW
46302019-04-30 Jonathan Wakely <jwakely@redhat.com>
4631
4632 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
4633 macros accidentally left in.
4634 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
4635 unnecessary -lstdc++fs option. Fix test for mingw.
4636 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
4637 Fix test for mingw.
4638
379637d5
JJ
46392019-04-30 Jakub Jelinek <jakub@redhat.com>
4640
4641 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
4642
846541dd
JW
46432019-04-29 Jonathan Wakely <jwakely@redhat.com>
4644
f373ad68
JW
4645 * include/bits/stl_algo.h (generate_n): Adjust doxygen comment.
4646
81912fb3
JW
4647 * include/bits/move.h (swap(T&, T&), swap(T (&)[N], T (&)[N])): Use
4648 _GLIBCXX_NOEXCEPT_IF to simplify declarations.
4649
7bbdd8d1
JW
4650 PR libstdc++/71312
4651 * src/c++11/shared_ptr.cc (get_mutex): Align pool mutexes to 64 bytes.
4652
ad1f4687
JW
4653 * include/bits/stl_bvector.h (vector<bool>::empty()): Add nodiscard
4654 attribute.
4655
82b6276f
JW
4656 * include/bits/stl_iterator_base_types.h (_Iter_base): Remove unused
4657 class template and partial specialization.
4658
846541dd
JW
4659 PR libstdc++/87982
4660 * include/bits/stl_algo.h (generate_n): Convert _Size parameter to
4661 an integral type.
4662 * include/bits/stl_algobase.h (__size_to_integer): New overloaded
4663 functions to convert a value to an integral type.
4664 (__fill_n_a, __fill_n_a): Assert that __n is already an integral type.
4665 (fill_n): Convert _Size parameter to an integral type.
4666 * testsuite/25_algorithms/fill_n/87982.cc: New test.
4667 * testsuite/25_algorithms/fill_n/87982_neg.cc: New test.
4668 * testsuite/25_algorithms/fill_n/dr426.cc: New test.
4669 * testsuite/25_algorithms/generate_n/87982.cc: New test.
4670 * testsuite/25_algorithms/generate_n/87982_neg.cc: New test.
4671 * testsuite/25_algorithms/generate_n/dr426.cc: New test.
4672
ecc7ed8a 46732019-04-28 Nina Dinka Ranns <dinka.ranns@gmail.com>
ec087ba3
NDR
4674
4675 Adding noexcept-specification on tuple constructors (LWG 2899)
4676 * libstdc++-v3/include/std/tuple:
4677 (tuple()): Add noexcept-specification.
4678 (tuple(const _Elements&...)): Likewise
4679 (tuple(_UElements&&...)): Likewise
4680 (tuple(const tuple<_UElements...>&)): Likewise
4681 (tuple(tuple<_UElements...>&&)): Likewise
4682 (tuple(const _T1&, const _T2&)): Likewise
4683 (tuple(_U1&&, _U2&&)): Likewise
4684 (tuple(const tuple<_U1, _U2>&): Likewise
4685 (tuple(tuple<_U1, _U2>&&): Likewise
4686 (tuple(const pair<_U1, _U2>&): Likewise
4687 (tuple(pair<_U1, _U2>&&): Likewise
4688 * libstdc++-v3/testsuite/20_util/tuple/cons/noexcept_specs.cc: New
4689
2b326d53
MG
46902019-04-27 Marc Glisse <marc.glisse@inria.fr>
4691
4692 PR libstdc++/87106
4693 * include/bits/stl_uninitialized.h (__relocate_object_a): Mark the
4694 arguments with __restrict.
4695
ca2efef7
L
46962019-04-26 H.J. Lu <hongjiu.lu@intel.com>
4697
4698 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4699
3addb7b9
JW
47002019-04-26 Jonathan Wakely <jwakely@redhat.com>
4701
700e6332
JW
4702 * include/experimental/bits/fs_path.h
4703 (path::_S_convert_loc<_InputIterator>): Create const std::string to
4704 avoid redundant call to _S_convert_loc with non-const pointers.
4705
53e69273
JW
4706 * testsuite/20_util/variant/run.cc: Use a new Hashable type to test
4707 hashing, because pmr::string depends on _GLIBCXX_USE_CXX11_ABI==1.
4708 * testsuite/21_strings/basic_string/hash/hash.cc
4709 [!_GLIBCXX_USE_CXX11_ABI]: Don't test pmr strings.
4710 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc
4711 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
4712
8281e3b8
JW
4713 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace wildcard that matches
4714 wstring::_M_replace_dispatch with more specific patterns.
4715 * include/bits/fs_path.h (path::_S_convert_loc<_InputIterator>):
4716 Create const std::string to avoid redundant call to _S_convert_loc
4717 with non-const pointers.
4718 * include/bits/locale_conv.h (__do_str_codecvt): Use if-constexpr to
4719 avoid unnecessary basic_string::assign instantiations.
4720
3addb7b9
JW
4721 * include/std/memory (__uses_alloc_args): Add string-literal to
4722 static_assert, to match the one in __uses_alloc.
4723 [__cpp_concepts] (_Std_pair): Use C++2a syntax for concept.
4724 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: Check
4725 for recursive uses-allocator construction of nested pairs.
4726 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc:: Add
4727 comment.
4728
849ab78a
JJ
47292019-04-26 Jakub Jelinek <jakub@redhat.com>
4730
f8790a49
JJ
4731 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
4732 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
4733 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
4734 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
4735
849ab78a
JJ
4736 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4737 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4738 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4739 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4740 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4741 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4742 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4743
ee2f721c
JW
47442019-04-25 Jonathan Wakely <jwakely@redhat.com>
4745
4746 PR libstdc++/90239
4747 * doc/xml/manual/status_cxx2020.xml: Amend P0591R4 status.
4748 * include/std/scoped_allocator [__cplusplus > 201703L]
4749 (scoped_allocator_adaptor::construct): Define in terms of
4750 uses_allocator_construction_args, as per P0591R4.
4751 * testsuite/20_util/scoped_allocator/construct_pair_c++2a.cc: New test.
4752 * testsuite/util/testsuite_allocator.h: Remove name of unused
4753 parameter.
4754
86a57ce1
JW
47552019-04-24 Jonathan Wakely <jwakely@redhat.com>
4756
7c3e085e
JW
4757 * doc/xml/manual/status_cxx2017.xml: Document P0024R2 status.
4758 * doc/html/*: Regenerate.
4759
f90b16c4
JW
4760 * include/bits/fs_path.h (operator<, operator<=, operator>)
4761 (operator>=, operator==, operator!=): Make hidden friends, as per
4762 LWG 3065.
4763 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Fix
4764 string type in test.
4765 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
4766
303b2264
JW
4767 * include/std/any (any::any(ValueType&&)): Use __and_v.
4768 * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
4769 Likewise.
4770
81c7cf71
JW
4771 * include/std/tuple (apply): Use remove_reference_t instead of decay_t
4772 as per P0777R1.
4773 * include/std/type_traits (__result_of_memfun): Use remove_reference
4774 instead of __remove_cvref_t and remove redundant is_same check.
4775 (__inv_unwrap): Use __remove_cvref_t instead of decay_t.
4776
fb8b3e29
JW
4777 * include/experimental/string_view (basic_string_view::pointer)
4778 (basic_string_view::reference): Fix to refer to non-const value_type.
4779 * include/bits/basic_string.h (basic_string): Use __sv_check and
4780 __sv_limit instead of basic_string_view::_M_check and
4781 basic_string_view::_M_limit.
4782 * include/std/string_view (__sv_check, __sv_limit): New
4783 helper functions to replace basic_string_view::_M_check and
4784 basic_string_view::_M_limit.
4785 (basic_string_view): Add static assertions to enforce ill-formed
4786 requirement for traits_type::char_type from P1148R0, and to enforce
4787 required properties of char-like types.
4788 (basic_string_view::pointer, basic_string_view::reference): Fix to
4789 refer to non-const value_type.
4790 (basic_string_view::operator[], basic_string_view::at)
4791 (basic_string_view::front, basic_string_view::back)
4792 (basic_string_view::data): Use const_reference and const_pointer
4793 typedefs for return types.
4794 (basic_string_view::_M_check, basic_string_view::_M_limit): Remove.
4795 (hash<wstring_view>): Fix argument_type typedef.
4796 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4797 char/1.cc: Fix expected return type of basic_string_view::data().
4798 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/
4799 wchar_t/1.cc: Likewise.
4800 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4801 char/1.cc: Likewise.
4802 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/
4803 wchar_t/1.cc: Likewise.
4804 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
4805 New test.
4806 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4807 Check reference and pointer typedefs.
4808 * testsuite/experimental/string_view/requirements/typedefs.cc:
4809 Likewise.
4810 * testsuite/experimental/string_view/modifiers/remove_prefix/char/1.cc:
4811 Fix expected return type of basic_string_view::data().
4812 * testsuite/experimental/string_view/modifiers/remove_prefix/wchar_t/
4813 1.cc: Likewise.
4814 * testsuite/experimental/string_view/modifiers/remove_suffix/char/1.cc:
4815 Likewise.
4816 * testsuite/experimental/string_view/modifiers/remove_suffix/wchar_t/
4817 1.cc: Likewise.
4818
92750002
JW
4819 PR libstdc++/90220
4820 * include/std/any (__any_caster): Use remove_cv_t instead of decay_t.
4821 Avoid a runtime check for types that can never be stored in std::any.
4822 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4823 array types.
4824
f9bfdfa2
JW
4825 PR libstdc++/90220 (partial)
4826 * include/std/any (any_cast<T>(any*), any_cast<T>(const any*)): Do
4827 not attempt ill-formed static_cast to pointers to non-object types.
4828 * testsuite/20_util/any/misc/any_cast.cc: Test std::any_cast with
4829 function types.
4830
e0657c24
JW
4831 * testsuite/20_util/variant/run.cc: Catch exception by reference to
4832 prevent -Wcatch-value warning.
4833
86a57ce1
JW
4834 * include/std/variant (__variant_construct): Use template parameter
4835 type instead of equivalent decltype-specifier.
4836 (_Move_ctor_base<false, Types...>::_Move_ctor_base(_Move_ctor_base&&)):
4837 Replace forward with move.
4838 (_Move_ctor_base<false, Types...>::_M_destructive_move)
4839 (_Move_ctor_base<false, Types...>::_M_destructive_copy)
4840 (_Move_ctor_base<true, Types...>::_M_destructive_move)
4841 (_Move_ctor_base<true, Types...>::_M_destructive_copy): Only set the
4842 index after construction succeeds.
4843 (_Copy_assign_base<false, Types...>::operator=): Remove redundant
4844 if-constexpr checks that are always true. Use __remove_cvref_t instead
4845 of remove_reference so that is_nothrow_move_constructible check
4846 doesn't use a const rvalue parameter. In the potentially-throwing case
4847 construct a temporary and move assign it, as per LWG 2904.
4848 (_Move_assign_base<false, Types...>::operator=): Remove redundant
4849 if-constexpr checks that are always true. Use emplace as per LWG 2904.
4850 (variant::operator=(T&&)): Only use emplace conditionally, otherwise
4851 construct a temporary and move assign from it, as per LWG 2904.
4852 * testsuite/20_util/variant/exception_safety.cc: Check that
4853 assignment operators have strong exception safety guarantee.
4854
1bacd25b
TR
48552019-04-23 Thomas Rodgers <trodgers@redhat.com>
4856
4857 Document PSTL linker flags
4858
9588a07c 4859 * doc/xml/manual/using.xml: Add PSTL linker flags to table 3.1.
af4e8d4d 4860
82e8c3da
JW
48612019-04-23 Jonathan Wakely <jwakely@redhat.com>
4862
038bc9bf
JW
4863 * include/std/variant (__detail::__variant::_Traits): Make
4864 _S_trivial_copy_assign depend on _S_trivial_copy_ctor and make
4865 _S_trivial_move_assign depend on _S_trivial_move_ctor, as per
4866 P0602R4.
4867 (__detail::__variant::_Copy_assign_alias): Only depend on
4868 _S_trivial_copy_assign, which subsumes _S_trivial_copy_ctor now.
4869 * testsuite/20_util/variant/compile.cc: Correct checks for trivial
4870 move assignment operators.
4871
06715e1c
JW
4872 PR libstdc++/90165
4873 * include/std/variant (variant::__not_self): New helper for the
4874 is_same_v<remove_cvref_t<T>, variant>==false constraints.
4875 (variant::__to_type_impl): Remove.
4876 (variant::__to_type): Add default argument to check pack size, instead
4877 of using __to_type_impl.
4878 (variant::__accepted_type): Add default argument using __not_self.
4879 (variant::__is_in_place_tag, variant::__not_in_place_tag): New helpers
4880 for variant(T&&) constructor constraint.
4881 (variant::variant(T&&)): Use __not_in_place_tag in constraints.
4882 Extract __accepted_type into a named template parameter for reuse in
4883 other constraints and in the exception specification.
4884 (variant::variant(in_place_type_t<T>, Args&&...))
4885 (variant::variant(in_place_type_t<T>, initializer_list<U>, Args&&...))
4886 (variant::variant(in_place_index_t<T>, Args&&...))
4887 (variant::variant(in_place_index_t<T>, initializer_list<U>, Args&&...))
4888 (variant::operator=T&&)): Remove redundant && from trait arguments.
4889 * testsuite/20_util/variant/compile.cc: Check variant(T&&) constructor
4890 isn't used for in_place_type or in_place_index arguments.
4891
82e8c3da
JW
4892 * include/std/type_traits (unwrap_reference_t): Define for C++2a.
4893 (unwrap_ref_decay): Remove inheritance from unwrap_reference.
4894 * testsuite/20_util/unwrap_reference/1.cc: Adjust test to use alias.
4895
48528842
RR
48962019-04-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4897 Bernd Edlinger <bernd.edlinger@hotmail.de>
4898 Jakub Jelinek <jakub@redhat.com>
4899
4900 PR target/89093
4901 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
4902 general-regs-only target attribute for ARM.
4903
be46043e
JW
49042019-04-23 Jonathan Wakely <jwakely@redhat.com>
4905
47a468bd
JW
4906 PR libstdc++/87431
4907 * include/bits/basic_string.h (_Never_valueless_alt): Make partial
4908 specialization also depend on is_nothrow_move_constructible.
4909 * include/std/variant (__detail::__variant::__never_valueless()):
4910 Only true if the variant would have a move assignment operator.
4911 (__detail::__variant::_Variant_storage<false, T...>::_M_valid()):
4912 Check __never_valueless<T...>().
4913 (variant::emplace): Only perform non-throwing move assignments
4914 for never-valueless alternatives if the variant has a move assignment
4915 operator.
4916 * testsuite/20_util/variant/compile.cc: Check that never-valueless
4917 types can be emplaced into non-assignable variants.
4918 * testsuite/20_util/variant/run.cc: Check that never-valueless types
4919 don't get copied when emplaced into non-assignable variants.
4920
be46043e
JW
4921 * include/std/variant (__detail::__variant::__ref_cast): Remove
4922 unused function.
4923 (__detail::__variant::_Uninitialized::_M_get)
4924 (__detail::__variant::__get)
4925 (__gen_vtable_impl::__element_by_index_or_cookie): Add noexcept.
4926
375eb99a
IS
49272019-04-21 Iain Sandoe <iain@sandoe.co.uk>
4928
4929 * testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
4930 to Darwin10.
4931 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
4932 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
4933 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
4934 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
4935
1dc5a184
TR
49362019-04-20 Thomas Rodgers <trodgers@redhat.com>
4937
4938 Delegate PSTL configuration to pstl/pstl_config.h
4939
4940 * include/bits/c++config: Remove explicit PSTL configuration
4941 macros and use definitions from <pstl/pstl_config.h>.
af4e8d4d 4942
9762ea56
TR
49432019-04-20 Thomas Rodgers <trodgers@redhat.com>
4944
4945 Cleanup algorithm implementations
4946 * include/pstl/glue_algorithm_impl.h (stable_sort): Forward
70265a0c 4947 execution policy.
9762ea56
TR
4948 (mismatch): Forward execution policy.
4949 (equal): Qualify call to std::equal().
4950 (partial_sort): Forward execution policy.
4951 (inplace_merge): Forward execution policy.
af4e8d4d 4952
a34d6343 49532019-04-19 Thomas Rodgers <trodgers@redhat.com>
af4e8d4d 4954
a34d6343
TR
4955 Improve implementation of parallel equal()
4956 * include/pstl/algorithm_impl.h
4957 (__internal::__brick_equal): use "4 iterator" version of
4958 std::equal().
4959 (__internal::__brick_equal): use simd for random access
4960 iterators on unsequenced execution policies.
4961 (__internal::__pattern_equal): add "4 iterator" version
4962 (__internal::__pattern_equal): dispatch to simd __brick_equal
4963 for vector-only execution policies.
4964 (__internal::__pattern_equal): dispatch to __parallel_or for
4965 parallel execution policies.
4966 * include/pstl/glue_algorithm_impl.h
4967 (std::equal): dispatch to "4 iterator" version of
4968 __internal::__pattern_equal().
af4e8d4d 4969
02c9b9cc
JW
49702019-04-17 Jonathan Wakely <jwakely@redhat.com>
4971
8c710065
JW
4972 PR libstdc++/90105
4973 * include/bits/forward_list.h (operator==): Do not use operator!= to
4974 compare elements.
4975 (forward_list<T, A>::sort(Comp)): When elements are equal take the one
4976 earlier in the list, so that sort is stable.
4977 * testsuite/23_containers/forward_list/operations/90105.cc: New test.
4978 * testsuite/23_containers/forward_list/comparable.cc: Test with
4979 types that meet the minimum EqualityComparable and LessThanComparable
4980 requirements. Remove irrelevant comment.
4981
5f00d0d5
JW
4982 * include/std/variant (__detail::__variant::_Traits::_S_copy_assign):
4983 Do not depend on whether all alternative types are move constructible.
4984 (__detail::__variant::_Copy_assign_base::operator=): Remove cv-quals
4985 from the operand when deciding whether to perform the assignment.
4986 * testsuite/20_util/variant/compile.cc (DeletedMoves): Define type
4987 with deleted move constructor and deleted move assignment operator.
4988 (default_ctor, copy_ctor, move_ctor, copy_assign, move_assign): Check
4989 behaviour of variants with DeletedMoves as an alternative.
4990 * testsuite/20_util/variant/run.cc (DeletedMoves): Define same type.
4991 (move_ctor, move_assign): Check that moving a variant with a
4992 DeletedMoves alternative falls back to copying instead of moving.
4993
990666d0
JW
4994 * testsuite/20_util/variant/compile.cc: Remove empty string literals
4995 from static_assert declarations.
4996
9d3e662d
JW
4997 * testsuite/20_util/variant/compile.cc (MoveCtorOnly): Fix type to
4998 actually match its name.
4999 (MoveCtorAndSwapOnly): Define new type that adds swap to MoveCtorOnly.
5000 (test_swap()): Fix result for MoveCtorOnly and check
5001 MoveCtorAndSwapOnly.
5002
02c9b9cc
JW
5003 * include/std/optional (optional::value_or(U&&) &&): Add missing
5004 constexpr specifier.
5005 * testsuite/20_util/optional/constexpr/observers/4.cc: Check value_or
5006 for disengaged optionals and rvalue optionals.
5007 * testsuite/20_util/optional/observers/4.cc: Likewise.
5008
71905b8a 50092019-04-12 Thomas Rodgers <trodgers@redhat.com>
af4e8d4d 5010
71905b8a
TR
5011 * include/pstl/algorithm_impl.h: Uglify identfiers.
5012 * include/pstl/numeric_impl.h: Uglify identfiers.
5013 * include/pstl/parallel_backend_tbb.h: Uglify identfiers.
5014
9eda9f92
TR
50152019-04-11 Thomas Rodgers <trodgers@redhat.com>
5016
5017 * include/bits/c++config:
5018 Add definition for __PSTL_ASSERT.
5019 Add definition for __PSTL_ASSERT_MSG.
5020 * include/pstl/algorithm_impl.h: Replace use of assert().
5021 * include/pstl/numeric_impl.h: Replace use of assert().
5022 * include/pstl/parallel_backend_tbb.h:
5023 Replace use of assert().
5024 Replace use of __TBB_ASSERT().
9eda9f92
TR
5025 * include/pstl/parallel_backend_utils.h: Replace use of assert().
5026
2c390a48
JW
50272019-04-11 Jonathan Wakely <jwakely@redhat.com>
5028
5029 PR libstdc++/90046
5030 * src/c++17/memory_resource.cc
5031 (monotonic_buffer_resource::_Chunk::allocate): Increase alignment if
5032 needed to allow placing a _Chunk at the end of the buffer.
5033 (monotonic_buffer_resource::_M_new_buffer): Remove static_assert.
5034
4a3f7992
JW
50352019-04-10 Jonathan Wakely <jwakely@redhat.com>
5036
51d3c11a
JW
5037 * doc/xml/faq.xml: Add information about emergency EH pool.
5038 * doc/xml/manual/debug.xml: Update list of memory debugging tools.
5039 Move outdated information on mt_allocator to a separate section.
5040 * doc/xml/manual/evolution.xml: Clarify that GLIBCXX_FORCE_NEW
5041 doesn't affect the default allocator.
5042
9cadd6bd
JW
5043 * testsuite/lib/libstdc++.exp (check_v3_target_parallel_mode): Fix
5044 typo.
5045
4a3f7992
JW
5046 PR libstdc++/89851
5047 * testsuite/20_util/variant/89851.cc: New test.
5048
bc203bf0
JW
50492019-04-09 Jonathan Wakely <jwakely@redhat.com>
5050
9d89b73c
JW
5051 * include/std/variant: Adjust whitespace. Add comments.
5052 (_Multi_array): Leave primary template undefined.
5053 (_Multi_array<_Tp>): Define partial specialization for base case of
5054 recursion.
5055 (__gen_vtable_impl, __gen_vtable): Remove redundant && from type
5056 which is always a reference.
5057 (__gen_vtable::_S_apply()): Remove function, inline body into
5058 default member initializer.
5059 * testsuite/20_util/variant/visit.cc: Test with noncopyable types.
5060
8701cb5e
JW
5061 * include/std/variant (__variant_idx_cookie): Add member type.
5062 (__visitor_result_type): Remove.
5063 (__do_visit): Use invoke_result instead of __visitor_result_type.
5064 * testsuite/20_util/variant/visit.cc: New test.
5065
bc203bf0
JW
5066 PR libstdc++/90008
5067 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Remove
5068 unused capture.
5069 * testsuite/20_util/variant/90008.cc: New test.
5070
0360f9ad
TR
50712019-04-09 Thomas Rodgers <trodgers@redhat.com>
5072
5073 * include/pstl/algorithm_impl.h: Add namespace qualification.
5074 * include/pstl/execution_defs.h: Add namespace qualification.
5075 * include/pstl/execution_impl.h: Add namespace qualification.
5076 * include/pstl/numeric_impl.h: Add namespace qualification.
5077 * include/pstl/parallel_backend_tbb.h: Add namespace qualification.
5078 * include/pstl/unseq_backend_simd.h: Add namespace qualification.
5079 * include/pstl/parallel_backend_utils.h: Include <cassert>.
5080
3d01c7c2
VV
50812019-04-08 Ville Voutilainen <ville.voutilainen@gmail.com>
5082
5083 Fix visit<R> for variant.
5084 * include/std/variant (__do_visit): Add a template parameter
5085 for enforcing same return types for visit.
5086 (__gen_vtable_impl): Likewise.
5087 (_S_apply_single_alt): Adjust.
5088 (__visit_invoke_impl): New. Handle casting to void.
5089 (__do_visit_invoke): New. Enforces same return types.
5090 (__do_visit_invoke_r): New. Converts return types.
5091 (__visit_invoke): Adjust.
5092 (__gen_vtable): Add a template parameter for enforcing
5093 same return types for visit.
5094 * testsuite/20_util/variant/visit_r.cc: Add a test for a visitor with
5095 different return types.
5096 * testsuite/20_util/variant/visit_neg.cc: New. Ensures that
5097 visitors with different return types don't accidentally
5098 compile with regular visitation.
5099
66d8ee9c
CL
51002019-04-08 Christophe Lyon <christophe.lyon@linaro.org>
5101
5102 * testsuite/27_io/filesystem/iterators/caching.cc: Add
5103 dg-require-filesystem-ts.
5104
10f26de9
JW
51052019-04-05 Jonathan Wakely <jwakely@redhat.com>
5106
199b20e3
JW
5107 * doc/xml/manual/status_cxx2020.xml: Update status.
5108 * include/std/variant (visit<R>): Define for C++2a (P0655R1).
5109 * testsuite/20_util/variant/visit_r.cc: New test.
5110
dd4a309e
JW
5111 * include/bits/fs_dir.h (directory_iterator::operator*)
5112 (directory_iterator::operator->): Add noexcept.
5113 (operator==, operator!=): Replace namespace-scope equality operators
5114 for directory iterators with hidden friends.
5115
67087c7e
JW
5116 PR libstdc++/89986
5117 * config/abi/pre/gnu.ver: Add missing exports.
5118 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test
5119 increment member.
5120
c7dde4a9
JW
5121 * config/abi/pre/gnu.ver: Export new symbols.
5122 * include/bits/fs_dir.h (recursive_directory_iterator::options())
5123 (recursive_directory_iterator::recursion_pending())
5124 (recursive_directory_iterator::disable_recursion_pending()): Remove
5125 inline definitions. Make noexcept.
5126 (recursive_directory_iterator::depth())
5127 (recursive_directory_iterator::operator*())
5128 (recursive_directory_iterator::operator->()): Make noexcept.
5129 (recursive_directory_iterator::_M_options)
5130 (recursive_directory_iterator::_M_pending): Remove data members.
5131 * src/c++17/fs_path.cc (_Dir_stack): Add constructor and data members.
5132 (recursive_directory_iterator::recursive_directory_iterator): Remove
5133 ctor-initializer. Use new constructor for _Dir_stack.
5134 (recursive_directory_iterator::options())
5135 (recursive_directory_iterator::recursion_pending())
5136 (recursive_directory_iterator::disable_recursion_pending()): Add
5137 non-inline definitions.
5138 (recursive_directory_iterator::depth()): Make noexcept.
5139 (recursive_directory_iterator::increment(error_code&))
5140 (recursive_directory_iterator::pop(error_code&)): Adjust to new
5141 location of options and recursion_pending members.
5142 * testsuite/27_io/filesystem/iterators/recursion_pending.cc: New test.
5143 * testsuite/util/testsuite_fs.h (__gnu_test::scoped_file): Add
5144 user-declared move constructor and assignment operator, to make the
5145 type move-only.
5146
5ed5c0da
JW
5147 * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle
5148 d_type == DT_UNKNOWN immediately.
5149 (_Dir::should_recurse(bool, error_code&)): Remove file_type::unknown
5150 handling here.
5151 * testsuite/27_io/filesystem/iterators/caching.cc: New test.
5152
d96f11a2
JW
5153 * include/bits/fs_path.h (path::operator=(path&&)): Check for self
5154 assignment.
5155 * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise.
5156 * testsuite/27_io/filesystem/path/assign/copy.cc: Test self
5157 assignment.
5158
10f26de9
JW
5159 PR libstdc++/87431 (again)
5160 * include/bits/basic_string.h (__variant::_Never_valueless_alt):
5161 Define partial specialization for basic_string.
5162 * include/bits/shared_ptr.h (_Never_valueless_alt): Likewise for
5163 shared_ptr and weak_ptr.
5164 * include/bits/std_function.h (_Never_valueless_alt): Likewise for
5165 function.
5166 * include/bits/stl_vector.h (_Never_valueless_alt): Likewise for
5167 vector.
5168 * include/bits/unique_ptr.h (_Never_valueless_alt): Likewise for
5169 unique_ptr.
5170 * include/debug/vector (_Never_valueless_alt): Likewise for debug
5171 vector.
5172 * include/std/any (_Never_valueless_alt): Define explicit
5173 specialization for any.
5174 * include/std/variant (_Never_valueless_alt): Define primary template.
5175 (__never_valueless): Use _Never_valueless_alt instead of
5176 is_trivially_copyable.
5177 (variant::emplace<N>(Args&&...)): Add special case for non-throwing
5178 initializations to avoid try-catch overhead. Add special case for
5179 scalars produced by potentially-throwing conversions. Use
5180 _Never_valueless_alt instead of is_trivially_copyable for the
5181 remaining strong exception-safety cases.
5182 (variant::emplace<N>(initializer_list<U>, Args&&...)): Likewise.
5183 * testsuite/20_util/variant/87431.cc: Run both test functions.
5184 * testsuite/20_util/variant/exception_safety.cc: New test.
5185 * testsuite/20_util/variant/run.cc: Use pmr::string instead of string,
5186 so the variant becomes valueless.
5187
0cb78ef4
JW
51882019-04-03 Jonathan Wakely <jwakely@redhat.com>
5189
59e36c85
JW
5190 PR libstdc++/85184
5191 * include/std/variant (_Copy_assign_base, _Move_assign_base, variant):
5192 Remove assertions.
487efcfd 5193 (variant::emplace<_Tp>): Return result of emplace<N> directly.
59e36c85 5194
0cb78ef4
JW
5195 * include/std/string (__hash_string_base): New class template defining
5196 operator() for hashing strings.
5197 (hash<pmr::string>, hash<pmr::u8string>, hash<pmr::u16string>)
5198 (hash<pmr::u32string>, hash<pmr::wstring>): Define for C++17.
5199 * testsuite/21_strings/basic_string/hash/hash.cc: New test.
5200 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc: New test.
5201
f1ba6c5a
VV
52022019-04-01 Ville Voutilainen <ville.voutilainen@gmail.com>
5203
5204 Use single-visitation in variant assignment and swap and relops.
5205 Also use indices instead of types when checking whether
5206 variants hold the same thing.
5207 * include/std/variant (__do_visit): Add a template parameter
5208 for index visitation, invoke with indices if index visitation
5209 is used.
5210 (__variant_idx_cookie): New.
5211 (__visit_with_index): Likewise.
5212 (_Copy_assign_base::operator=): Do single-visitation with
5213 an index visitor.
5214 (_Move_assign_base::operator=): Likewise.
5215 (_Extra_visit_slot_needed): Adjust.
5216 (__visit_invoke): Call with indices if it's an index visitor.
5217 (relops): Do single-visitation with an index visitor.
5218 (swap): Likewise.
5219 (__visitor_result_type): New.
5220
29b129b8
EB
52212019-03-30 Eric Botcazou <ebotcazou@adacore.com>
5222
5223 * src/c++17/fs_ops.cc (fs::permissions): Use std::errc::not_supported.
5224
337d1fec
VV
52252019-03-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5226
5227 Don't revisit a variant we are already visiting.
5228 * include/std/variant (__variant_construct_single): New.
5229 (__variant_construct): Use it.
5230 (_M_destructive_move): Likewise.
5231 (_M_destructive_copy): Likewise.
5232 (_Copy_assign_base::operator=): Adjust.
5233 (_Move_assign_base::operator=): Likewise.
5234 (swap): Likewise.
5235
7ac20567
JW
52362019-03-26 Jonathan Wakely <jwakely@redhat.com>
5237
5238 PR libstdc++/85965
5239 * include/bits/hashtable.h (_Hashtable): Move static assertions to
5240 destructor so they are not evaluated until the _Key type is complete.
5241 * include/bits/stl_tree.h (_Rb_tree): Likewise.
5242 * testsuite/23_containers/set/85965.cc: New test.
5243 * testsuite/23_containers/unordered_set/85965.cc: New test.
5244 * testsuite/23_containers/map/48101_neg.cc: Replace "here" errors
5245 with regexp matching the corresponding _Rb_tree specialization.
5246 * testsuite/23_containers/multimap/48101_neg.cc: Likewise.
5247 * testsuite/23_containers/multiset/48101_neg.cc: Remove "here" error.
5248 * testsuite/23_containers/set/48101_neg.cc: Likewise.
5249 * testsuite/23_containers/unordered_map/48101_neg.cc: Likewise.
5250 * testsuite/23_containers/unordered_multimap/48101_neg.cc: Likewise.
5251 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
5252 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
5253
da97b98a
VV
52542019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
5255
5256 PR libstdc++/89825
5257 Fix based on a suggestion by Antony Polukhin.
5258 * include/std/variant (__never_valueless): New.
5259 (_M_valid): Use it.
5260 (_Extra_visit_slot_needed): New.
5261 (_Multi_array): Use it.
5262 (_S_apply_all_alts): Likewise.
5263
11767f80
VV
52642019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
5265
5266 PR libstdc++/89824
5267 Fix based on a suggestion by Antony Polukhin.
5268 * include/std/variant (__gen_vtable): Don't reserve an
5269 additional table slot, _Multi_array already does that.
5270
8be4d02b
VV
52712019-03-26 Ville Voutilainen <ville.voutilainen@gmail.com>
5272
5273 PR libstdc++/89816
5274 Fix based on a suggestion by Antony Polukhin.
5275 * include/std/variant (__variant_construct): Capture a pointer
5276 to the storage and visit just one variant.
5277
eca5f925
JW
52782019-03-22 Jonathan Wakely <jwakely@redhat.com>
5279
fb5550a0
JW
5280 * doc/xml/manual/backwards_compatibility.xml: Remove link to
5281 Doxygen-generated pages with unstable URL.
5282 * doc/xml/manual/concurrency_extensions.xml: Likewise.
5283 * doc/xml/manual/extensions.xml: Likewise.
5284 * doc/xml/manual/parallel_mode.xml: Likewise.
5285 * doc/xml/manual/support.xml: Likewise.
5286
eca5f925
JW
5287 * include/bits/stl_algobase.h (__lg): Do arithmetic on type int to
5288 avoid -Wconversion warnings.
5289
061f4578 52902019-03-21 Thomas Rodgers <trodgers@redhat.com>
af4e8d4d 5291
061f4578
TR
5292 * include/Makefile.am (std_header): Add ${std_srcdir}/execution.
5293 (pstl_srcdir, pstl_builddir, pstl_headers): New variables.
5294 (allstamped): Add stamp-pstl.
5295 (install-headers): Add ptsl_builddir.
5296 * include/Makefile.in: Regenerate.
5297 * include/bits/c++config: Add pstl configuration.
5298 * include/pstl/LICENSE.txt: New file.
5299 * include/pstl/algorithm_fwd.h: New file.
5300 * include/pstl/algorithm_impl.h: New file.
5301 * include/pstl/execution_defs.h: New file.
5302 * include/pstl/execution_impl.h: New file.
5303 * include/pstl/glue_algorithm_defs.h: New file.
5304 * include/pstl/glue_algorithm_impl.h: New file.
5305 * include/pstl/glue_execution_defs.h: New file.
5306 * include/pstl/glue_memory_defs.h: New file.
5307 * include/pstl/glue_memory_impl.h: New file.
5308 * include/pstl/glue_numeric_defs.h: New file.
5309 * include/pstl/glue_numeric_impl.h: New file.
5310 * include/pstl/memory_impl.h: New file.
5311 * include/pstl/numeric_fwd.h: New file.
5312 * include/pstl/numeric_impl.h: New file.
5313 * include/pstl/parallel_backend.h: New file.
5314 * include/pstl/parallel_backend_tbb.h: New file.
5315 * include/pstl/parallel_backend_utils.h: New file.
5316 * include/pstl/parallel_impl.h: New file.
5317 * include/pstl/pstl_config.h: New file.
5318 * include/pstl/unseq_backend_simd.h: New file.
5319 * include/pstl/utils.h: New file.
5320 * include/std/algorithm: Include parallel algorithm implementations.
5321 * include/std/execution: New file.
5322 * include/std/memory: Include parallel algorithm implementations.
5323 * include/std/numeric: Include parallel algorithm implementations.
5324 * include/std/version: Add parallel algorithms feature test macro.
5325 * testsuite/util/pstl/pstl_test_config.h: New file.
5326 * testsuite/util/pstl/test_utils.h: New file.
5327 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
5328 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
5329 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
5330 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
5331 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
5332 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
5333 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
5334 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
5335 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
5336 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
5337 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
5338 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
5339 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
5340 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
5341 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
5342 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
5343 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
5344 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
5345 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
5346 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
5347 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
5348 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
5349 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
5350 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
5351 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
5352 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
5353 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
5354 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
5355 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
5356 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
5357 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
5358 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
5359 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
5360 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
5361 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
5362 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
5363 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
5364 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
5365 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
5366 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
5367 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
5368 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
5369 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
5370 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
5371 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
5372 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
5373 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
5374 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
5375 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
5376 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
5377 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
5378 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
5379 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
5380 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc: New file.
5381 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc: New file.
5382 * testsuite/testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc: New file.
5383 * testsuite/testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc: New file.
5384 * testsuite/testsuite/25_algorithms/pstl/alg_merge/merge.cc: New file.
5385 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc: New file.
5386 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc: New file.
5387 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc: New file.
5388 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc: New file.
5389 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc: New file.
5390 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc: New file.
5391 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc: New file.
5392 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc: New file.
5393 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc: New file.
5394 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc: New file.
5395 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc: New file.
5396 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc: New file.
5397 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc: New file.
5398 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc: New file.
5399 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc: New file.
5400 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc: New file.
5401 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc: New file.
5402 * testsuite/testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc: New file.
5403 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc: New file.
5404 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc: New file.
5405 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc: New file.
5406 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc: New file.
5407 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc: New file.
5408 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc: New file.
5409 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc: New file.
5410 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc: New file.
5411 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc: New file.
5412 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc: New file.
5413 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc: New file.
5414 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc: New file.
5415 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc: New file.
5416 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc: New file.
5417 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc: New file.
5418 * testsuite/testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc: New file.
5419 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/includes.cc: New file.
5420 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: New file.
5421 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc: New file.
5422 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc: New file.
5423 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc: New file.
5424 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc: New file.
5425 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc: New file.
5426 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/set.cc: New file.
5427 * testsuite/testsuite/25_algorithms/pstl/alg_sorting/sort.cc: New file.
5428 * testsuite/testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc: New file.
5429 * testsuite/testsuite/26_numerics/pstl/numeric_ops/reduce.cc: New file.
5430 * testsuite/testsuite/26_numerics/pstl/numeric_ops/scan.cc: New file.
5431 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc: New file.
5432 * testsuite/testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc: New file.
5433
42d9f14b
JW
54342019-03-21 Jonathan Wakely <jwakely@redhat.com>
5435
e2186cd8
JW
5436 * include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
5437 (assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
5438 (assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
5439 (comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
5440 (comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
5441 (cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
5442 (cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
5443 (cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
5444 (ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
5445 (ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
5446 (hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
5447 (legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
5448 (sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
5449 (sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
5450 when the special functions IS is enabled, not for C++17.
5451 * testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
5452 Replace with ...
5453 * testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
5454 without checks for special functions in C++17.
5455 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
5456 New test.
5457
42d9f14b
JW
5458 PR libstdc++/88066
5459 * include/backward/hash_map: Use <> for includes not "".
5460 * include/backward/hash_set: Likewise.
5461 * include/backward/strstream: Likewise.
5462 * include/tr1/bessel_function.tcc: Likewise.
5463 * include/tr1/exp_integral.tcc: Likewise.
5464 * include/tr1/legendre_function.tcc: Likewise.
5465 * include/tr1/modified_bessel_func.tcc: Likewise.
5466 * include/tr1/riemann_zeta.tcc: Likewise.
5467
cad3fc8c
JW
54682019-03-19 Jonathan Wakely <jwakely@redhat.com>
5469
5470 * doc/xml/manual/allocator.xml: Link to table documenting evolution
5471 of extension allocators.
5472 * doc/xml/manual/evolution.xml: Use angle brackets for header names.
5473 Document new headers in 7.2, 8.1 and 9.1 releases.
5474 * doc/xml/manual/using.xml: Adjust link target for new_allocator.
5475 * doc/html/*: Regenerate.
5476
2ff656f4
JDA
54772019-03-12 John David Anglin <dave.anglin@bell.net>
5478
5479 PR libstdc++/89461
5480 * testsuite/lib/libstdc++.exp: Locate libatomic.
5481 * testsuite/lib/dg-options.exp (add_options_for_libatomic): New.
5482 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc: Add
5483 libatomic options.
5484 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
5485 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
5486 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
5487 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
5488
1a823c9a
JW
54892019-03-11 Jonathan Wakely <jwakely@redhat.com>
5490
187fdaea
JW
5491 PR libstdc++/89460
5492 * configure.ac: Check for sockatmark.
5493 * crossconfig.m4: Check for sockatmark.
5494 * config.h.in: Regenerate.
5495 * configure: Regenerate.
5496 * include/experimental/internet (address_v4::_S_hton): Rename
5497 overloaded functions to _S_hton_16 and _S_ntoh_16.
5498 (address_v4::_S_ntoh): Rename to _S_ntoh_16 and _S_ntoh_32.
5499 (basic_endpoint): Adjust calls to _S_hton and _S_ntoh.
5500 * include/experimental/socket (basic_socket::at_mark): Check
5501 _GLIBCXX_HAVE_SOCKATMARK.
5502
355d4eb3
JW
5503 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc: Use
5504 const variables instead of macros.
5505
1a823c9a
JW
5506 PR libstdc++/89629
5507 * libsupc++/hash_bytes.cc [__SIZEOF_SIZE_T__ == 8] (_Hash_bytes):
5508 Use correct type for len_aligned.
5509 * testsuite/20_util/hash/89629.cc: New test.
5510
8b9482b2
JJ
55112019-03-11 Jakub Jelinek <jakub@redhat.com>
5512
5513 PR libstdc++/89641
5514 * include/std/atomic (atomic<T>::store, atomic<T>::load,
5515 atomic<T>::exchange, atomic<T>::compare_exchange_weak,
5516 atomic<T>::compare_exchange_strong): Cast __m or __s and __f to int.
5517 * include/bits/atomic_base.h (__atomic_base<T>::operator++,
5518 __atomic_base<T>::operator--, __atomic_base<T>::operator+=,
5519 __atomic_base<T>::operator-=, __atomic_base<T>::operator&=,
5520 __atomic_base<T>::operator|=, __atomic_base<T>::operator^=,
5521 __atomic_base<T*>::operator++, __atomic_base<T*>::operator--,
5522 __atomic_base<T*>::operator+=, __atomic_base<T*>::operator-=): Cast
5523 memory_order_seq_cst to int.
5524
43aaf5ab
JW
55252019-03-08 Jonathan Wakely <jwakely@redhat.com>
5526
c7904d9e
JW
5527 * doc/xml/manual/using.xml: Use link element instead of xref.
5528 * doc/html/*: Regenerate.
5529
43aaf5ab
JW
5530 * include/bits/fs_path.h (path::format): Add fixed underlying type.
5531
20a4550c
FD
55322019-03-08 François Dumont <fdumont@gcc.gnu.org>
5533
c0cb38c2
FD
5534 PR libstdc++/89477
5535 * include/debug/map.h (map): Use _RequireNotAllocator to constrain
5536 parameters in deduction guides.
5537 * include/debug/multimap.h (multimap): Likewise.
5538 * include/debug/set.h (multimap): Likewise.
5539 * include/debug/multiset.h (multimap): Likewise.
5540 * include/debug/unordered_map (unordered_map): Likewise.
5541 (unordered_multimap): Likewise.
5542 * include/debug/unordered_set (unordered_set): Likewise.
5543 (unordered_multiset): Likewise.
5544
20a4550c
FD
5545 PR libstdc++/89608
5546 * include/debug/unordered_map (unordered_map<>::_M_check_rehashed):
5547 Invalidate all iterators in case of rehash.
5548 (unordered_multimap<>::_M_check_rehashed): Likewise.
5549 * include/debug/unordered_set
5550 (unordered_set<>::_M_check_rehashed): Likewise.
5551 (unordered_multiset<>::_M_check_rehashed): Likewise.
5552 * testsuite/23_containers/unordered_set/debug/89608_neg.cc: New.
5553
ec274050
AS
55542019-03-07 Andreas Schwab <schwab@suse.de>
5555
5556 * config/abi/post/riscv64-linux-gnu: New directory.
5557 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: New file.
5558
9ae2a7c3
JW
55592019-03-07 Jonathan Wakely <jwakely@redhat.com>
5560
e0f7051e
JW
5561 * testsuite/20_util/function_objects/bind_front/1.cc: Change from
5562 compile test to run. Fix typo.
5563
5178f5c2
JW
5564 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
5565 * doc/html/*: Regenerate.
5566
9ae2a7c3
JW
5567 P0356R5 Simplified partial function application
5568 * include/std/functional [C++20] (_Bind_front, _Bind_front_t): Define
5569 helpers for bind_front.
5570 (bind_front, __cpp_lib_bind_front): Define.
5571 * testsuite/20_util/function_objects/bind_front/1.cc: New test.
5572
46610940
JW
55732019-03-06 Jonathan Wakely <jwakely@redhat.com>
5574
5575 * include/std/type_traits (__cpp_lib_bounded_array_traits): Define.
5576 * include/std/version (__cpp_lib_bounded_array_traits): Likewise.
5577 * testsuite/20_util/is_bounded_array/value.cc: Check for macro.
5578 * testsuite/20_util/is_unbounded_array/value.cc: Likewise.
5579
f29a1ef2
ESR
55802019-03-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5581
5582 PR libstdc++/86655 - std::assoc_legendre should not constrain
5583 the value of m (or x).
5584 * include/tr1/legendre_function.tcc (__assoc_legendre_p,
5585 __sph_legendre): If degree > order Don't throw, return 0.
5586 (__legendre_p, __assoc_legendre_p): Don't constrain x either.
5587 * testsuite/special_functions/02_assoc_legendre/pr86655.cc: New test.
5588 * testsuite/special_functions/20_sph_legendre/pr86655.cc: New test.
5589 * testsuite/tr1/5_numerical_facilities/special_functions/
5590 02_assoc_legendre/pr86655.cc: New test.
5591 * testsuite/tr1/5_numerical_facilities/special_functions/
5592 22_sph_legendre/pr86655.cc: New test.
5593
669a6fdc
VV
55942019-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
5595
5596 Rewrite variant.
5597 Also PR libstdc++/85517
5598 * include/std/variant (__do_visit): New.
5599 (__variant_cast): Likewise.
5600 (__variant_cookie): Likewise.
5601 (__erased_*): Remove.
5602 (_Variant_storage::_S_vtable): Likewise.
5603 (_Variant_storage::__M_reset_impl): Adjust to use __do_visit.
5604 (_Variant_storage::__M_reset): Adjust.
5605 (__variant_construct): New.
5606 (_Copy_ctor_base(const _Copy_ctor_base&)): Adjust to use
5607 __variant_construct.
5608 (_Move_ctor_base(_Move_ctor_base&&)): Likewise.
5609 (_Move_ctor_base::__M_destructive_copy): New.
5610 (_Move_ctor_base::__M_destructive_move): Adjust to use
5611 __variant_construct.
5612 (_Copy_assign_base::operator=): Adjust to use __do_visit.
5613 (_Copy_assign_alias): Adjust to check both copy assignment
5614 and copy construction for triviality.
5615 (_Move_assign_base::operator=): Adjust to use __do_visit.
5616 (_Multi_array): Add support for visitors that accept and return
5617 a __variant_cookie.
5618 (__gen_vtable_impl::_S_apply_all_alts): Likewise.
5619 (__gen_vtable_impl::_S_apply_single_alt): Likewise.
5620 (__gen_vtable_impl::__element_by_index_or_cookie): New. Generate
5621 a __variant_cookie temporary for a variant that is valueless and..
5622 (__gen_vtable_impl::__visit_invoke): ..adjust here.
5623 (__gen_vtable::_Array_type): Conditionally make space for
5624 the __variant_cookie visitor case.
5625 (__variant_construct_by_index): New.
5626 (get_if): Adjust to use std::addressof.
5627 (relops): Adjust to use __do_visit.
5628 (variant): Add __variant_cast and __variant_construct_by_index
5629 as friends.
5630 (variant::emplace): Use _M_reset() and __variant_construct_by_index
5631 instead of self-destruction.
5632 (variant::swap): Adjust to use __do_visit.
5633 (visit): Reimplement in terms of __do_visit.
5634 (__variant_hash_call_base_impl::operator()): Adjust to use __do_visit.
5635 * testsuite/20_util/variant/compile.cc: Adjust.
5636 * testsuite/20_util/variant/run.cc: Likewise.
5637
d80f04d6
JW
56382019-03-06 Jonathan Wakely <jwakely@redhat.com>
5639
99447f70
JW
5640 * include/bits/c++config.h (_cpp_lib_char8_t): Add L suffix to
5641 constant.
5642 * testsuite/experimental/feat-char8_t.cc: Likewise.
5643
28d85efb
JW
5644 * include/std/type_traits [C++20] (is_bounded_array)
5645 (is_unbounded_array, is_bounded_array_v, is_unbounded_array_v):
5646 Define.
5647 * testsuite/20_util/is_bounded_array/requirements/
5648 explicit_instantiation.cc: New test.
5649 * testsuite/20_util/is_bounded_array/requirements/typedefs.cc: New
5650 test.
5651 * testsuite/20_util/is_bounded_array/value.cc: New test.
5652 * testsuite/20_util/is_unbounded_array/requirements/
5653 explicit_instantiation.cc: New test.
5654 * testsuite/20_util/is_unbounded_array/requirements/typedefs.cc: New
5655 * test.
5656 * testsuite/20_util/is_unbounded_array/value.cc: New test.
5657
d80f04d6
JW
5658 * include/bits/ptr_traits.h [C++20] (pointer_traits<T*>::pointer_to):
5659 Add constexpr.
5660 * testsuite/20_util/pointer_traits/pointer_to_constexpr.cc: New test.
5661
24387442
JW
56622019-03-05 Jonathan Wakely <jwakely@redhat.com>
5663
5664 * include/c_compatibility/math.h [C++20] (lerp): Add using
5665 declaration.
5666 * include/c_global/cmath [C++20] (__cpp_lib_interpolate): Define.
5667 (__lerp): Define function template to implement lerp.
5668 (lerp(float, float, float), lerp(double, double, double))
5669 (lerp(long double, long double, long double)): Define for C++20.
5670 * include/std/numeric [C++20] (__cpp_lib_interpolate): Define.
5671 (midpoint(T, T), midpoint(T*, T*)): Define.
5672 * include/std::version [C++20] (__cpp_lib_interpolate): Define.
5673 * testsuite/26_numerics/lerp.cc: New test.
5674 * testsuite/26_numerics/midpoint/floating.cc: New test.
5675 * testsuite/26_numerics/midpoint/integral.cc: New test.
5676 * testsuite/26_numerics/midpoint/pointer.cc: New test.
5677
94014ee9
ESR
56782019-03-04 Edward Smith-Rowland <3dw4rd@verizon.net>
5679
5680 PR libstdc++/88996 Implement P0439R0
5681 Make std::memory_order a scoped enumeration.
5682 * include/bits/atomic_base.h: For C++20 make memory_order a scoped enum,
5683 add variables for the old enumerators. Adjust calls.
5684 * testsuite/29_atomics/headers/atomic/types_std_c++2a.cc: New test.
5685 * testsuite/29_atomics/headers/atomic/types_std_c++2a_neg.cc: New test.
5686
0e318273
JW
56872019-03-04 Jonathan Wakely <jwakely@redhat.com>
5688
7ac40f3d
JW
5689 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: Remove bogus dg-do
5690 directive.
5691
0e318273
JW
5692 * include/std/memory_resource (polymorphic_allocator): Add default
5693 template argument for C++20.
5694 (polymorphic_allocator::allocate_bytes)
5695 (polymorphic_allocator::deallocate_bytes)
5696 (polymorphic_allocator::allocate_object)
5697 (polymorphic_allocator::deallocate_object)
5698 (polymorphic_allocator::new_object)
5699 (polymorphic_allocator::delete_object): New member functions for
5700 C++20.
5701 * testsuite/20_util/polymorphic_allocator/allocate_object.cc: New
5702 test.
5703
24cbcb00
JW
57042019-03-03 Jonathan Wakely <jwakely@redhat.com>
5705
5706 PR libstdc++/89562
5707 * src/filesystem/ops-common.h (do_copy_file): Open files in binary
5708 mode for mingw.
5709
987bbe48
JW
57102019-03-01 Jonathan Wakely <jwakely@redhat.com>
5711
c5effe96
JW
5712 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
5713 [!__cpp_sized_deallocation]: Do not pass size to operator delete.
5714
987bbe48
JW
5715 * include/std/memory (uses_allocator_construction_args): New set of
5716 overloaded functions.
5717 (make_obj_using_allocator, uninitialized_construct_using_allocator):
5718 New functions.
5719 * include/std/memory_resource (polymorphic_allocator::construct)
5720 [__cplusplus > 201703l]: Replace all overloads with a single function
5721 using uses_allocator_construction_args.
5722 * testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
5723 test.
5724 * testsuite/20_util/uses_allocator/make_obj.cc: New test.
5725
a4395a84
JW
57262019-02-27 Jonathan Wakely <jwakely@redhat.com>
5727
5728 PR libstdc++/89466
5729 * acinclude.m4 (GLIBCXX_CONFIGURE_DOCBOOK): Reorder check for local
5730 stylesheet directories before check for xsltproc. Try to use
5731 xmlcatalog to find local stylesheet directory before trying hardcoded
5732 paths. Add path used by suse to hardcoded paths. Adjust xsltproc
5733 check to look for the same stylesheet as doc/Makefile.am uses. Don't
5734 use xsltproc if xmlcatalog fails to find a local stylesheet.
5735 * configure.ac: Check for xmlcatalog.
5736 * Makefile.in: Regenerate.
5737 * configure: Likewise.
5738 * doc/Makefile.in: Likewise.
5739 * include/Makefile.in: Likewise.
5740 * libsupc++/Makefile.in: Likewise.
5741 * po/Makefile.in: Likewise.
5742 * python/Makefile.in: Likewise.
5743 * src/Makefile.in: Likewise.
5744 * src/c++11/Makefile.in: Likewise.
5745 * src/c++17/Makefile.in: Likewise.
5746 * src/c++98/Makefile.in: Likewise.
5747 * src/filesystem/Makefile.in: Likewise.
5748 * testsuite/Makefile.in: Likewise.
5749
3d7beb79
JW
57502019-02-26 Jonathan Wakely <jwakely@redhat.com>
5751
08abbdda
JW
5752 PR libstdc++/89477
5753 * include/bits/alloc_traits.h (_RequireNotAllocator): New helper for
5754 container deduction guides.
5755 * include/bits/hashtable.h (_RequireNotAllocatorOrIntegral): Likewise.
5756 * include/bits/stl_map.h (map): Use _RequireNotAllocator to constrain
5757 parameters in deduction guides.
5758 * include/bits/stl_multimap.h (multimap): Likewise.
5759 * include/bits/stl_multiset.h (multiset): Likewise.
5760 * include/bits/stl_queue.h (queue, priority_queue): Likewise.
5761 * include/bits/stl_set.h (set): Likewise.
5762 * include/bits/stl_stack.h (stack): Likewise.
5763 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
5764 use _RequireNotAllocator and _RequireNotAllocatorOrIntegral to
5765 constrain parameters in deduction guides.
5766 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
5767 Likewise.
5768 * testsuite/23_containers/map/cons/deduction.cc: Test additional
5769 deduction cases.
5770 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
5771 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
5772 * testsuite/23_containers/unordered_map/cons/deduction.cc: Likewise.
5773 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
5774 Likewise.
5775 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
5776 Likewise.
5777 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
5778
3d7beb79
JW
5779 PR libstdc++/89416
5780 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Change
5781 to class template and partial specialization using void_t.
5782 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5783
c7f01cb6
JW
57842019-02-24 Jonathan Wakely <jwakely@redhat.com>
5785
5786 PR libstdc++/89416
5787 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Make
5788 copy and move members public.
5789
ace857f9
JW
57902019-02-23 Jonathan Wakely <jwakely@redhat.com>
5791
3c26b759
JW
5792 * include/std/type_traits (__underlying_type_impl): New helper to
5793 make underlying_type SFINAE-friendly.
5794 (underlying_type): Derive from __underlying_type_impl.
5795 * testsuite/20_util/underlying_type/requirements/typedefs-3.cc: New
5796 test.
5797
ace857f9
JW
5798 PR libstdc++/89446
5799 * include/bits/char_traits.h (__constant_char_array): Check index is
5800 in range before dereferencing.
5801 (char_traits<char>::compare, char_traits<char>::find)
5802 (char_traits<char8_t>::compare, char_traits<char8_t>::find): Return
5803 immediately if n is zero.
5804 (char_traits<wchar_t>::compare, char_traits<wchar_t>::find): Likewise.
5805 Remove workarounds for PR 67026.
5806 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
5807 New test.
5808 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
5809 New test.
5810
047b3e34
EB
58112019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5812
5813 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Adjust.
5814 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5815
fcb141ac
JJ
58162019-02-22 Jakub Jelinek <jakub@redhat.com>
5817
5818 PR libstdc++/89402
5819 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Change return
5820 type to std::size_t and argument to type to long double.
5821
406e4908
EB
58222019-02-22 Eric Botcazou <ebotcazou@adacore.com>
5823
5824 * configure.host (abi_baseline_pair): Adjust for SPARC64/Linux.
5825 * config/abi/post/sparc64-linux-gnu: New directory.
5826 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: New file.
5827 * config/abi/post/sparc64-linux-gnu/32: New directory.
5828 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: New file.
5829
148864cb
JW
58302019-02-21 Jonathan Wakely <jwakely@redhat.com>
5831
5832 * testsuite/29_atomics/headers/atomic/types_std_c++20.cc: New test.
5833 * testsuite/29_atomics/headers/atomic/types_std_c++20_neg.cc: New
5834 test.
5835
5940bb02
TH
58362019-02-22 Tom Honermann <tom@honermann.net>
5837
5838 * python/libstdcxx/v6/printers.py (register_type_printers): Add type
5839 printers for u8string and u8string_view.
5840
59019b42
TH
58412019-02-22 Tom Honermann <tom@honermann.net>
5842
5843 * testsuite/18_support/byte/ops.cc: Validate
5844 std::to_integer<char8_t>, std::to_integer<char16_t>, and
5845 std::to_integer<char32_t>.
5846 * testsuite/18_support/numeric_limits/dr559.cc: Validate
5847 std::numeric_limits<char8_t>.
5848 * testsuite/18_support/numeric_limits/lowest.cc: Validate
5849 std::numeric_limits<char8_t>::lowest().
5850 * testsuite/18_support/numeric_limits/max_digits10.cc: Validate
5851 std::numeric_limits<char8_t>::max_digits10.
5852 * testsuite/18_support/type_info/fundamental.cc: Validate
5853 typeinfo for char8_t.
5854 * testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
5855 std::from_chars with char8_t.
5856 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
5857 Validate explicit instantiation of std::hash<char8_t>.
5858 * testsuite/20_util/is_integral/value.cc: Validate
5859 std::is_integral<char8_t>.
5860 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
5861 Validate std::make_signed<char8_t>.
5862 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
5863 Validate u8string construction from char8_t sources.
5864 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
5865 std::pmr::u8string.
5866 * testsuite/21_strings/basic_string_view/operations/compare/
5867 char/70483.cc: Validate substr operations on u8string_view.
5868 * testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
5869 the u8string_view typedef is defined.
5870 * testsuite/21_strings/char_traits/requirements/
5871 constexpr_functions.cc: Validate char_traits<char8_t> constexpr
5872 member functions.
5873 * testsuite/21_strings/char_traits/requirements/
5874 constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
5875 constexpr member functions.
5876 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
5877 that the u8string typedef is defined.
5878 * testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
5879 of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
5880 std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
5881 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
5882 numbers.
5883 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
5884 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
5885 Likewise.
5886 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
5887 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
5888 Validate std::atomic<char8_t>::is_always_lock_free
5889 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
5890 Update line numbers.
5891 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
5892 Likewise.
5893 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
5894 Likewise.
5895 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
5896 Validate std::experimental::pmr::u8string.
5897 * testsuite/experimental/string_view/typedefs.cc: Validate that the
5898 u8string_view typedef is defined.
5899 * testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
5900 char32_t to the typelists.
5901
65bbaf31
TH
59022019-02-22 Tom Honermann <tom@honermann.net>
5903
5904 * include/ext/typelist.h: Constrain a partial specialization of
5905 typelist::detail::append_ to only match chain<T1,T2>.
5906
d331c5f1
JW
59072019-02-21 Jonathan Wakely <jwakely@redhat.com>
5908
5909 PR libstdc++/89416
5910 * include/bits/alloc_traits.h (__is_alloc_insertable_impl): Replace
5911 class template with class. Replace move and copy member types with
5912 member alias templates, so they are only instantiated when needed.
5913 (__is_copy_insertable, __is_move_insertable): Adjust base class.
5914 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: Enable
5915 test for C++11/14/17 as well.
5916 * testsuite/23_containers/vector/modifiers/push_back/89416.cc: New
5917 test.
5918
ea1c2a95
JJ
59192019-02-20 Jakub Jelinek <jakub@redhat.com>
5920
5921 PR libstdc++/89402
5922 * src/c++98/compatibility-ldbl.cc (_ZNKSt4hashIeEclEe): Add
5923 _GLIBCXX_PURE to the alias declaration.
5924
102a4fe1
JW
59252019-02-19 Jonathan Wakely <jwakely@redhat.com>
5926
5927 * testsuite/21_strings/basic_string/literals/types.cc
5928 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
5929 * testsuite/21_strings/basic_string/literals/values.cc
5930 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5931 * testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
5932 potentially having different type.
5933 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
5934 * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
5935 to char.
5936 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
5937 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
5938 * testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
5939 string literals only using basic character set.
5940 * testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
5941 u8 literals to char.
5942 * testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
5943 Test ATOMIC_CHAR8_T_LOCK_FREE.
5944 Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
5945 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
5946 [_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
5947 * testsuite/experimental/string_view/literals/types.cc
5948 [_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
5949 literal.
5950 * testsuite/experimental/string_view/literals/values.cc
5951 [_GLIBCXX_USE_CHAR8_T]: Likewise.
5952
46ca1dd7
TH
59532019-02-19 Tom Honermann <tom@honermann.net>
5954
5955 * testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
5956 from char16_32_t.cc; validates numeric_limits<char8_t>.
5957 * testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
5958 test cloned from types.cc; validates operator""s for char8_t
5959 returns u8string.
5960 * testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
5961 test cloned from values.cc; validates construction and comparison
5962 of u8string values.
5963 * testsuite/21_strings/basic_string/requirements/
5964 /explicit_instantiation/char8_t/1.cc: New test cloned from
5965 char16_t/1.cc; validates explicit instantiation of
5966 basic_string<char8_t>.
5967 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5968 New test cloned from types.cc; validates operator""sv for char8_t
5969 returns u8string_view.
5970 * testsuite/21_strings/basic_string_view/literals/
5971 values-char8_t.cc: New test cloned from values.cc; validates
5972 construction and comparison of u8string_view values.
5973 * testsuite/21_strings/basic_string_view/requirements/
5974 explicit_instantiation/char8_t/1.cc: New test cloned from
5975 char16_t/1.cc; validates explicit instantiation of
5976 basic_string_view<char8_t>.
5977 * testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
5978 New test cloned from char16_t/65049.cc; validates that
5979 char_traits<char8_t> is not vulnerable to the concerns in PR65049.
5980 * testsuite/21_strings/char_traits/requirements/char8_t/
5981 typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
5982 that char_traits<char8_t> member typedefs are present and correct.
5983 * testsuite/21_strings/char_traits/requirements/
5984 explicit_instantiation/char8_t/1.cc: New test cloned from
5985 char16_t/1.cc; validates explicit instantiation of
5986 char_traits<char8_t>.
5987 * testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
5988 from char16_t.cc: validates
5989 codecvt<char16_t, char8_t, mbstate_t>.
5990 * testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
5991 from char32_t.cc: validates
5992 codecvt<char32_t, char8_t, mbstate_t>.
5993 * testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
5994 utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
5995 codecvt<char32_t, char8_t, std::mbstate_t>.
5996 * testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
5997 test cloned from string.cc; validates filesystem::path construction
5998 from char8_t input.
5999 * testsuite/experimental/feat-char8_t.cc: New test; validates that
6000 the __cpp_lib_char8_t feature test macro is defined with the
6001 correct value.
6002 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
6003 New test cloned from string.cc; validates filesystem::path
6004 construction from char8_t input.
6005 * testsuite/experimental/string_view/literals/types-char8_t.cc: New
6006 test cloned from types.cc; validates operator""sv for char8_t
6007 returns u8string_view.
6008 * testsuite/experimental/string_view/literals/values-char8_t.cc:
6009 New test cloned from values.cc; validates construction and
6010 comparison of u8string_view values.
6011 * testsuite/experimental/string_view/requirements/
6012 explicit_instantiation/char8_t/1.cc: New test cloned from
6013 char16_t/1.cc; validates explicit instantiation of
6014 basic_string_view<char8_t>.
6015 * testsuite/ext/char8_t/atomic-1.cc: New test; validates that
6016 ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
6017 enabled.
6018
c124af93
TH
60192019-02-19 Tom Honermann <tom@honermann.net>
6020
6021 P0482R5 char8_t: Standard library support
6022 * config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
6023 typeinfo symbols for char8_t.
6024 * config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
6025 (GLIBCXX_3.4.26): Add symbols for specializations of
6026 numeric_limits and codecvt that involve char8_t.
6027 (CXXABI_1.3.12): Add typeinfo symbols for char8_t.
6028 * include/bits/atomic_base.h: Add atomic_char8_t.
6029 * include/bits/basic_string.h: Add std::hash<u8string> and
6030 operator""s(const char8_t*, size_t).
6031 * include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
6032 __cpp_lib_char8_t.
6033 * include/bits/char_traits.h: Add char_traits<char8_t>.
6034 * include/bits/codecvt.h: Add
6035 codecvt<char16_t, char8_t, mbstate_t>,
6036 codecvt<char32_t, char8_t, mbstate_t>,
6037 codecvt_byname<char16_t, char8_t, mbstate_t>, and
6038 codecvt_byname<char32_t, char8_t, mbstate_t>.
6039 * include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
6040 recognize char8_t as an integral type.
6041 * include/bits/fs_path.h: (path::__is_encoded_char): Recognize
6042 char8_t.
6043 (path::u8string): Return std::u8string when char8_t support is
6044 enabled.
6045 (path::generic_u8string): Likewise.
6046 (path::_S_convert): Handle conversion from char8_t input.
6047 (path::_S_str_convert): Likewise.
6048 * include/bits/functional_hash.h: Add hash<char8_t>.
6049 * include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
6050 char8_t.
6051 * include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
6052 for new char8_t specializations.
6053 * include/bits/localefwd.h: Add missing declarations of
6054 codecvt<char16_t, char, mbstate_t> and
6055 codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
6056 codecvt<char16_t, char8_t, mbstate_t> and
6057 codecvt<char32_t, char8_t, mbstate_t>.
6058 * include/bits/postypes.h: Add u8streampos
6059 * include/bits/stringfwd.h: Add declarations of
6060 char_traits<char8_t> and u8string.
6061 * include/c_global/cstddef: Add __byte_operand<char8_t>.
6062 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
6063 Recognize char8_t.
6064 (path::u8string): Return std::u8string when char8_t support is
6065 enabled.
6066 (path::generic_u8string): Likewise.
6067 (path::_S_convert): Handle conversion from char8_t input.
6068 (path::_S_str_convert): Likewise.
6069 * include/experimental/string: Add u8string.
6070 * include/experimental/string_view: Add u8string_view,
6071 hash<experimental::u8string_view>, and
6072 operator""sv(const char8_t*, size_t).
6073 * include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
6074 * include/std/charconv (__is_int_to_chars_type): Recognize char8_t
6075 as a character type.
6076 * include/std/limits: Add numeric_limits<char8_t>.
6077 * include/std/string_view: Add u8string_view,
6078 hash<experimental::u8string_view>, and
6079 operator""sv(const char8_t*, size_t).
6080 * include/std/type_traits: Add __is_integral_helper<char8_t>,
6081 __make_unsigned<char8_t>, and __make_signed<char8_t>.
6082 * libsupc++/atomic_lockfree_defines.h: Define
6083 ATOMIC_CHAR8_T_LOCK_FREE.
6084 * src/c++11/Makefile.am: Compile with -fchar8_t when compiling
6085 codecvt.cc and limits.cc so that char8_t specializations of
6086 numeric_limits and codecvt and emitted.
6087 * src/c++11/Makefile.in: Likewise.
6088 * src/c++11/codecvt.cc: Define members of
6089 codecvt<char16_t, char8_t, mbstate_t>,
6090 codecvt<char32_t, char8_t, mbstate_t>,
6091 codecvt_byname<char16_t, char8_t, mbstate_t>, and
6092 codecvt_byname<char32_t, char8_t, mbstate_t>.
6093 * src/c++11/limits.cc: Define members of
6094 numeric_limits<char8_t>.
6095 * src/c++98/Makefile.am: Compile with -fchar8_t when compiling
6096 locale_init.cc and localename.cc.
6097 * src/c++98/Makefile.in: Likewise.
6098 * src/c++98/locale_init.cc: Add initialization for the
6099 codecvt<char16_t, char8_t, mbstate_t> and
6100 codecvt<char32_t, char8_t, mbstate_t> facets.
6101 * src/c++98/localename.cc: Likewise.
6102 * testsuite/util/testsuite_abi.cc: Validate ABI bump.
6103
eb8c4926
WD
61042019-02-18 Wilco Dijkstra <wdijkstr@arm.com>
6105
6106 * 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
6107 * 27_io/filesystem/operations/resize_file.cc: Likewise.
6108 * 27_io/filesystem/path/generation/normal2.cc: Likewise.
6109
8936f531
JW
61102019-02-14 Jonathan Wakely <jwakely@redhat.com>
6111
323694e9
JW
6112 * doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
6113 * doc/html/*: Regenerate.
6114
bb2a18a3
JW
6115 * doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
6116 * doc/html/*: Regenerate.
6117
b7dbc672
JW
6118 * doc/xml/manual/intro.xml: Document LWG 2586 status.
6119 * include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
6120 allocator type in is_constructible checks.
6121 * testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
6122 * testsuite/20_util/scoped_allocator/dr2586.cc: New test.
6123 * testsuite/20_util/tuple/cons/allocators.cc: Add test using
6124 problematic type from LWG 2586 discussion.
6125 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
6126 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
6127
a61ae535
JW
6128 * configure.ac: Check for C11 timespec_get function.
6129 * crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
6130 (openbsd): Likewise
6131 * config.h.in: Regenerate.
6132 * configure: Regenerate.
6133 * include/c_global/ctime (timespec, timespec_get): Add to namespace
6134 std for C++17 and up.
6135
1f4dcbf7
JW
6136 * doc/xml/manual/intro.xml: Document LWG 2537 status.
6137 * include/bits/stl_queue.h
6138 (priority_queue(const Compare&, const Container&, const Alloc&))
6139 (priority_queue(const Compare&, Container&&, const Alloc&)): Call
6140 make_heap.
6141 * testsuite/23_containers/priority_queue/dr2537.cc: New test.
6142
1138a19d
JW
6143 * doc/xml/manual/intro.xml: Document LWG 2566 status.
6144 * include/bits/stl_queue.h (queue, priority_queue): Add static
6145 assertions to enforce LWG 2566 requirement on value_type.
6146 * include/bits/stl_stack.h (stack): Likewise.
6147
133342f0
JW
6148 PR middle-end/89303
6149 * testsuite/20_util/enable_shared_from_this/89303.cc: New test.
6150
8936f531
JW
6151 * doc/xml/manual/intro.xml: Document LWG 2735 status.
6152 * include/bits/std_abs.h: Add comment about LWG 2735.
6153 * testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.
6154
329c0f89
JW
61552019-02-13 Jonathan Wakely <jwakely@redhat.com>
6156
6157 PR libstdc++/89345
6158 * include/std/version [__cpp_impl_destroying_delete]
6159 (__cpp_lib_destroying_delete): Only define for C++2a and later.
6160 * libsupc++/new [__cpp_impl_destroying_delete]
6161 (__cpp_lib_destroying_delete): Likewise.
6162 (destroying_delete_t, destroying_delete): Likewise, but define even
6163 when __cpp_impl_destroying_delete is not defined.
6164 * testsuite/18_support/destroying_delete.cc: New test.
6165
271ad97b
JW
61662019-02-11 Jonathan Wakely <jwakely@redhat.com>
6167
6168 PR libstdc++/89023
6169 * testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
6170 * testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
6171 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
6172 * testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.
6173
4fe5c8c7
JW
61742019-02-09 Jonathan Wakely <jwakely@redhat.com>
6175
6176 PR libstdc++/71044
6177 * include/bits/fs_path.h (path::has_root_name)
6178 (path::has_root_directory, path::has_root_path)
6179 (path::has_relative_path, path::has_parent_path)
6180 (path::has_filename, path::has_stem, path::has_extension)
6181 (path::is_absolute, path::is_relative, path::_M_find_extension): Add
6182 noexcept.
6183 * src/c++17/fs_path.cc (path::has_root_name)
6184 (path::has_root_directory, path::has_root_path)
6185 (path::has_relative_path, path::has_parent_path)
6186 (path::has_filename, path::_M_find_extension): Add noexcept.
6187
373c726e
JW
61882019-02-06 Jonathan Wakely <jwakely@redhat.com>
6189
6190 PR libstdc++/89102 (partial)
6191 * include/std/type_traits (common_type<>): Define.
6192 (common_type<T>): Derive from common_type<T, T>.
6193 * testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
6194 Test zero-length template argument list.
6195 * testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
6196 Test additional single argument cases.
6197 * testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
6198 Adjust expected error.
6199
27812872
JW
62002019-02-05 Jonathan Wakely <jwakely@redhat.com>
6201
5bb89e0a
JW
6202 PR libstdc++/89128
6203 * include/bits/stl_queue.h (queue, priority_queue): Add deduction
6204 guides.
6205 * include/bits/stl_stack.h (stack): Likewise.
6206 * testsuite/23_containers/priority_queue/deduction.cc: New test.
6207 * testsuite/23_containers/queue/deduction.cc: New test.
6208 * testsuite/23_containers/stack/deduction.cc: New test.
6209
ed99e818
JW
6210 PR libstdc++/89194
6211 * include/std/type_traits (__is_convertible_helper)
6212 (__is_convertible_helper<_From, _To, false>): Revert changes to
6213 support is_nothrow_convertible.
6214 (__is_nt_convertible_helper): New helper.
6215 (is_nothrow_convertible): Use __is_nt_convertible_helper.
6216
39bc6f87
JW
6217 * testsuite/23_containers/vector/modifiers/push_back/49836.cc: Restore
6218 use of CopyConsOnlyType, but also test DelAnyAssign for completeness.
6219
258bd1d6
JW
6220 PR libstdc++/89130
6221 * include/bits/alloc_traits.h (__is_copy_insertable_impl): Rename to
6222 __is_alloc_insertable_impl. Replace single type member with two
6223 members, one for each of copy and move insertable.
6224 (__is_move_insertable): New trait for internal use.
6225 * include/bits/stl_vector.h (vector::_S_nothrow_relocate(true_type))
6226 (vector::_S_nothrow_relocate(true_type)): New functions to
6227 conditionally check if __relocate_a can throw.
6228 (vector::_S_use_relocate()): Dispatch to _S_nothrow_relocate based
6229 on __is_move_insertable.
6230 (vector::_S_do_relocate): New overloaded functions to conditionally
6231 call __relocate_a.
6232 (vector::_S_relocate): New function that dispatches to _S_do_relocate
6233 based on _S_use_relocate.
6234 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
6235 (vector::_M_default_append): Call _S_relocate instead of __relocate_a.
6236 * testsuite/23_containers/vector/modifiers/push_back/89130.cc: New.
6237
27812872
JW
6238 PR libstdc++/89090
6239 * include/bits/stl_uninitialized.h (__relocate_a_1): Make unused
6240 parameter unnamed. Add message to static assertion.
6241 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
6242 (vector::_M_default_append): Use _GLIBCXX17_CONSTEXPR for if constexpr
6243 in C++11 code.
6244
9aa2470a
MG
62452019-02-05 Marc Glisse <marc.glisse@inria.fr>
6246
6247 PR libstdc++/87106
6248 * include/bits/stl_uninitialized.h (__is_trivially_relocatable):
6249 Rename...
6250 (__is_bitwise_relocatable): ... to this.
6251 (__relocate_a_1): Adapt.
6252 * include/bits/stl_deque.h (__is_trivially_relocatable): Rename...
6253 (__is_bitwise_relocatable): ... to this.
6254
9c536590
JW
62552019-01-30 Jonathan Wakely <jwakely@redhat.com>
6256
6257 PR libstdc++/89117
6258 * src/c++17/fs_path.cc (path::replace_extension): Erase extension from
6259 final component as well as from _M_pathname. Append the dot using
6260 operator+= instead of only to _M_pathname.
6261 (path::_M_find_extension): Reformat slightly.
6262 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
6263 Add more test cases.
6264
7341a03a
UD
62652019-01-30 Ulrich Drepper <drepper@redhat.com>
6266
6267 * doc/xml/manual/status_cxx2020.xml: Update P0600 entry.
6268
1f48525d
JW
62692019-01-29 Jonathan Wakely <jwakely@redhat.com>
6270
375d5984
JW
6271 * testsuite/26_numerics/headers/complex/synopsis.cc: Remove incorrect
6272 constexpr specifiers from arg and proj.
6273
45e7df85
JW
6274 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add missing exports for
6275 __shared_ptr instantiations used by gcc4-compatible ABI.
6276
f7f07df5
JW
6277 * include/experimental/forward_list (experimental::erase): Qualify
6278 call to erase_if.
6279 * include/experimental/list (experimental::erase): Likewise.
6280 * include/std/forward_list (std::erase): Likewise.
6281 * include/std/list (std::erase): Likewise.
6282
2104ca71
JW
6283 * testsuite/20_util/reference_wrapper/result_type.cc: Disable for
6284 C++2a.
6285 * testsuite/20_util/reference_wrapper/typedefs-2.cc: Likewise.
6286 * testsuite/20_util/reference_wrapper/typedefs-3.cc: Likewise.
6287 * testsuite/20_util/reference_wrapper/typedefs.cc: Likewise.
6288 * testsuite/30_threads/async/54297.cc: Suppress nodiscard warning.
6289 * testsuite/ext/array_allocator/26875.cc: Likewise.
6290 * testsuite/ext/pool_allocator/allocate_chunk.cc: Likewise.
6291 * testsuite/util/replacement_memory_operators.h: Likewise.
6292 * testsuite/util/testsuite_allocator.h: Likewise.
6293
1f48525d
JW
6294 * include/std/memory_resource (__pool_resource::_M_unpooled): Use
6295 normal mode vector, even for debug mode.
6296 * include/std/vector [_GLIBCXX_DEBUG] (_GLIBCXX_STD_C::pmr::vector):
6297 Define alias template for normal mode vector.
6298
c98f2551
JW
62992019-01-28 Jonathan Wakely <jwakely@redhat.com>
6300
6301 PR libstdc++/68737
6302 * config/locale/generic/c_locale.h (__convert_from_v)
6303 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
6304 * config/os/hpux/os_defines.h: Define _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
6305 * include/bits/locale_facets.tcc (num_put::_M_insert_float)
6306 [_GLIBCXX_USE_C99_STDIO]: Also check _GLIBCXX_HAVE_BROKEN_VSNPRINTF.
6307
400a08e2
JW
63082019-01-24 Jonathan Wakely <jwakely@redhat.com>
6309
e658669f
JW
6310 PR libstdc++/88840
6311 * include/bits/stl_vector.h (vector::__use_relocate): Replace static
6312 data member with static member function _S_use_relocate().
6313 * include/bits/vector.tcc (vector::reserve, vector::_M_realloc_insert)
6314 (vector::_M_default_append): Use _S_use_relocate() instead of
6315 __use_relocate.
6316
400a08e2
JW
6317 * testsuite/27_io/filesystem/path/compare/strings.cc: Only compare
6318 sign of results.
6319
4c6b0981
JW
63202019-01-22 Jonathan Wakely <jwakely@redhat.com>
6321
6322 PR libstdc++/88740
6323 * testsuite/util/testsuite_hooks.h [stderr] (VERIFY): Use fprintf to
6324 write to stderr instead of using printf.
6325
8f10fb50
JJ
63262019-01-21 Jakub Jelinek <jakub@redhat.com>
6327
6328 PR libstdc++/86590
6329 * include/bits/char_traits.h (__constant_string_p,
6330 __constant_char_array_p): Use __builtin_is_constant_evaluated if
6331 available.
6332
d715f554
UD
63332019-01-20 Ulrich Drepper <drepper@redhat.com>
6334
6335 Implement C++20 P0600r1.
6336 * include/backward/hash_map: Add nodiscard attribute to empty.
6337 * include/backward/hash_set: Likewise.
6338 * backward/hashtable.h: Likewise.
6339 * include/bits/basic_string.h: Likewise.
6340 * include/bits/forward_list.h: Likewise.
6341 * include/bits/hashtable.h: Likewise.
6342 * include/bits/regex.h: Likewise.
6343 * include/bits/stl_deque.h: Likewise.
6344 * include/bits/stl_list.h: Likewise.
6345 * include/bits/stl_map.h: Likewise.
6346 * include/bits/stl_multimap.h: Likewise.
6347 * include/bits/stl_multiset.h: Likewise.
6348 * include/bits/stl_queue.h: Likewise.
6349 * include/bits/stl_set.h: Likewise.
6350 * include/bits/stl_stack.h: Likewise.
6351 * include/bits/stl_tree.h: Likewise.
6352 * include/bits/stl_vector.h: Likewise.
6353 * include/bits/unordered_map.h: Likewise.
6354 * include/bits/unordered_set.h: Likewise.
6355 * include/debug/array: Likewise.
6356 * include/experimental/any: Likewise.
6357 * include/experimental/bits/fs_path.h: Likewise.
6358 * include/experimental/internet: Likewise.
6359 * include/experimental/string_view: Likewise.
6360 * include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp:
6361 Likewise.
6362 * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp:
6363 Likewise.
6364 * include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp:
6365 Likewise.
6366 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp:
6367 Likewise.
6368 * include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp:
6369 Likewise.
6370 * include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp:
6371 Likewise.
6372 * include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp:
6373 Likewise.
6374 * include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp:
6375 Likewise.
6376 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
6377 info_fn_imps.hpp: Likewise.
6378 * include/ext/pb_ds/detail/left_child_next_sibling_heap_/
6379 left_child_next_sibling_heap_.hpp: Likewise.
6380 * include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp:
6381 Likewise.
6382 * include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp:
6383 Likewise.
6384 * include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp:
6385 Likewise.
6386 * include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hp:
6387 Likewise.
6388 * include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp:
6389 Likewise.
6390 * include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp:
6391 Likewise.
6392 * include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp:
6393 Likewise.
6394 * include/ext/pb_ds/detail/tree_trace_base.hpp: Likewise.
6395 * include/ext/pb_ds/trie_policy.hpp: Likewise.
6396 * include/ext/rope: Likewise.
6397 * include/ext/slist: Likewise.
6398 * include/ext/vstring.h: Likewise.
6399 * include/profile/array: Likewise.
6400 * include/std/array: Likewise.
6401 * include/tr1/array: Likewise.
6402 * include/tr1/hashtable.h: Likewise.
6403 * include/tr1/regex: Likewise.
6404 * include/tr2/dynamic_bitset: Likewise.
6405 * include/bits/alloc_traits.h: Add nodiscard attribute to
6406 allocate.
6407 * include/experimental/memory_resource: Likewise.
6408 * include/ext/alloc_traits.h: Likewise.
6409 * include/ext/array_allocator.h: Likewise.
6410 * include/ext/bitmap_allocator.h: Likewise.
6411 * include/ext/debug_allocator.h: Likewise.
6412 * include/ext/extptr_allocator.h: Likewise.
6413 * include/ext/mt_allocator.h: Likewise.
6414 * include/ext/new_allocator.h: Likewise.
6415 * include/ext/pool_allocator.h: Likewise.
6416 * include/ext/throw_allocator.h: Likewise.
6417 * include/std/scoped_allocator: Likewise.
6418 * libsupc++/eh_alloc.cc: Likewise.
6419 * include/std/future: Add nodiscard attribute to async.
6420 * libsupc++/new: Add nodiscard attribute to new.
6421
fb54aa59
JW
64222019-01-18 Jonathan Wakely <jwakely@redhat.com>
6423
6424 PR libstdc++/87514
6425 PR libstdc++/87520
6426 PR libstdc++/88782
6427 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export new symbol.
6428 * include/bits/shared_ptr.h
6429 (shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...))
6430 (allocate_shared): Change to use new tag type.
6431 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_eq):
6432 Declare new member function.
6433 (_Sp_alloc_shared_tag): Define new type.
6434 (_Sp_counted_ptr_inplace): Declare __shared_count<_Lp> as a friend.
6435 (_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Use
6436 _Sp_make_shared_tag::_S_eq to check type_info.
6437 (__shared_count(Ptr, Deleter),__shared_count(Ptr, Deleter, Alloc)):
6438 Constrain to prevent being called with _Sp_alloc_shared_tag.
6439 (__shared_count(_Sp_make_shared_tag, const _Alloc&, Args&&...)):
6440 Replace constructor with ...
6441 (__shared_count(Tp*&, _Sp_alloc_shared_tag<_Alloc>, Args&&...)): Use
6442 reference parameter so address of the new object can be returned to
6443 the caller. Obtain the allocator from the tag type.
6444 (__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Replace
6445 constructor with ...
6446 (__shared_ptr(_Sp_alloc_shared_tag<Alloc>, Args&&...)): Pass _M_ptr
6447 to the __shared_count constructor.
6448 (__allocate_shared): Change to use new tag type.
6449 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq): Define.
6450
dd0f7ba2
JW
64512019-01-17 Jonathan Wakely <jwakely@redhat.com>
6452
16d46c7b
JW
6453 * src/c++17/fs_ops.cc
6454 (equivalent(const path&, const path&, error_code&))
6455 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use GetFileInformationByHandle to
6456 compare files instead of relying on incomplete info returned by stat.
6457
fc6f857b
JW
6458 PR libstdc++/88884
6459 * src/c++17/fs_ops.cc (absolute(const path&, error_code&)): Do nothing
6460 if the path is already absolute.
6461 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize root-directory.
6462 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Pass error_code to current_path.
6463
dd0f7ba2
JW
6464 PR libstdc++/88881
6465 * src/c++17/fs_ops.cc (canonical(const path&, error_code&))
6466 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Normalize path, to match behaviour
6467 of filesystem::exists.
6468 (create_directories(const path&, error_code&)): Add assertions.
6469 (status(const path&, error_code&)) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]:
6470 Add workaround for bug in _wstat for paths with trailing slash.
6471 * testsuite/27_io/filesystem/operations/create_directories.cc: Adjust
6472 for expected behaviour on mingw.
6473 * testsuite/experimental/filesystem/operations/create_directories.cc:
6474 Likewise.
6475 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Use
6476 "TMP" instead of "TMPDIR" and clean environment before each test. Do
6477 not test permissions on mingw targets.
6478
edfe833a
JW
64792019-01-16 Jonathan Wakely <jwakely@redhat.com>
6480
6481 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add exports for fstream
6482 constructors and open members taking wide strings. Fix patterns for
6483 filesystem::path members to match wstring_view parameters. Add
6484 exports for shared_ptr members used by directory iterators.
6485 * src/c++17/fs_ops.cc (remove(const path&, error_code&)): Clear the
6486 error code parameter if the file doesn't exist.
6487 * src/filesystem/ops.cc (remove(const path&, error_code&)):
6488 Likewise.
6489 * testsuite/27_io/filesystem/operations/canonical.cc: Fix expected
6490 values for mingw targets, where "/" is not an absolute path. Do not
6491 test symlinks on mingw targets.
6492 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
6493 * testsuite/27_io/filesystem/operations/copy.cc: Do not test symlinks
6494 on mingw targets.
6495 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
6496 * testsuite/27_io/filesystem/operations/create_directories.cc: Check
6497 that each component of the path is created.
6498 * testsuite/experimental/filesystem/operations/create_directories.cc:
6499 Likewise.
6500 * testsuite/27_io/filesystem/operations/exists.cc: Do not test
6501 permissions on mingw targets.
6502 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
6503 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
6504 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
6505 * testsuite/27_io/filesystem/operations/permissions.cc: XFAIL for
6506 mingw targets.
6507 * testsuite/experimental/filesystem/operations/permissions.cc:
6508 Likewise.
6509 * testsuite/27_io/filesystem/operations/remove.cc: Do not test
6510 symlinks or permissions on mingw targets.
6511 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
6512 * testsuite/27_io/filesystem/operations/remove_all.cc: Do not test
6513 symlinks on mingw targets.
6514 * testsuite/experimental/filesystem/operations/remove_all.cc:
6515 Likewise.
6516 * testsuite/27_io/filesystem/operations/status.cc: Do not test
6517 permissions on mingw targets.
6518 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Do not
6519 test symlinks on mingw targets.
6520 * testsuite/experimental/filesystem/operations/space.cc: Fix test
6521 for mingw targets.
6522
ec0d5371
UD
65232019-02-14 Ulrich Drepper <drepper@redhat.com>
6524
6525 PR libstdc++/88738
6526 Warn about unused comparisons of shared_ptr/unique_ptr
6527 * include/bits/c++config [_GLIBCXX_NODISCARD]: Define.
6528 * include/bits/shared_ptr.h: Use it for operator ==, !=,
6529 <, <=, >, >= for shared_ptr.
6530 * include/bits/unique_ptr.h: Likewise for unique_ptr.
6531
04fdd1fd
JW
65322019-01-15 Jonathan Wakely <jwakely@redhat.com>
6533
10ddff67
JW
6534 * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
6535 as 201611L, because P0497R0 changes are supported.
6536 * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.
6537
6e3dd211
JW
6538 * include/bits/erase_if.h [__cplusplus > 201703L]
6539 (__cpp_lib_erase_if): Only define for C++2a.
6540 * include/std/iterator [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
6541 (__cpp_lib_null_iterators): Define.
6542 * include/std/version [__cplusplus >= 201402L && !_GLIBCXX_DEBUG]
6543 (__cpp_lib_null_iterators): Define.
6544 [__cpp_impl_destroying_delete] (__cpp_lib_destroying_delete): Define.
6545
56a9eaf9
JW
6546 * doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
6547 status.
6548 * include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
6549 Define.
6550 * include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
6551 changes are supported.
6552 * include/std/optional (__cpp_lib_optional): Likewise.
6553 * include/std/variant (__cpp_lib_variant): Likewise.
6554 * include/std/version [!__STRICT_ANSI__]
6555 (__cpp_lib_uncaught_exceptions): Define as long integer.
6556 [__cplusplus >= 201703L] (__cpp_lib_any)
6557 (__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
6558 (__cpp_lib_variant): Define for C++17.
6559 [__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
6560 as long integer.
6561 * libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long
6562 integer.
6563
04fdd1fd
JW
6564 * doc/xml/manual/status_cxx2020.xml: Update P1123R0 status.
6565
7f00fdb2
JW
65662019-01-12 Jonathan Wakely <jwakely@redhat.com>
6567
6568 PR libstdc++/88811
6569 PR libstdc++/83306
6570 * src/filesystem/path.cc: Fix typo. If first path is empty, show []
6571 before second path.
6572 * testsuite/experimental/filesystem/filesystem_error/cons.cc: New
6573 test.
6574
e334d7a7
JW
65752019-01-11 Jonathan Wakely <jwakely@redhat.com>
6576
66dc59e2
JW
6577 * doc/xml/manual/intro.xml: Include new section.
6578 * doc/xml/manual/status_cxx2017.xml: Document more
6579 implementation-defined properties of the library.
6580 * doc/xml/manual/status_cxx2020.xml: Document C++2a status.
6581 * doc/html/*: Regenerate.
6582
aaeac156
JW
6583 * include/bits/refwrap.h [__cplusplus > 201703L]
6584 (_Refwrap_base_arg1, _Refwrap_base_arg2, _Reference_wrapper_base)
6585 (_Reference_wrapper_base_memfun): Do not define for C++2a.
6586 (reference_wrapper): Do not derive from _Reference_wrapper_base_memfun
6587 for C++2a.
6588 (reference_wrapper::operator()): Add static assertion.
6589 * testsuite/20_util/reference_wrapper/incomplete.cc: New test.
6590
5e9aed14
JW
6591 * include/std/chrono (duration_values::zero(), duration_values::min())
6592 (duration_values::max()): Add noexcept.
6593 (duration::zero(), duration::min(), duration::max()): Likewise.
6594 (time_point::zero(), time_point::min(), time_point::max()): Likewise.
6595 * testsuite/20_util/duration/requirements/noexcept.cc: New test.
6596 * testsuite/20_util/time_point/requirements/noexcept.cc: New test.
6597
e334d7a7
JW
6598 * include/std/version (__cpp_lib_erase_if): Move to C++20 group.
6599
134a6f7b
JJ
66002019-01-11 Jakub Jelinek <jakub@redhat.com>
6601
6602 * include/std/type_traits (__cpp_lib_is_constant_evaluated): Define.
6603 * include/std/version (__cpp_lib_is_constant_evaluated): Define.
6604
8ce7e3f8
JW
66052019-01-11 Jonathan Wakely <jwakely@redhat.com>
6606
17a73b3c
JW
6607 PR libstdc++/88802
6608 * include/bits/functional_hash.h (hash<nullptr_t>): Define
6609 specialization for C++17 (P0513R0, LWG 2817).
6610 * testsuite/20_util/hash/nullptr.cc: New test.
6611
bbed72f5
JW
6612 PR libstdc++/88125
6613 * config/abi/pre/gnu.ver (GLIBCXX_3.4.6): Remove unused duplicate
6614 pattern for std::basic_stringbuf::str().
6615
8ce7e3f8
JW
6616 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Correct recent changes to
6617 basic_ostream::operator<< patterns.
6618
cbe0bca4
JW
66192019-01-10 Jonathan Wakely <jwakely@redhat.com>
6620
174f1d26
JW
6621 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fix
6622 test failures on targets with 32-bit time_t.
6623
45a8d80f
JW
6624 * include/bits/erase_if.h: Define __cpp_lib_erase_if.
6625 * include/std/deque: Likewise.
6626 * include/std/forward_list: Likewise.
6627 * include/std/list: Likewise.
6628 * include/std/string: Likewise.
6629 * include/std/vector: Likewise.
6630 * include/std/version: Likewise.
6631 * testsuite/21_strings/basic_string/erasure.cc: Test macro.
6632 * testsuite/23_containers/deque/erasure.cc: Likewise.
6633 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6634 * testsuite/23_containers/list/erasure.cc: Likewise.
6635 * testsuite/23_containers/map/erasure.cc: Likewise.
6636 * testsuite/23_containers/set/erasure.cc: Likewise.
6637 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6638 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6639 * testsuite/23_containers/vector/erasure.cc: Likewise.
6640
cbe0bca4
JW
6641 * include/experimental/internet [AI_NUMERICSERV]
6642 (resolver_base::numeric_service): Define conditionally.
6643 * testsuite/experimental/net/internet/resolver/base.cc: Test it
6644 conditionally.
6645 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
6646 Likewise.
6647
c3799b16
VV
66482019-01-10 Ville Voutilainen <ville.voutilainen@gmail.com>
6649 Jonathan Wakely <jwakely@redhat.com>
6650
6651 Implement LWG 2221
6652 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten patterns.
6653 (GLIBCXX_3.4.26): Add new exports.
6654 * include/Makefile.am: Add ostream-inst.cc. Move string-inst.cc to
6655 correct list of sources.
6656 * include/Makefile.in: Regenerate.
6657 * include/std/ostream (operator<<(nullptr_t)): New member function.
6658 * src/c++17/ostream-inst.cc: New file.
6659 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc: New
6660 test.
6661
7c4979b2
JW
66622019-01-10 Jonathan Wakely <jwakely@redhat.com>
6663
6664 * testsuite/util/testsuite_fs.h (nonexistent_path): Include name
6665 of the source file containing the caller.
6666 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Remove
6667 directories created by test.
6668 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6669 Likewise.
6670 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
6671 Likewise.
6672 * testsuite/experimental/filesystem/iterators/
6673 recursive_directory_iterator.cc: Likewise.
6674
6cdf1946
JJ
66752019-01-10 Jakub Jelinek <jakub@redhat.com>
6676
6677 PR tree-optimization/88775
6678 * include/bits/stl_function.h (greater<_Tp*>::operator(),
6679 less<_Tp*>::operator(), greater_equal<_Tp*>::operator(),
6680 less_equal<_Tp*>::operator()): Use __builtin_is_constant_evaluated
6681 instead of __builtin_constant_p if available. Don't bother with
6682 the pointer comparison in C++11 and earlier.
6683
67914693
SL
66842019-01-09 Sandra Loosemore <sandra@codesourcery.com>
6685
6686 PR other/16615
6687
6688 * include/ext/bitmap_allocator.h: Mechanically replace "can not"
6689 with "cannot".
6690
c86fab9d
JW
66912019-01-09 Jonathan Wakely <jwakely@redhat.com>
6692
d3c8a7cf
JW
6693 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix expected output
6694 for filesystem::path. Give variables more distinctive names.
6695
50b0a3d6
JW
6696 * include/std/optional (_Optional_payload_base::_M_copy_assign): New
6697 member function to perform non-trivial assignment.
6698 (_Optional_payload_base::_M_move_assign): Likewise.
6699 (_Optional_payload<T, true, false, true>::operator=)
6700 (_Optional_payload<T, true, true, false>::operator=)
6701 (_Optional_payload<T, true, false, false>::operator=): Call
6702 _M_copy_assign and/or _M_move_assign to do non-trivial assignments.
6703
c86fab9d
JW
6704 PR libstdc++/88204
6705 * testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
6706 test std::complex<long double> if long double format is IBM128.
6707 * testsuite/26_numerics/complex/requirements/more_constexpr.cc:
6708 Likewise.
6709
9f5391ee
JW
67102019-01-08 Jonathan Wakely <jwakely@redhat.com>
6711
416f5559
JW
6712 * testsuite/libstdc++-prettyprinters/compat.cc: Test printer support
6713 for old std::unique_ptr layout.
6714 * testsuite/libstdc++-prettyprinters/cxx17.cc: Fix std::variant test
6715 to become valueless. Add filesystem::path tests.
6716
d942bc80
JW
6717 PR libstdc++/87855
6718 * include/std/optional (_Optional_payload_base): New class template
6719 for common code hoisted from _Optional_payload specializations. Use
6720 a template for the union, to allow a partial specialization for
6721 types with non-trivial destructors. Add constructors for in-place
6722 initialization to the union.
6723 (_Optional_payload(bool, const _Optional_payload&)): Use _M_construct
6724 to perform non-trivial copy construction, instead of relying on
6725 non-standard copy elision in a delegating constructor.
6726 (_Optional_payload(bool, _Optional_payload&&)): Likewise for
6727 non-trivial move construction.
6728 (_Optional_payload): Derive from _Optional_payload_base and use it
6729 for everything except the non-trivial assignment operators, which are
6730 defined as needed.
6731 (_Optional_payload<false, C, M>): Derive from the specialization
6732 _Optional_payload<true, false, false> and add a destructor.
6733 (_Optional_base_impl::_M_destruct, _Optional_base_impl::_M_reset):
6734 Forward to corresponding members of _Optional_payload.
6735 (_Optional_base_impl::_M_is_engaged, _Optional_base_impl::_M_get):
6736 Hoist common members from _Optional_base.
6737 (_Optional_base): Make all members and base class public.
6738 (_Optional_base::_M_get, _Optional_base::_M_is_engaged): Move to
6739 _Optional_base_impl.
6740 * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter): Add
6741 support for new std::optional layout.
6742 * testsuite/libstdc++-prettyprinters/compat.cc: New test.
6743
9f5391ee
JW
6744 PR libstdc++/88066
6745 * include/bits/locale_conv.h: Use <> for includes not "".
6746 * include/ext/random: Likewise.
6747 * include/ext/vstring.h: Likewise.
6748
e93bfd2d
RO
67492019-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6750
6751 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Tighten existing patterns.
6752 (GLIBCXX_3.4.21): Likewise.
6753
35724e51
JW
67542019-01-08 Jonathan Wakely <jwakely@redhat.com>
6755
6756 PR libstdc++/88749
6757 * src/filesystem/ops.cc (last_write_time): Fix preprocessor condition
6758 to match the one that controls whether utimbuf and utime are declared.
6759
cf4b581f
JW
67602019-01-07 Jonathan Wakely <jwakely@redhat.com>
6761
e002afaa
JW
6762 PR libstdc++/87787
6763 * include/bits/char_traits.h (char_traits::move): Do not pass null
6764 pointers to memmove.
6765 * include/bits/locale_facets.h
6766 (ctype<char>::widen(const char*, const char*, char*)): Do not
6767 pass null pointers to memcpy.
6768 (ctype<char>::narrow(const char*, const char*, char, char*)):
6769 Likewise.
6770 (ctype<char>::do_widen(const char*, const char*, char*)):
6771 Likewise.
6772 (ctype<char>::do_narrow(const char*, const char*, char, char*)):
6773 Likewise.
6774
f0f1121b
JW
6775 * doc/xml/manual/spine.xml: Update copyright years.
6776 * doc/xml/manual/status_cxx2017.xml: Adjust note about -lstdc++fs.
6777 * doc/xml/manual/using.xml: Remove requirement to link with -lstdc++fs
6778 for C++17 filesystem library.
6779 * doc/html/*: Regenerate.
6780
cf4b581f
JW
6781 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for truncate.
6782 * config.h.in: Regenerate.
6783 * config/abi/pre/gnu.ver: Order patterns for filesystem operations
6784 alphabetically and add missing entries for copy_symlink,
6785 hard_link_count, rename, and resize_file.
6786 * configure: Regenerate.
6787 * src/c++17/fs_ops.cc (resize_file): Remove #if so posix::truncate is
6788 used unconditionally.
6789 * src/filesystem/ops-common.h (__gnu_posix::truncate)
6790 [!_GLIBCXX_HAVE_TRUNCATE]: Provide fallback definition that only
6791 supports truncating to zero length.
6792 * testsuite/27_io/filesystem/operations/all.cc: New test.
6793 * testsuite/27_io/filesystem/operations/resize_file.cc: New test.
6794
ecaad8d5
JW
67952019-01-06 Jonathan Wakely <jwakely@redhat.com>
6796
de4db54f
JW
6797 PR libstdc++/86756
6798 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for utime and
6799 lstat and define _GLIBCXX_USE_UTIME and _GLIBCXX_USE_LSTAT.
6800 * config.h.in: Regenerate.
6801 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export symbols for
6802 remaining std::filesystem types and functions.
6803 * configure: Regenerate.
6804 * src/c++17/Makefile.am: Add C++17 filesystem sources.
6805 * src/c++17/Makefile.in: Regenerate.
6806 * src/c++17/cow-fs_dir.cc: Move src/filesystem/cow-std-dir.cc to
6807 here, and change name of included file.
6808 * src/c++17/cow-fs_ops.cc: Move src/filesystem/cow-std-ops.cc to
6809 here, and change name of included file.
6810 * src/c++17/fs_dir.cc: Move src/filesystem/std-dir.cc to here. Change
6811 path to dir-common.h.
6812 * src/c++17/fs_ops.cc: Move src/filesystem/std-ops.cc to here. Change
6813 path to ops-common.h. Disable -Wunused-parameter warnings.
6814 (internal_file_clock): Define unconditionally.
6815 [!_GLIBCXX_HAVE_SYS_STAT_H] (internal_file_clock::from_stat): Do not
6816 define.
6817 (do_copy_file, do_space): Move definitions to ops.common.h.
6818 (copy, file_size, hard_link_count, last_write_time, space): Only
6819 perform operation when _GLIBCXX_HAVE_SYS_STAT_H is defined, otherwise
6820 report an error.
6821 (last_write_time, read_symlink): Remove unused attributes from
6822 parameters.
6823 * src/filesystem/Makefile.am: Remove C++17 filesystem sources.
6824 * src/filesystem/Makefile.in: Regenerate.
6825 * src/filesystem/cow-std-dir.cc: Move to src/c++17/cow-fs_dir.cc.
6826 * src/filesystem/cow-std-ops.cc: Move to src/c++17/cow-fs_ops.cc.
6827 * src/filesystem/std-dir.cc: Move to src/c++17/fs_dir.cc.
6828 * src/filesystem/std-ops.cc: Move to src/c++17/fs_ops.cc.
6829 * src/filesystem/dir-common.h [!_GLIBCXX_HAVE_DIRENT_H]: Define
6830 dummy types and functions instead of using #error.
6831 * src/filesystem/dir.cc [!_GLIBCXX_HAVE_DIRENT_H]: Use #error.
6832 * src/filesystem/ops-common.h [!_GLIBCXX_USE_LSTAT] (lstat): Define
6833 in terms of stat.
6834 [!_GLIBCXX_HAVE_UNISTD_H]: Define dummy types and functions.
6835 (do_copy_file, do_space): Move definitions here from std-ops.cc.
6836 * src/filesystem/ops.cc: Adjust calls to do_copy_file and do_space
6837 to account for new namespace.
6838 * testsuite/27_io/filesystem/directory_entry/86597.cc: Remove
6839 -lstdc++fs from dg-options.
6840 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc: Likewise.
6841 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
6842 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
6843 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
6844 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
6845 Likewise.
6846 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
6847 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6848 Likewise.
6849 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
6850 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
6851 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
6852 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
6853 * testsuite/27_io/filesystem/operations/create_directories.cc:
6854 Likewise.
6855 * testsuite/27_io/filesystem/operations/create_directory.cc: Likewise.
6856 * testsuite/27_io/filesystem/operations/create_symlink.cc: Likewise.
6857 * testsuite/27_io/filesystem/operations/current_path.cc: Likewise.
6858 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
6859 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
6860 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
6861 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
6862 * testsuite/27_io/filesystem/operations/last_write_time.cc: Likewise.
6863 * testsuite/27_io/filesystem/operations/permissions.cc: Likewise.
6864 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
6865 * testsuite/27_io/filesystem/operations/read_symlink.cc: Likewise.
6866 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
6867 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
6868 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
6869 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
6870 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
6871 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
6872 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
6873 Likewise.
6874 * testsuite/27_io/filesystem/operations/weakly_canonical.cc: Likewise.
6875
6876
2b522535
JW
6877 PR libstdc++/86756
6878 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Make various patterns for
6879 typeinfo and vtables less greedy.
6880 (GLIBCXX_3.4.26): Export symbols for std::filesystem::path.
6881 * src/c++17/Makefile.am: Add fs_path.cc and cow-fs_path.cc.
6882 * src/c++17/Makefile.in: Regenerate.
6883 * src/c++17/cow-fs_path.cc: Move src/filesystem/cow-std-path.cc to
6884 here, and change name of included file.
6885 * src/c++17/fs_path.cc: Move src/filesystem/std-path.cc to here.
6886 * src/filesystem/Makefile.am: Remove std-path.cc and cow-std-path.cc
6887 from sources.
6888 * src/filesystem/Makefile.in: Regenerate.
6889 * src/filesystem/cow-std-path.cc: Move to src/c++17/cow-fs_path.cc.
6890 * src/filesystem/std-path.cc: Move to src/c++17/fs_path.cc.
6891 * testsuite/27_io/filesystem/path/append/path.cc: Remove -lstdc++fs
6892 from dg-options and remove dg-require-filesystem-ts.
6893 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
6894 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
6895 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
6896 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
6897 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6898 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6899 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6900 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
6901 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
6902 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
6903 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
6904 * testsuite/27_io/filesystem/path/construct/default.cc: Likewise.
6905 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
6906 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
6907 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
6908 * testsuite/27_io/filesystem/path/construct/string_view.cc: Likewise.
6909 * testsuite/27_io/filesystem/path/decompose/extension.cc: Likewise.
6910 * testsuite/27_io/filesystem/path/decompose/filename.cc: Likewise.
6911 * testsuite/27_io/filesystem/path/decompose/parent_path.cc: Likewise.
6912 * testsuite/27_io/filesystem/path/decompose/relative_path.cc: Likewise.
6913 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
6914 Likewise.
6915 * testsuite/27_io/filesystem/path/decompose/root_name.cc: Likewise.
6916 * testsuite/27_io/filesystem/path/decompose/root_path.cc: Likewise.
6917 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
6918 * testsuite/27_io/filesystem/path/generation/normal.cc: Likewise.
6919 * testsuite/27_io/filesystem/path/generation/normal2.cc: Likewise.
6920 * testsuite/27_io/filesystem/path/generation/proximate.cc: Likewise.
6921 * testsuite/27_io/filesystem/path/generation/relative.cc: Likewise.
6922 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Likewise.
6923 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
6924 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
6925 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
6926 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
6927 Likewise.
6928 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
6929 Likewise.
6930 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
6931 Likewise.
6932 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
6933 Likewise.
6934 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
6935 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
6936 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
6937 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc: Likewise.
6938 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
6939 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
6940 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
6941 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
6942 * testsuite/27_io/filesystem/path/query/has_relative_path.cc: Likewise.
6943 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
6944 Likewise.
6945 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
6946 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
6947 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
6948 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Likewise.
6949 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
6950
caf80d87
JW
6951 PR libstdc++/87431
6952 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
6953 Check is_trivially_copyable instead of is_scalar.
6954 (variant::emplace<N, Args>(Args&&...)): If construction of the new
6955 contained value can throw and its type is trivially copyable then
6956 construct into a temporary variant and move from it, to provide the
6957 strong exception safety guarantee.
6958 (variant::emplace<N, U, Args>(initializer_list<U>, Args&&...)):
6959 Likewise.
6960 * testsuite/20_util/variant/87431.cc: New test.
6961 * testsuite/20_util/variant/run.cc: Adjust test so that throwing
6962 conversion causes valueless state.
6963
ecaad8d5
JW
6964 PR libstdc++/88607
6965 * testsuite/17_intro/headers/c++1998/charset.cc: New test.
6966 * testsuite/17_intro/headers/c++2011/charset.cc: New test.
6967 * testsuite/17_intro/headers/c++2014/charset.cc: New test.
6968 * testsuite/17_intro/headers/c++2017/charset.cc: New test.
6969 * testsuite/17_intro/headers/c++2020/charset.cc: New test.
6970
beb04ce9
JW
69712019-01-05 Jonathan Wakely <jwakely@redhat.com>
6972
6973 * include/bits/fs_fwd.h (__file_clock): Define new clock.
6974 (file_time_type): Redefine in terms of __file_clock.
6975 * src/filesystem/ops-common.h (file_time): Add FIXME comment about
6976 overflow.
6977 * src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
6978 internal linkage.
6979 (internal_file_lock): New helper type for accessing __file_clock.
6980 (do_copy_file): Use internal_file_lock to convert system time to
6981 file_time_type.
6982 (last_write_time(const path&, error_code&)): Likewise.
6983 (last_write_time(const path&, file_time_type, error_code&)): Likewise.
6984
5db78cac
JW
69852019-01-04 Jonathan Wakely <jwakely@redhat.com>
6986
1a289fa3
JW
6987 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Make patterns less greedy
6988 for const member functions of std::basic_string.
6989 (GLIBCXX_3.4.26): Export member functions of std::basic_string added
6990 in C++17.
6991 * include/bits/basic_string.h (basic_string(__sv_wrapper, const A&)):
6992 Make non-standard constructor private.
6993 [!_GLIBCXX_USE_CXX11_ABI] (basic_string(__sv_wrapper, const A&)):
6994 Likewise.
6995 * include/bits/basic_string.tcc (std::string, std::wstring): Declare
6996 explicit instantiations for C++17 as well as earlier dialects.
6997 * src/c++17/Makefile.am: Add new source files.
6998 * src/c++17/Makefile.in: Regenerate.
6999 * src/c++17/cow-string-inst.cc: New file defining explicit
7000 instantiations for basic_string member functions added in C++17.
7001 * src/c++17/string-inst.cc: Likewise.
7002
4ff3e650
JW
7003 * config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Export allocator-extended
7004 copy/move constructors for old std::basic_string.
7005 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
7006 (basic_string::reference, basic_string::const_reference): Define
7007 as plain references for C++11 and later.
7008 (basic_string::basic_string()): Put constructor body outside
7009 preprocessor conditional groups.
7010 (basic_string::basic_string(basic_string&&)): Move _Alloc_hider
7011 instead of copying it.
7012 (basic_string::basic_string(const basic_string&, const _Alloc&)):
7013 Define.
7014 (basic_string::basic_string(basic_string&&, const _Alloc&)):
7015 Define.
7016 * include/bits/fs_path.h [!_GLIBCXX_USE_CXX11_ABI]: Remove special
7017 cases for old basic_string.
7018 * testsuite/21_strings/basic_string/cons/char/8.cc: Test
7019 allocator-extended constructors unconditionally. Add extra members to
7020 allocator type when using old string ABI.
7021 * testsuite/21_strings/basic_string/allocator/71964.cc: Enable test
7022 for old string ABI.
7023 * testsuite/21_strings/basic_string/cons/wchar_t/8.cc: Likewise.
7024
6908c1dc
JW
7025 * testsuite/23_containers/list/61347.cc: Avoid spurious failure when
7026 -fno-inline added to test flags.
7027
9fc5a9a1
JW
7028 * testsuite/21_strings/basic_string/requirements/
7029 explicit_instantiation/debug.cc: Remove XFAIL for old ABI.
7030
66f31224
JW
7031 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Fix static
7032 assertion failures with old std::string ABI.
7033
73d968d9
JW
7034 * include/bits/fs_path.h (path::_List::erase): Replace both overloads
7035 with ...
7036 (path::pop_back(), path::_M_erase_from(const_iterator)): New member
7037 functions that will only erase elements at the end.
7038 * src/filesystem/std-path.cc (path::_List::_Impl::pop_back()): Define.
7039 (path::_List::_Impl::_M_erase_from(const_iterator)): Define.
7040 (path::_List::operator=(const _List&)): Use _M_erase_from(p) instead
7041 of erase(p, end()).
7042 (path::_List::pop_back()): Define.
7043 (path::_List::_M_erase_from(const_iterator)): Define.
7044 (path::operator/=(const path&)): Use pop_back to remove last component
7045 and _M_erase_from to remove multiple components.
7046 (path::_M_append(basic_string_view<value_type>)): Likewise.
7047 (path::operator+=(const path&)): Likewise.
7048 (path::_M_concat(basic_string_view<value_type>)): Likewise.
7049 (path::remove_filename()): Likewise.
7050 (path::lexically_normal()): Use _List::_Impl iterators instead of
7051 path::iterator. Use pop_back to remove components from the end. Clear
7052 trailing filename, instead of using erase(const_iterator) to remove
7053 a non-final component.
7054 * testsuite/27_io/filesystem/path/generation/normal.cc: Test
7055 additional cases.
7056 * testsuite/27_io/filesystem/path/generation/normal2.cc: New test.
7057
b3080217
JW
7058 * src/filesystem/std-path.cc (path::operator+=(const path&)): Fix
7059 incorrect treatment of empty filename after trailing slash.
7060 * testsuite/27_io/filesystem/path/concat/path.cc: Test problem case.
7061
5db78cac
JW
7062 * testsuite/21_strings/basic_string/modifiers/assign/char/
7063 move_assign_optim.cc: Avoid spurious failure when -fno-inline added
7064 to test flags.
7065 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
7066 move_assign_optim.cc: Likewise.
7067
43f1a5e1
JW
70682019-01-03 Jonathan Wakely <jwakely@redhat.com>
7069 Jakub Jelinek <jakub@redhat.com>
7070
7071 PR libstdc++/88607
7072 * include/experimental/memory: Replace UTF-8 quote characters.
7073 * include/std/future: Replace UTF-8 "em dash" characters.
7074
dd87c5c2
JW
70752019-01-03 Jonathan Wakely <jwakely@redhat.com>
7076
3c732e6f
JW
7077 PR libstdc++/88607
7078 * include/bits/forward_list.h: Replace UTF-8 "ligature fi" character.
7079 * include/debug/forward_list: Likewise.
7080 * include/experimental/bits/shared_ptr.h: Remove UTF-8 "section sign"
7081 character.
7082 * include/experimental/chrono: Likewise.
7083 * include/experimental/functional: Likewise.
7084 * include/experimental/ratio: Likewise.
7085 * include/experimental/system_error: Likewise.
7086 * include/experimental/tuple: Likewise.
7087 * include/experimental/type_traits: Likewise.
7088 * include/parallel/workstealing.h: Replace UTF-8 "en dash" character.
7089 * include/parallel/multiseq_selection.h: Likewise.
7090
dd87c5c2
JW
7091 PR libstdc++/88681
7092 * config/abi/pre/gnu.ver: Add missing exports.
7093 * testsuite/22_locale/collate_byname/88681.cc: New test.
7094 * testsuite/22_locale/time_get/get/char/88681.cc: New test.
7095 * testsuite/22_locale/time_get/get/wchar_t/88681.cc: New test.
7096
362eea7c
JW
70972019-01-02 Jonathan Wakely <jwakely@redhat.com>
7098
b3e2dc1e
JW
7099 * testsuite/23_containers/map/cons/deduction.cc: Test deduction from
7100 initializer_list<value_type> and from input iterator ranges.
7101 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
7102
362eea7c
JW
7103 * testsuite/experimental/string_view/element_access/char/empty.cc:
7104 Fix year range in copyright header.
7105
2667a5d0
JB
71062019-01-02 Joel Brobecker <brobecker@adacore.com>
7107
7108 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
7109 Fix year range in copyright header.
7110
a5544970 71112019-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
7112
7113 Update copyright years.
b4df5e92 7114\f
a5544970 7115Copyright (C) 2019 Free Software Foundation, Inc.
b4df5e92
JW
7116
7117Copying and distribution of this file, with or without modification,
7118are permitted in any medium without royalty provided the copyright
7119notice and this notice are preserved.