1 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
4 * src/c++11/system_error.cc
5 (system_error_category::default_error_condition): New override to
6 check for POSIX errno values.
7 * testsuite/19_diagnostics/error_category/generic_category.cc: New
8 * testsuite/19_diagnostics/error_category/system_category.cc: New
11 2018-07-31 Jonathan Wakely <jwakely@redhat.com>
14 * include/bits/stl_pair.h (__pair_base): New class with deleted copy
16 (pair): Derive from __pair_base.
17 (pair::operator=): Remove deleted overload.
18 * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
19 so that new base class isn't shown in GDB.
20 * testsuite/20_util/pair/86751.cc: New test.
21 * testsuite/20_util/pair/ref_assign.cc: New test.
23 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
24 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
25 (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
26 instead of __has_builtin.
27 * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
28 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
29 * include/std/version [!_GLIBCXX_HAS_GTHREADS]
30 (__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
31 (__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
32 [!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
33 (__cpp_lib_has_unique_object_representations): Don't define when
34 builtin not available.
35 [!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
37 [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
38 * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
41 * doc/xml/manual/test.xml: Improve documentation on writing tests for
43 * doc/xml/manual/using.xml: Document all headers for C++11 and later.
44 * doc/html/*: Regenerate.
46 * include/ext/pointer.h [__cplusplus >= 201103L]
47 (_Pointer_adapter::operator bool): Add explicit conversion operator
48 to replace safe bool idiom.
50 2018-07-30 Jonathan Wakely <jwakely@redhat.com>
53 * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
54 _S_to_pointer (LWG 1052, LWG 2118).
55 (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
56 * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
57 * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.
59 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
60 workaround for aligned_alloc bug on AIX.
61 * testsuite/18_support/new_aligned.cc: New test.
63 2018-07-26 Marek Polacek <polacek@redhat.com>
65 * testsuite/30_threads/condition_variable_any/cond.cc: New.
67 2018-07-26 Marek Polacek <polacek@redhat.com>
69 * src/c++98/locale_init.cc: Fix #ifdef condition.
71 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
73 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Add
74 dg-require-cstdint directive.
75 * testsuite/20_util/allocator/overaligned.cc: Likewise.
76 * testsuite/20_util/any/cons/aligned.cc: Likewise.
77 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Likewise.
78 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: Likewise.
79 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
81 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
82 * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise.
83 * testsuite/23_containers/set/allocator/move_assign.cc: Likewise.
84 * testsuite/25_algorithms/make_heap/complexity.cc: Likewise.
85 * testsuite/25_algorithms/pop_heap/complexity.cc: Require cstdint and
86 random_device effective-target.
87 * testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
88 * testsuite/25_algorithms/sample/1.cc: Require cstdint.
89 * testsuite/25_algorithms/sample/2.cc: Likewise.
90 * testsuite/25_algorithms/sort_heap/complexity.cc: Require cstdint
92 * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
94 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
96 * testsuite/26_numerics/random/discard_block_engine/requirements/
97 constexpr_data.cc: Likewise.
98 * testsuite/26_numerics/random/discard_block_engine/requirements/
99 constexpr_functions.cc: Likewise.
100 * testsuite/26_numerics/random/independent_bits_engine/requirements/
101 constexpr_functions.cc: Likewise.
102 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
103 constexpr_data.cc: Likewise.
104 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
105 constexpr_functions.cc: Likewise.
106 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
107 constexpr_data.cc: Likewise.
108 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
109 constexpr_functions.cc: Likewise.
110 * testsuite/26_numerics/random/pr60037-neg.cc: Likewise.
111 * testsuite/26_numerics/random/seed_seq/cons/65631.cc: Likewise.
112 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
113 constexpr_data.cc: Add dg-require-cstdint directive.
114 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
115 constexpr_functions.cc: Likewise.
116 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
117 constexpr_data.cc: Likewise.
118 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
119 constexpr_functions.cc: Likewise.
120 * testsuite/26_numerics/random/uniform_real_distribution/operators/
122 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Likewise.
123 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
124 * testsuite/experimental/algorithm/sample.cc: Likewise.
125 * testsuite/experimental/algorithm/search.cc: Likewise.
126 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
127 * testsuite/experimental/any/cons/aligned.cc: Likewise.
128 * testsuite/experimental/memory_resource/new_delete_resource.cc:
130 * testsuite/experimental/memory_resource/resource_adaptor.cc: Likewise.
131 * testsuite/experimental/random/randint.cc: Likewise.
132 * testsuite/experimental/source_location/1.cc: Likewise.
133 * testsuite/ext/bitmap_allocator/overaligned.cc: Likewise.
134 * testsuite/ext/malloc_allocator/overaligned.cc: Likewise.
135 * testsuite/ext/mt_allocator/overaligned.cc: Likewise.
136 * testsuite/ext/new_allocator/overaligned.cc: Likewise.
137 * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise.
138 * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
139 * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
140 * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
141 * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
142 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
143 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
144 * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
145 * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
146 * testsuite/ext/pool_allocator/overaligned.cc: Likewise.
147 * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Likewise.
148 * testsuite/ext/throw_allocator/check_deallocate_null.cc: Likewise.
149 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
150 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
151 * testsuite/ext/throw_allocator/deallocate_global.cc: Likewise.
152 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
153 * testsuite/ext/throw_allocator/explicit_instantiation.cc: Likewise.
154 * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
155 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
157 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
158 * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
159 * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
160 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
162 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
163 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
164 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
166 * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
168 * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
170 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
171 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
172 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
173 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
174 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
175 * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
177 * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
179 * testsuite/30_threads/recursive_timed_mutex/dest/
180 destructor_locked.cc: Likewise.
181 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
182 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
183 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
185 * testsuite/30_threads/recursive_timed_mutex/native_handle/
186 typesizes.cc: Likewise.
187 * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
189 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
191 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
193 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
195 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
197 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
199 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
201 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
203 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
204 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
205 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
206 * testsuite/30_threads/scoped_lock/requirements/
207 explicit_instantiation.cc: Likewise.
208 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise.
209 * testsuite/30_threads/shared_future/cons/assign.cc: Likewise.
210 * testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.
211 * testsuite/30_threads/shared_future/cons/copy.cc: Likewise.
212 * testsuite/30_threads/shared_future/cons/default.cc: Likewise.
213 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
214 * testsuite/30_threads/shared_future/cons/move_assign.cc: Likewise.
215 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
216 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
217 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
218 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
219 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
220 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
221 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
222 * testsuite/30_threads/shared_future/requirements/
223 explicit_instantiation.cc: Likewise.
224 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
225 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
226 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
227 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
228 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
229 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
230 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
231 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
232 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
233 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
234 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
235 * testsuite/30_threads/shared_lock/requirements/
236 explicit_instantiation.cc: Likewise.
237 * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Likewise.
238 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
239 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Likewise.
240 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
241 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
243 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
244 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
245 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
246 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
247 * testsuite/30_threads/shared_timed_mutex/cons/assign_neg.cc: Likewise.
248 * testsuite/30_threads/shared_timed_mutex/cons/copy_neg.cc: Likewise.
249 * testsuite/30_threads/shared_timed_mutex/requirements/
250 standard_layout.cc: Likewise.
251 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
252 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
253 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
254 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
255 * testsuite/30_threads/this_thread/1.cc: Likewise.
256 * testsuite/30_threads/this_thread/2.cc: Likewise.
257 * testsuite/30_threads/this_thread/3.cc: Likewise.
258 * testsuite/30_threads/this_thread/4.cc: Likewise.
259 * testsuite/30_threads/this_thread/58038.cc: Likewise.
260 * testsuite/30_threads/thread/70503.cc: Likewise.
261 * testsuite/30_threads/thread/84532.cc: Likewise.
262 * testsuite/30_threads/thread/adl.cc: Likewise.
263 * testsuite/30_threads/thread/cons/1.cc: Likewise.
264 * testsuite/30_threads/thread/cons/2.cc: Likewise.
265 * testsuite/30_threads/thread/cons/3.cc: Likewise.
266 * testsuite/30_threads/thread/cons/4.cc: Likewise.
267 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
268 * testsuite/30_threads/thread/cons/5.cc: Likewise.
269 * testsuite/30_threads/thread/cons/6.cc: Likewise.
270 * testsuite/30_threads/thread/cons/7.cc: Likewise.
271 * testsuite/30_threads/thread/cons/8.cc: Likewise.
272 * testsuite/30_threads/thread/cons/84535.cc: Likewise.
273 * testsuite/30_threads/thread/cons/9.cc: Likewise.
274 * testsuite/30_threads/thread/cons/assign_neg.cc: Likewise.
275 * testsuite/30_threads/thread/cons/copy_neg.cc: Likewise.
276 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
277 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
278 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
279 * testsuite/30_threads/thread/id/operators.cc: Likewise.
280 * testsuite/30_threads/thread/members/1.cc: Likewise.
281 * testsuite/30_threads/thread/members/2.cc: Likewise.
282 * testsuite/30_threads/thread/members/3.cc: Likewise.
283 * testsuite/30_threads/thread/members/4.cc: Likewise.
284 * testsuite/30_threads/thread/members/5.cc: Likewise.
285 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
287 * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
288 * testsuite/30_threads/thread/swap/1.cc: Likewise.
289 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
290 * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
291 * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
292 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
293 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
294 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
295 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
297 * testsuite/30_threads/timed_mutex/requirements/
298 standard_layout.cc: Likewise.
299 * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
300 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
301 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
302 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
303 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
304 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
305 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
306 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
307 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
308 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
309 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
310 * testsuite/30_threads/try_lock/1.cc: Likewise.
311 * testsuite/30_threads/try_lock/2.cc: Likewise.
312 * testsuite/30_threads/try_lock/3.cc: Likewise.
313 * testsuite/30_threads/try_lock/4.cc: Likewise.
314 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
315 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
316 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
317 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
318 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
319 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
320 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
321 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
322 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
323 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
324 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
325 * testsuite/30_threads/unique_lock/requirements/
326 explicit_instantiation.cc: Likewise.
327 * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
329 * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
331 * testsuite/30_threads/async/49668.cc: Likewise.
332 * testsuite/30_threads/async/54297.cc: Likewise.
333 * testsuite/30_threads/async/84532.cc: Likewise.
334 * testsuite/30_threads/async/any.cc: Likewise.
335 * testsuite/30_threads/async/async.cc: Likewise.
336 * testsuite/30_threads/async/except.cc: Likewise.
337 * testsuite/30_threads/async/forced_unwind.cc: Likewise.
338 * testsuite/30_threads/async/launch.cc: Likewise.
339 * testsuite/30_threads/async/lwg2021.cc: Likewise.
340 * testsuite/30_threads/async/sync.cc: Likewise.
341 * testsuite/30_threads/call_once/39909.cc: Likewise.
342 * testsuite/30_threads/call_once/49668.cc: Likewise.
343 * testsuite/30_threads/call_once/60497.cc: Likewise.
344 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
345 * testsuite/30_threads/call_once/constexpr.cc: Likewise.
346 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
347 * testsuite/30_threads/call_once/once_flag.cc: Likewise.
348 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
349 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
350 * testsuite/30_threads/condition_variable/cons/assign_neg.cc:
352 * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise.
353 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
354 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
355 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
356 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
357 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
358 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
360 * testsuite/30_threads/condition_variable/requirements/
361 standard_layout.cc: Likewise.
362 * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
364 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
365 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
366 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
367 * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
369 * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
371 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
372 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
373 * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
374 * testsuite/30_threads/future/cons/constexpr.cc: Likewise.
375 * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
376 * testsuite/30_threads/future/cons/default.cc: Likewise.
377 * testsuite/30_threads/future/cons/move.cc: Likewise.
378 * testsuite/30_threads/future/cons/move_assign.cc: Likewise.
379 * testsuite/30_threads/future/members/45133.cc: Likewise.
380 * testsuite/30_threads/future/members/get.cc: Likewise.
381 * testsuite/30_threads/future/members/get2.cc: Likewise.
382 * testsuite/30_threads/future/members/share.cc: Likewise.
383 * testsuite/30_threads/future/members/valid.cc: Likewise.
384 * testsuite/30_threads/future/members/wait.cc: Likewise.
385 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
386 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
387 * testsuite/30_threads/future/requirements/explicit_instantiation.cc:
389 * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
391 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
392 * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Likewise.
393 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
394 * testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
395 * testsuite/30_threads/lock/1.cc: Likewise.
396 * testsuite/30_threads/lock/2.cc: Likewise.
397 * testsuite/30_threads/lock/3.cc: Likewise.
398 * testsuite/30_threads/lock/4.cc: Likewise.
399 * testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
400 * testsuite/30_threads/lock_guard/requirements/
401 explicit_instantiation.cc: Likewise.
402 * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Likewise.
403 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
404 * testsuite/30_threads/mutex/cons/assign_neg.cc: Likewise.
405 * testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
406 * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
407 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
408 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
409 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
410 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
411 * testsuite/30_threads/mutex/requirements/standard_layout.cc::
413 * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
414 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
415 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
416 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
417 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
418 * testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
419 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
420 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
421 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
422 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
423 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
424 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
425 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
426 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
427 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
428 * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Likewise.
429 * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
430 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
431 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
432 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
434 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
435 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
436 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
437 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
438 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
439 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
440 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
441 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
442 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
443 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
444 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
445 * testsuite/30_threads/packaged_task/requirements/
446 explicit_instantiation.cc: Likewise.
447 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
448 * testsuite/30_threads/promise/60966.cc: Likewise.
449 * testsuite/30_threads/promise/69106.cc: Likewise.
450 * testsuite/30_threads/promise/cons/1.cc: Likewise.
451 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
452 * testsuite/30_threads/promise/cons/alloc2.cc: Likewise.
453 * testsuite/30_threads/promise/cons/alloc_min.cc: Likewise.
454 * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
455 * testsuite/30_threads/promise/cons/copy_neg.cc: Likewise.
456 * testsuite/30_threads/promise/cons/move.cc: Likewise.
457 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
458 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
459 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
460 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
461 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
462 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
463 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
464 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
465 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
466 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
467 * testsuite/30_threads/promise/members/swap.cc: Likewise.
468 * testsuite/30_threads/promise/requirements/explicit_instantiation.cc:
470 * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
472 * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
474 * testsuite/20_util/align/2.cc: Remove dg-require-cstdint directive.
475 * testsuite/20_util/duration/arithmetic/1.cc: Likewise.
476 * testsuite/20_util/duration/arithmetic/2.cc: Likewise.
477 * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
478 * testsuite/20_util/duration/arithmetic/dr934-1.cc: Likewise.
479 * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
480 * testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
481 * testsuite/20_util/duration/cons/1.cc: Likewise.
482 * testsuite/20_util/duration/cons/1_neg.cc: Likewise.
483 * testsuite/20_util/duration/cons/2.cc: Likewise.
484 * testsuite/20_util/duration/cons/54025.cc: Likewise.
485 * testsuite/20_util/duration/cons/dr974_neg.cc: Likewise.
486 * testsuite/20_util/duration/requirements/explicit_instantiation/
487 explicit_instantiation.cc: Likewise.
488 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
489 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
490 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
491 * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Likewise.
492 * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
493 * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
494 * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
495 * testsuite/20_util/ratio/cons/cons1.cc: Likewise.
496 * testsuite/20_util/ratio/operations/45866.cc: Likewise.
497 * testsuite/20_util/ratio/operations/47913.cc: Likewise.
498 * testsuite/20_util/ratio/operations/53840.cc: Likewise.
499 * testsuite/20_util/ratio/operations/ops1.cc: Likewise.
500 * testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
501 * testsuite/20_util/system_clock/1.cc: Likewise.
502 * testsuite/20_util/time_point/1.cc: Likewise.
503 * testsuite/20_util/time_point/2.cc: Likewise.
504 * testsuite/20_util/time_point/3.cc: Likewise.
505 * testsuite/20_util/time_point/requirements/explicit_instantiation/
506 explicit_instantiation.cc: Likewise.
507 * testsuite/21_strings/basic_string/requirements/
508 explicit_instantiation/char16_t/1.cc: Likewise.
509 * testsuite/21_strings/basic_string/requirements/
510 explicit_instantiation/char32_t/1.cc: Likewise.
511 * testsuite/21_strings/basic_string_view/requirements/
512 explicit_instantiation/char16_t/1.cc: Likewise.
513 * testsuite/21_strings/basic_string_view/requirements/
514 explicit_instantiation/char32_t/1.cc: Likewise.
515 * testsuite/21_strings/char_traits/requirements/
516 explicit_instantiation/char16_t/1.cc: Likewise.
517 * testsuite/21_strings/char_traits/requirements/
518 explicit_instantiation/char32_t/1.cc: Likewise.
519 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
520 * testsuite/22_locale/codecvt/char16_t.cc: Likewise.
521 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
522 * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
524 * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
526 * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
528 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
529 * testsuite/23_containers/vector/bool/72847.cc: Likewise.
530 * testsuite/23_containers/vector/debug/multithreaded_swap.cc:
532 * testsuite/experimental/string_view/requirements/
533 explicit_instantiation/char16_t/1.cc: Likewise.
534 * testsuite/experimental/string_view/requirements/
535 explicit_instantiation/char32_t/1.cc: Likewise.
536 * testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/
538 * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
541 * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
542 (random_condition, throw_value_random, throw_allocator_random)
543 (std::hash<throw_value_random>): Do not define when <tr1/random> is
545 * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
546 define transactional memory support when <stdint.h> is not usable.
548 * include/bits/hashtable_policy.h (__detail::__clp2): Use faster
549 implementation that doesn't depend on <stdint.h> types.
550 * include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
551 std::size_t when std::uintptr_t is not usable.
552 [!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
553 (undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
554 Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
556 * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
557 (hash<u16string>, hash<u32string>): Remove dependency on
558 _GLIBCXX_USE_C99_STDINT_TR1.
559 * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
560 (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
561 _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
562 __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
563 * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
564 (codecvt<char16_t, char, mbstate_t>)
565 (codecvt<char32_t, char, mbstate_t>)
566 (codecvt_byname<char16_t, char, mbstate_t>)
567 (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
568 on _GLIBCXX_USE_C99_STDINT_TR1.
569 * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
570 (_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
571 * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
572 (char_traits<char16_t>, char_traits<char32_t>)
573 (basic_string<char16_t>, basic_string<char32_t>): Remove dependency
574 on _GLIBCXX_USE_C99_STDINT_TR1.
575 * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
576 (u16string_view, u32string_view, hash<u16string_view>)
577 (hash<u32string_view>, operator""sv(const char16_t, size_t))
578 (operator""sv(const char32_t, size_t)): Likewise.
579 * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
580 (hash<__u16vstring>, hash<__u32vstring>): Likewise.
581 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
582 (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
583 (__u32sso_string, __u32rc_string): Likewise.
584 * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
585 (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
586 * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
587 (u16string_view, u32string_view, hash<u16string_view>)
588 (hash<u32string_view>, operator""sv(const char16_t, size_t))
589 (operator""sv(const char32_t, size_t)): Likewise.
590 * src/c++11/codecvt.cc: Likewise.
591 * src/c++98/locale_init.cc: Likewise.
592 * src/c++98/localename.cc: Likewise.
594 * include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
595 (__atomic_futex_unsigned_base): Remove dependency on
596 _GLIBCXX_USE_C99_STDINT_TR1 macro.
597 * include/bits/unique_lock.h [!_GLIBCXX_USE_C99_STDINT_TR1]
598 (unique_lock): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1.
599 * include/c_global/cstdint [!_GLIBCXX_USE_C99_STDINT_TR1] (intmax_t)
600 (uintmax_t): Define using predefined macros.
601 * include/std/chrono [!_GLIBCXX_USE_C99_STDINT_TR1] (duration)
602 (time_point, system_clock, high_resolution_clock, steady_clock): Remove
603 dependency on _GLIBCXX_USE_C99_STDINT_TR1 macro.
604 (nanoseconds, microseconds, milliseconds, seconds, minutes, hours):
605 [!_GLIBCXX_USE_C99_STDINT_TR1]: Define using __INT64_TYPE__ or
606 long long when <stdint.h> is not usable.
607 * include/std/condition_variable [!_GLIBCXX_USE_C99_STDINT_TR1]
608 (condition_variable, condition_variable_any): Remove dependency on
609 _GLIBCXX_USE_C99_STDINT_TR1.
610 * include/std/future [!_GLIBCXX_USE_C99_STDINT_TR1] (future, promise)
611 (packaged_task, async): Likewise.
612 * include/std/mutex [!_GLIBCXX_USE_C99_STDINT_TR1] (recursive_mutex)
613 (timed_mutex, recursive_timed_mutex, try_lock, lock, scoped_lock)
614 (once_flag, call_once): Likewise.
615 * include/std/ratio [!_GLIBCXX_USE_C99_STDINT_TR1] (ratio): Likewise.
616 * include/std/shared_mutex [!_GLIBCXX_USE_C99_STDINT_TR1]
617 (shared_mutex, shared_timed_mutex, shared_lock): Likewise.
618 * include/std/thread [!_GLIBCXX_USE_C99_STDINT_TR1] (thread)
619 (this_thread::get_id, this_thread::yield, this_thread::sleep_for)
620 (this_thread::sleep_until): Likewise.
621 * src/c++11/chrono.cc: Remove dependency on
622 _GLIBCXX_USE_C99_STDINT_TR1 macro.
623 * src/c++11/condition_variable.cc: Likewise.
624 * src/c++11/futex.cc: Likewise.
625 * src/c++11/future.cc: Likewise.
626 * src/c++11/mutex.cc: Likewise.
627 * src/c++11/thread.cc: Likewise.
628 * testsuite/20_util/duration/literals/range_neg.cc: Adjust dg-error.
629 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
630 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
631 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
632 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
633 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
635 2018-07-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
638 * testsuite/experimental/memory_resource/new_delete_resource.cc:
639 xfail execution on 32-bit Solaris/x86.
641 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
643 * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
644 (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
645 (vector::_M_move_assign): Reorder the swaps.
647 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
650 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
651 same alignment for post-release allocation.
653 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
656 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
657 buffer being misaligned and so returned pointer not being at start.
659 * include/experimental/memory_resource: Include <cstddef> header.
661 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
662 * src/Makefile.am: Add comment.
663 * src/c++17/Makefile.in: Regenerate.
665 * include/Makefile.am: Add new <bits/unique_lock.h> header.
666 * include/Makefile.in: Regenerate.
667 * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
668 (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
669 (unique_lock): Move definition to ...
670 * include/bits/unique_lock.h: New header.
671 [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
672 [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
673 (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
674 (unique_lock::try_lock_for): Define only when <chrono> is usable.
675 * include/std/condition_variable: Include <bits/unique_lock.h>.
676 * include/std/mutex: Likewise.
678 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
680 * config/abi/pre/gnu.ver: Export new symbols.
681 * configure: Regenerate.
682 * include/Makefile.am: Add new <memory_resource> header.
683 * include/Makefile.in: Regenerate.
684 * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
685 * include/std/memory_resource: New header.
686 (memory_resource, polymorphic_allocator, new_delete_resource)
687 (null_memory_resource, set_default_resource, get_default_resource)
688 (pool_options, monotonic_buffer_resource): Define.
689 * src/Makefile.am: Add c++17 directory.
690 * src/Makefile.in: Regenerate.
691 * src/c++11/Makefile.am: Fix comment.
692 * src/c++17/Makefile.am: Add makefile for new sub-directory.
693 * src/c++17/Makefile.in: Generate.
694 * src/c++17/memory_resource.cc: New.
695 (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
696 (default_res, new_delete_resource, null_memory_resource)
697 (set_default_resource, get_default_resource): Define.
698 * testsuite/20_util/memory_resource/1.cc: New test.
699 * testsuite/20_util/memory_resource/2.cc: New test.
700 * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
701 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
702 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
703 * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
704 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
706 * testsuite/20_util/polymorphic_allocator/1.cc: New test.
707 * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
708 * testsuite/20_util/polymorphic_allocator/select.cc: New test.
709 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
710 Define concrete memory resource for testing.
711 (__gnu_test::default_resource_mgr): Define RAII helper for changing
715 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
716 parameter by reference, to avoid copying invalid iterators.
717 * testsuite/25_algorithms/copy/86658.cc: New test.
719 * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
720 local variables for number of digits instead of type aliases.
721 (__log2p1): Remove redundant branch also checked in __countl_zero.
723 * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
724 conditions. Add comments.
725 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
726 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
727 * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
729 * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
730 (__uses_allocator_helper): Check conditions directly instead of
731 using __is_erased_or_convertible.
733 * include/experimental/memory_resource: Adjust comments and
735 (__resource_adaptor_imp): Add second template parameter for type of
736 memory resource base class.
737 (memory_resource): Define default constructor, destructor, copy
738 constructor and copy assignment operator as defaulted.
741 * include/experimental/memory_resource (__get_default_resource): Use
742 placement new to create an object with dynamic storage duration.
744 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
747 * include/experimental/memory_resource
748 (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
749 (__resource_adaptor_common::__guaranteed_alignment): New helper to
750 give maximum alignment an allocator guarantees. Specialize for known
751 allocators using new and malloc.
752 (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
753 (__resource_adaptor_imp::do_deallocate): Likewise.
754 * testsuite/experimental/memory_resource/new_delete_resource.cc:
755 Check that new and delete are called with expected sizes.
757 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
760 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
763 2018-07-20 Fangrui Song <maskray@google.com>
765 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
766 _GLIBCXX_VISIBILITY(default).
768 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
771 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
773 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
775 * include/std/type_traits (__is_member_object_pointer_helper): Use
776 __not_<is_function<_Tp>>::type instead of integral_constant.
777 (__is_member_function_pointer_helper): Likewise for
778 is_function<_Tp>::type.
779 (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
780 (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
781 (is_trivially_constructible): Remove redundant use of
783 (__is_trivially_copy_assignable_impl): Remove redundant use of
785 (__is_trivially_move_assignable_impl): Remove redundant use of
787 (is_trivially_destructible): Use __bool_constant.
788 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
789 tests for scalar types.
791 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
793 * include/bits/stl_algobase.h (__copy_move_a): Used
794 __is_trivially_copyable.
795 (__copy_move_backward_a): Likewise.
796 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
799 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
802 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
803 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
804 * configure: Regenerate.
805 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
806 * doc/Makefile.in: Regenerate.
807 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
808 * include/Makefile.in: Regenerate.
809 * libsupc++/Makefile.in: Regenerate.
810 * po/Makefile.in: Regenerate.
811 * python/Makefile.in: Regenerate.
812 * src/Makefile.in: Regenerate.
813 * src/c++11/Makefile.in: Regenerate.
814 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
815 from -Wabi=2 that don't affect exported symbols.
816 * src/c++98/Makefile.in: Regenerate.
817 * src/filesystem/Makefile.in: Regenerate.
818 * testsuite/Makefile.in: Regenerate.
820 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
821 (_Async_state_common::_M_join): Simplify use of std::call_once and
822 corresponding explicit instantiation.
823 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
824 (__bind_simple): Remove definitions and explicit instantiation that
825 are not required by exported symbols.
827 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
829 * scripts/create_testsuite_files: Fix typo in comment.
832 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
833 non-standard partial specialization.
834 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
835 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
836 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
838 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
840 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
841 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
842 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
844 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
846 * include/debug/functions.h (__gnu_debug::__check_string): Move...
847 * include/debug/string (__gnu_debug::__check_string): ... here.
848 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
849 (__glibcxx_check_string_n_constructor): New.
850 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
852 (__glibcxx_check_string_constructor): New.
853 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
855 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
856 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
858 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
860 PR libstdc++/84928 use std::move in <numeric> algorithms
861 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
862 conditionally move, according to __cplusplus value.
863 (accumulate, inner_product, partial_sum, adjacent_difference): Use
865 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
866 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
867 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
868 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
870 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
872 P0935R0 Eradicating unnecessarily explicit default constructors
873 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
874 default constructor symbols.
875 * include/std/sstream (basic_stringbuf, basic_istringstream)
876 (basic_ostringstream, basic_stringstream): Remove default arguments
877 from explicit constructors taking ios_base::openmode and add separate
878 non-explicit default constructors.
879 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
880 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
881 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
882 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
883 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
885 * include/std/variant (__accepted_index): Use void_t.
887 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
890 * config/abi/pre/gnu.ver: Export move constructors and move
891 assignment operators for std::logic_error and std::runtime_error.
892 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
893 _GLIBCXX_USE_NOEXCEPT.
894 (logic_error, runtime_error): Declare move constructors and move
895 assignment operators. When not declared already, define copy
896 constructors and copy assignment operators as explicit-defaulted.
897 (domain_error, invalid_argument, length_error, out_of_range)
898 (overflow_error, underflow_error): Define move constructors and move
899 assignment operators as explicitly-defaulted.
900 * libsupc++/exception.h (exception): Likewise.
901 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
902 move constructors and move assignment operators as defaulted.
903 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
904 assignment operators are defined.
906 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
908 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
910 * testsuite/21_strings/basic_string/requirements/
911 explicit_instantiation/debug.cc: Likewise.
914 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
915 (basic_string::assign(basic_string&&)): Add conditional noexcept
916 depending on the allocator's is_always_equal property (LWG 2063).
917 * testsuite/21_strings/basic_string/modifiers/assign/char/
918 move_assign.cc: Check for non-throwing exception specification.
919 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
920 move_assign.cc: Likewise.
923 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
924 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
925 Add GLIBCXX_NOEXCEPT.
926 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
927 to depend on the allocator's is_always_equal property (LWG 2063).
928 (basic_string::swap(basic_string&)): Likewise.
929 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
930 (basic_string::swap(basic_string&)): Likewise.
931 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
932 Check is_nothrow_move_assignable.
933 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
934 Check is_nothrow_move_assignable.
935 * testsuite/21_strings/basic_string/cons/char/
936 noexcept_move_construct.cc: Likewise.
937 * testsuite/21_strings/basic_string/cons/wchar_t/
938 noexcept_move_construct.cc: Likewise.
940 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
942 P0646R1 Improving the Return Value of Erase-Like Algorithms I
943 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
945 (forward_list::__remove_return_type): Define typedef as size_type or
946 void, according to __cplusplus value.
947 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
948 empty, according to __cplusplus value.
949 (forward_list::remove, forward_list::unique): Use typedef and macro
950 to change return type and add abi-tag for C++2a.
951 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
952 typedef to change return type for C++2a.
953 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
954 (forward_list::remove, forward_list::remove_if<Pred>)
955 (forward_list::unique<BinPred>): Return number of removed elements
957 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
958 (list::remove, list::unique, list::remove_if<Predicate>)
959 (list::unique<BinaryPredicate>): Return number of removed elements
961 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
962 (list::__remove_return_type): Define typedef as size_type or
963 void, according to __cplusplus value.
964 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
965 empty, according to __cplusplus value.
966 (list::remove, list::unique): Use typedef and macro to change return
967 type and add abi-tag for C++2a.
968 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
969 typedef to change return type for C++2a.
970 * include/std/version (__cpp_lib_list_remove_return_type): Define.
971 * testsuite/23_containers/forward_list/operations/
972 remove_cxx20_return.cc: New.
973 * testsuite/23_containers/forward_list/operations/
974 unique_cxx20_return.cc: New.
976 P0458R2 Checking for Existence of an Element in Associative Containers
977 * include/bits/stl_map.h (map::contains): Add for C++2a.
978 * include/bits/stl_multimap.h (multimap::contains): Likewise.
979 * include/bits/stl_multiset.h (multiset::contains): Likewise.
980 * include/bits/stl_set.h (set::contains): Likewise.
981 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
982 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
983 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
984 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
985 * include/bits/unordered_map.h (unordered_map::contains)
986 (unordered_multimap::contains): Add for C++2a.
987 * include/bits/unordered_set.h (unordered_set::contains)
988 (unordered_multiset::contains): Likewise.
989 * testsuite/23_containers/map/operations/contains.cc: New.
990 * testsuite/23_containers/multimap/operations/contains.cc: New.
991 * testsuite/23_containers/multiset/operations/contains.cc: New.
992 * testsuite/23_containers/set/operations/contains.cc: New.
993 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
994 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
996 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
998 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
1000 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
1003 * include/debug/string
1004 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
1005 Use __glibcxx_check_insert_range.
1006 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
1007 __gnu_debug::string when _GLIBCXX_DEBUG.
1008 * 21_strings/basic_string/init-list.cc: Likewise.
1009 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
1010 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
1011 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
1012 * 21_strings/basic_string/types/1.cc: Likewise.
1014 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1016 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
1017 target for std::random_device.
1018 * testsuite/26_numerics/random/random_device/cons/default.cc:
1020 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
1021 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
1022 * testsuite/experimental/random/randint.cc: Likewise.
1023 * testsuite/lib/libstdc++.exp
1024 (check_effective_target_random_device): New proc.
1026 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1027 Jakub Jelinek <jakub@redhat.com>
1029 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
1031 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1034 * include/std/type_traits (is_trivially_constructible): Check
1035 is_constructible before __is_trivially_constructible.
1036 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
1037 tests, including negative cases.
1038 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
1039 zero for dg-error lineno.
1040 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
1043 * include/std/bit (__rotl, __rotr): Avoid branch.
1044 (_If_is_unsigned_integer): Use remove_cv_t.
1045 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
1047 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
1049 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
1050 * include/Makefile.am: Add new header.
1051 * include/Makefile.in: Regenerate.
1052 * include/precompiled/stdc++.h: Include new header.
1053 * include/std/bit: New header.
1054 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
1055 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
1057 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
1058 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
1059 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
1060 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
1062 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
1063 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
1064 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
1065 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
1066 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
1067 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
1068 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
1069 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
1070 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
1071 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
1073 * include/bits/alloc_traits.h: Remove redundant preprocessor
1076 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
1078 * include/bits/stl_algobase.h (__niter_wrap): New.
1079 (__copy_move_a2(_II, _II, _OI)): Use latter.
1080 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
1081 (fill_n(_OI, _Size, const _Tp&)): Likewise.
1082 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
1083 * include/debug/stl_iterator.h
1084 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
1085 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
1086 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
1087 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
1089 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
1091 P0758R1 Implicit conversion traits
1092 * include/std/type_traits [__cplusplus > 201703]
1093 (__is_convertible_helper::__is_nothrow_type): Define new member.
1094 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
1096 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
1097 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
1099 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
1100 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
1101 * testsuite/20_util/is_nothrow_convertible/requirements/
1102 explicit_instantiation.cc: New.
1103 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
1106 P0887R1 The identity metafunction
1107 * include/std/type_traits (type_identity, type_identity_t): Define
1109 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
1110 * testsuite/20_util/type_identity/requirements/
1111 explicit_instantiation.cc:New.
1112 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
1114 * include/bits/regex.h (sub_match::operator string_type): Call str().
1115 (sub_match::compare): Use _M_str() instead of str().
1116 (sub_match::_M_compare): New public function.
1117 (sub_match::__string_view): New helper type.
1118 (sub_match::_M_str): New overloaded functions to avoid creating a
1119 string_type object when not needed.
1120 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1121 Use sub_match::_M_compare instead of creating string_type objects.
1122 Fix Doxygen comments.
1123 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
1124 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
1126 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
1128 * include/std/type_traits (__enable_if_t): Define for C++11.
1129 * testsuite/28_regex/sub_match/compare.cc: New.
1130 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
1132 (input_iterator_wrapper): Use remove_cv for value_type argument of
1133 std::iterator base class.
1135 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
1137 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
1138 Add whitespace to dejagnu directive.
1139 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
1141 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
1143 * include/bits/stl_vector.h
1144 (struct _Vector_base<>::_Vector_impl_data): New.
1145 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
1146 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
1147 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
1148 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
1149 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
1150 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
1151 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
1152 (_Vector_base()): Default.
1153 (_Vector_base(_Vector_base&&)): Default.
1154 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
1155 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
1156 (_Vector_base::_M_create_storage(size_t)): Make protected.
1157 (vector()): Default.
1158 (vector(vector&&)): Default.
1159 (vector(vector&&, const allocator_type&, true_type)): New.
1160 (vector(vector&&, const allocator_type&, false_type)): New.
1161 (vector(vector&&, const allocator_type&)): Use latters.
1162 (vector(_InputIte, _InputIte, const allocator_type&)): Call
1163 _M_range_initialize directly.
1164 * include/debug/vector
1165 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
1166 * testsuite/23_containers/vector/allocator/default_init.cc: New.
1167 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
1170 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
1172 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
1173 (__is_byte<byte>): Define specialization for std::byte.
1176 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
1177 Declare explicit instantiations of COW empty reps and I/O functions.
1179 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
1181 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
1183 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
1185 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
1187 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
1190 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
1193 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1194 Replace dict comprehension.
1197 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1200 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
1201 Add try-catch block.
1202 * testsuite/23_containers/vector/cons/86292.cc: New.
1204 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
1206 * include/experimental/algorithm (sample, shuffle): Add new overloads
1207 using per-thread random number engine.
1208 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
1209 dependencies by using __gnu_test::test_container.
1210 * testsuite/experimental/algorithm/sample-2.cc: New.
1211 * testsuite/experimental/algorithm/shuffle.cc: New.
1213 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
1215 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
1216 different size_t mangling on 32-bit targets.
1219 * include/experimental/memory_resource
1220 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
1221 enough for result of left shift.
1224 * include/bits/basic_string.tcc:
1225 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
1226 (basic_string<char>::_Rep::_S_empty_rep_storage)
1227 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
1228 instantiation declarations.
1229 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
1230 explicit instantiation declarations.
1231 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
1232 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
1234 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
1237 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
1238 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
1239 * configure: Regenerate.
1240 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
1241 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
1242 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
1243 (basic_string::insert(iterator, initializer_list<C>)): Suppress
1245 * include/debug/string (basic_string::insert(iterator, C)): Change
1246 first parameter to const_iterator.
1247 (basic_string::insert(iterator, size_type, C)): Likewise. Change
1248 return type to iterator.
1249 (basic_string::insert(iterator, InputIterator, InputIterator)):
1251 (basic_string::insert(iterator, initializer_list<C>)): Change first
1252 parameter to const_iterator and return type to iterator.
1253 * src/c++11/string-inst.cc: Extend comment.
1254 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
1256 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
1258 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1260 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1263 * include/experimental/memory_resource
1264 (__resource_adaptor_imp::do_deallocate): Add missing return.
1265 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
1266 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
1267 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
1268 __gnu_cxx::malloc_allocator.
1271 * include/experimental/memory_resource (__resource_adaptor_common):
1273 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
1274 pointer from unaligned, and vice versa.
1275 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
1276 allocated pointer to meet alignment request.
1277 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
1278 original pointer for deallocation.
1279 (__resource_adaptor_imp::do_is_equal): Reformat.
1280 (__resource_adaptor_imp::_S_aligned_size): Remove.
1281 (__resource_adaptor_imp::_S_supported): Remove.
1282 (new_delete_resource): Use __gnu_cxx::new_allocator.
1283 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
1284 extended alignments and use debug_allocator to check for matching
1285 allocate/deallocate pairs.
1287 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
1289 * include/debug/safe_iterator.h
1290 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
1291 Compare __x base iterator with a value-initialized iterator of the
1294 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
1297 * include/experimental/memory_resource (__resource_adaptor_imp): Add
1298 static assertions to enforce requirements on pointer types.
1299 (__resource_adaptor_imp::get_allocator()): Add noexcept.
1300 (new_delete_resource, null_memory_resource): Return address of an
1301 object with dynamic storage duration.
1302 (__null_memory_resource): Remove.
1303 * testsuite/experimental/memory_resource/70966.cc: New.
1305 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
1306 missed from recent commit.
1308 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
1310 * include/std/utility: Remove unused <exception> header.
1312 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
1314 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
1315 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
1316 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
1317 a specialization of std::pair.
1318 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
1319 pair elements are constructed correctly.
1321 LWG 2989 hide path iostream operators from normal lookup
1322 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
1324 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
1326 LWG 3050 Fix cv-qualification of convertibility constraints
1327 * include/std/chrono (duration, operator*, operator/, operator%): Use
1328 const-qualified type as source type in is_convertible constraints.
1329 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
1330 * testsuite/20_util/duration/cons/dr3050.cc: New.
1331 * testsuite/20_util/duration/literals/range.cc: Rename to...
1332 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
1335 2018-06-18 Maya Rashish <coypu@sdf.org>
1337 * crossconfig.m4: Handle OpenBSD just like NetBSD.
1338 * configure: Rebuilt.
1340 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
1342 P0754R2 <version> header
1343 * include/Makefile.am: Add new header.
1344 * include/Makefile.in: Regenerate.
1345 * include/bits/c++config: Change doxygen comment to suggest <version>
1346 instead of <iosfwd>.
1347 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
1348 unconditionally. Add C++17 and C++20 headers.
1349 * include/std/version: New header.
1350 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
1351 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
1352 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
1353 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
1354 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
1355 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
1356 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
1358 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
1359 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
1360 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
1361 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
1362 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
1363 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
1364 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
1366 * testsuite/18_support/headers/version/macros.cc: New.
1367 * testsuite/18_support/headers/version/macros.cc: New.
1369 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
1370 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
1372 * config.h.in: Regenerate.
1373 * configure: Regenerate.
1374 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
1376 LWG 3035. std::allocator's constructors should be constexpr
1377 * include/bits/allocator.h (allocator): Add constexpr to constructors
1378 for C++2a. Replace dynamic exception specifications with NOTHROW
1380 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
1382 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
1383 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
1384 to constructors for C++2a.
1385 * include/ext/new_allocator.h (new_allocator): Likewise.
1387 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
1389 LWG 3076 basic_string CTAD ambiguity
1390 * doc/xml/manual/intro.xml: Document LWG 3076 change.
1391 * include/bits/basic_string.h
1392 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
1393 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
1394 template constrained by _RequireAllocator.
1395 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
1396 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
1398 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
1400 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1403 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
1406 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1407 (basic_string::data()): Unshare string.
1408 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
1411 * include/std/string_view (basic_string_view(const CharT*)): Remove
1412 check for null pointer and add nonnull attribute.
1413 (compare(const CharT*), compare(size_type, size_type, const CharT*))
1414 (find(const CharT*, size_type), rfind(const CharT*, size_type))
1415 (find_first_of(const CharT*, size_type))
1416 (find_last_of(const CharT*, size_type))
1417 (find_first_not_of(const CharT*, size_type))
1418 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
1419 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
1420 * testsuite/21_strings/basic_string_view/operations/compare/char/
1422 * testsuite/21_strings/basic_string_view/operations/find/char/
1424 * testsuite/21_strings/basic_string_view/operations/rfind/char/
1428 * include/bits/random.h (random_device(const string&)): Remove
1431 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
1432 define for C++17 and above.
1434 LWG 2993 reference_wrapper<T> conversion from T&&
1435 * doc/xml/manual/intro.xml: Document LWG 2993 change.
1436 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
1437 (reference_wrapper(_Tp&&)): Remove.
1438 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
1440 (reference_wrapper): Add deduction guide.
1441 * testsuite/20_util/reference_wrapper/deduction.cc: New.
1442 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
1444 LWG 3039 Unnecessary decay in thread and packaged_task
1445 * include/std/future (__constrain_pkgdtask): Replace with ...
1446 (packaged_task::__not_same): New alias template, using
1447 __remove_cvref_t instead of decay.
1448 * include/std/thread (thread::__not_same): Add comment.
1450 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
1452 LWG 3075 basic_string needs deduction guides from basic_string_view
1453 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
1454 deduction from string views.
1455 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1458 LWG 3074 make scalar types non-deduced in valarray non-member functions
1459 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
1460 scalar parameters to be a non-deduced context.
1461 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
1463 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
1464 * testsuite/26_numerics/valarray/transcend.cc: New.
1466 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
1467 Move back to <utility>.
1468 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
1471 P0935R0 Eradicating unnecessarily explicit default constructors
1472 * include/backward/strstream (strstreambuf): Add non-explicit default
1474 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
1476 * include/bits/regex.h (match_results): Likewise.
1477 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
1478 default constructor.
1479 * testsuite/22_locale/conversions/string/1.cc: Likewise.
1480 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
1481 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
1483 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
1484 macro from <utility> and change type to long.
1485 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
1486 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
1489 P0935R0 Eradicating unnecessarily explicit default constructors
1490 * include/bits/random.h (uniform_real_distribution::param_type)
1491 (normal_distribution::param_type, lognormal_distribution::param_type)
1492 (gamma_distribution::param_type, chi_squared_distribution::param_type)
1493 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
1494 (student_t_distribution::param_type)
1495 (bernoulli_distribution::param_type)
1496 (binomial_distribution::param_type)
1497 (geometric_distribution::param_type)
1498 (negative_binomial_distribution::param_type)
1499 (poisson_distribution::param_type)
1500 (exponential_distribution::param_type)
1501 (weibull_distribution::param_type)
1502 (extreme_value_distribution::param_type): Add non-explicit default
1503 constructors. Remove default argument for first parameter of explicit
1505 * include/bits/uniform_int_dist.h
1506 (uniform_int_distribution::param_type): Likewise.
1507 * include/ext/random
1508 (beta_distribution::param_type, rice_distribution::param_type)
1509 (nakagami_distribution::param_type, pareto_distribution::param_type)
1510 (k_distribution::param_type, arcsine_distribution::param_type)
1511 (hoyt_distribution::param_type, triangular_distribution::param_type)
1512 (von_mises_distribution::param_type)
1513 (hypergeometric_distribution::param_type)
1514 (logistic_distribution::param_type)
1515 (uniform_inside_sphere_distribution::param_type): Likewise.
1516 (uniform_on_sphere_distribution::param_type): Make default constructor
1518 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
1519 Test param_type for non-explicit default constructor.
1520 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
1522 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
1524 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
1526 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
1528 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
1530 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
1532 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
1534 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
1536 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
1538 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
1540 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
1542 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
1544 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
1546 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
1548 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
1550 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
1552 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
1554 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
1556 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
1558 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
1559 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
1560 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
1561 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
1563 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
1564 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
1565 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
1566 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
1568 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
1569 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
1570 * testsuite/ext/random/triangular_distribution/cons/default.cc:
1572 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
1574 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
1576 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
1579 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
1580 Jonathan Wakely <jwakely@redhat.com>
1583 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
1584 Default-construct new elements before moving existing ones.
1585 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
1588 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
1591 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
1593 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
1594 Use node allocator to create and destroy elements.
1595 (forward_list::_Tp_alloc_type): Remove unused typedef.
1596 (forward_list::_Alloc_traits): Use allocator_traits instead of
1597 __gnu_cxx::__alloc_traits.
1599 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
1601 * include/debug/helper_functions.h
1602 (__gnu_debug::_Safe_iterator<>): Add declaration.
1603 (__can_advance(_Ite, _Size)): New.
1604 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
1605 * include/debug/functions.h
1606 (__gnu_debug::_Safe_iterator<>): Remove declaration.
1607 * include/debug/stl_iterator.h
1608 (__can_advance(const _Safe_iterator<>&)): New definition.
1609 * include/debug/stl_iterator.h
1610 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
1611 (__can_advance(const std::move_iterator<>&, _Size)): New.
1612 * include/debug/macros.h (__glibcxx_check_can_increment): New.
1613 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
1614 * include/bits/stl_algobase.h (fill_n): Use latter.
1615 * testsuite/25_algorithms/fill_n/2.cc: New.
1616 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
1617 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
1618 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
1619 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
1621 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
1622 (__glibcxx_requires_can_decrement_range): New.
1624 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
1626 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
1627 (__glibcxx_check_can_decrement_range): New.
1628 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
1629 __glibcxx_requires_can_increment_range.
1630 (std::move(_II, _II, _OI)): Likewise.
1631 (std::copy_backward(_BI, _BI, _BI2)): Use
1632 __glibcxx_requires_can_decrement_range.
1633 (std::move_backward(_BI, _BI, _BI2)): Likewise.
1634 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
1635 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
1636 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
1637 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
1638 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
1639 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
1641 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
1643 P0935R0 Eradicating unnecessarily explicit default constructors
1644 * include/bits/random.h (linear_congruential_engine)
1645 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
1646 (uniform_real_distribution, normal_distribution)
1647 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
1648 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
1649 (bernoulli_distribution, binomial_distribution,geometric_distribution)
1650 (negative_binomial_distribution, exponential_distribution)
1651 (weibull_distribution, extreme_value_distribution): Add non-explicit
1652 default constructors. Remove default argument for first parameter of
1653 explicit constructors.
1654 (piecewise_constant_distribution, piecewise_linear_distribution):
1655 Make default constructor non-explicit.
1656 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
1657 non-explicit default constructors. Remove default argument for first
1658 parameter of explicit constructor.
1659 * include/ext/random
1660 (simd_fast_mersenne_twister_engine, beta_distribution)
1661 (rice_distribution, nakagami_distribution, pareto_distribution)
1662 (k_distribution, arcsine_distribution, hoyt_distribution)
1663 (triangular_distribution, von_mises_distribution)
1664 (hypergeometric_distribution, logistic_distribution)
1665 (uniform_inside_sphere_distribution): Likewise.
1666 (uniform_on_sphere_distribution): Make default constructor
1668 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
1669 Test for non-explicit default constructor. Fix references to standard.
1670 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
1672 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
1674 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
1676 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
1678 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
1680 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
1682 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
1684 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
1686 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
1688 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
1690 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
1692 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
1694 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
1696 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
1698 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
1700 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
1702 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
1704 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
1706 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
1708 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
1709 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
1710 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
1711 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
1713 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
1714 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
1715 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
1716 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
1718 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
1719 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
1720 * testsuite/ext/random/triangular_distribution/cons/default.cc:
1722 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
1724 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
1726 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
1728 * testsuite/util/testsuite_common_types.h
1729 (implicitly_default_constructible): New helper.
1731 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
1733 * include/bits/ios_base.h (ios::Init::Init(const Init&))
1734 (ios::Init::operator=): Define as defaulted.
1735 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
1737 * include/bits/stream_iterator.h (istream_iterator::operator=)
1738 (ostream_iterator::operator=): Likewise.
1739 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
1741 * include/std/bitset (bitset::reference::reference(const reference&)):
1743 * include/std/complex (complex<float>::complex(const complex&))
1744 (complex<double>::complex(const complex&))
1745 (complex<long double>::complex(const complex&)): Likewise.
1747 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
1749 * include/bits/regex.h (sub_match): Add noexcept to default
1750 constructor and length observer.
1751 (match_results): Add noexcept to default constructor and observers
1752 with no preconditions. Define destructor as defaulted.
1753 (operator==, operator!=, swap): Add noexcept.
1754 (regex_iterator): Add default member initializers and define default
1755 constructor and destructor as defaulted. Add noexcept to equality
1756 and dereference operators.
1758 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
1760 * src/c++11/debug.cc
1761 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
1762 (_Safe_iterator_base::_M_detach_single()): Likewise.
1763 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
1764 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
1766 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
1768 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
1769 move of const value.
1771 2018-06-06 Jakub Jelinek <jakub@redhat.com>
1774 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
1775 rather than __cpp_transactional_memory >= 201505L.
1777 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
1780 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
1781 Define new partial specialization.
1782 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
1784 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
1785 value not reference for iteration.
1786 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
1788 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
1789 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
1792 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
1794 * include/std/type_traits: Fix comment typos.
1796 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
1798 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1799 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1802 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
1804 * include/bits/stl_tempbuf.h
1805 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
1806 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
1807 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
1808 * include/bits/stl_algo.h (__stable_partition): Adapt.
1809 (__inplace_merge): Adapt.
1810 (__stable_sort): Adapt.
1812 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
1815 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
1816 unconditionally. Remove redundant declaration.
1817 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
1818 alignment-specifier.
1820 * include/bits/postypes.h (fpos): Define special members as defaulted.
1823 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
1824 the static variable correctly.
1826 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
1828 PR libstdc++/78870 support std::filesystem on Windows
1829 * config.h.in: Regenerate.
1830 * configure: Regenerate.
1831 * configure.ac: Check for link, readlink and symlink.
1832 * include/bits/fs_path.h (path::operator/=(const path&)): Move
1833 definition out of class body.
1834 (path::is_absolute(), path::_M_append(path)): Likewise.
1835 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
1836 (operator>>(basic_istream, path&)): Likewise.
1837 (u8path): Reorder definitions and fix Windows implementation.
1838 (path::is_absolute()): Define inline and fix for Windows.
1839 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1840 Define POSIX version inline.
1841 (path::_M_append(path)): Define inline.
1842 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
1843 definition out of class body.
1844 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
1846 (operator>>(basic_istream, path&)): Likewise.
1847 (path::is_absolute()): Define inline and fix for Windows.
1848 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
1849 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
1850 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
1851 Define as adaptors for Windows functions/types or as
1852 using-declarations for POSIX functions/types.
1853 (_Dir_base, get_file_type): Qualify names to use declarations from
1854 __gnu_posix namespace.
1855 (_Dir_base::is_dor_or_dotdot): New helper functions.
1856 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
1857 names to use declarations from __gnu_posix namespace.
1858 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
1859 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
1860 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
1861 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
1862 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
1863 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
1864 Define as adaptors for Windows functions/types or as
1865 using-declarations for POSIX functions/types.
1866 (stat_type, do_copy_file): Qualify names to use declarations from
1867 __gnu_posix namespace.
1868 (do_space): Declare new function.
1869 (make_file_type): Only use S_ISLNK if defined.
1870 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
1871 path::value_type not char.
1872 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1873 names to use declarations from __gnu_posix namespace.
1874 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1875 add implementation for Windows.
1876 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1877 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1878 [!_PC_PATH_MAX]: Don't use pathconf.
1879 [PATH_MAX]: Use if defined.
1880 (filesystem::current_path(const path&, error_code&))
1881 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1882 (filesystem::last_write_time, filesystem::permissions): Use names
1884 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1885 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1886 implementation for Windows.
1887 (filesystem::rename, filesystem::resize_file): Use names from
1889 (filesystem::space): Use do_space.
1890 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
1891 (filesystem::status, filesystem::symlink_status): Use names from
1893 (filesystem::temp_directory_path): Add implementation for Windows.
1894 * src/filesystem/path.cc (dot): Define constant.
1895 (path::replace_extension): Use dot.
1896 (path::_M_find_extension): Likewise. Use path::string_type not
1898 (path::_M_split_cmpts): Use dot.
1899 (filesystem_error::_M_get_what): Use u8string() not native().
1900 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
1901 Qualify names to use declarations from __gnu_posix namespace.
1902 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
1904 (filesystem::absolute(const path&, error_code&)): Add implementation
1906 (char_ptr, filesystem::canonical): Use path::value_type not char.
1907 (do_copy_file): Use names from __gnu_posix.
1908 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
1910 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1911 names to use declarations from __gnu_posix namespace.
1912 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1913 add implementation for Windows.
1914 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1915 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1916 [!_PC_PATH_MAX]: Don't use pathconf.
1917 [PATH_MAX]: Use if defined.
1918 (filesystem::current_path(const path&, error_code&))
1919 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1920 (filesystem::last_write_time, filesystem::permissions): Use names
1922 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1923 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1924 implementation for Windows.
1925 (filesystem::rename, filesystem::resize_file): Use names from
1928 (filesystem::space): Use do_space.
1929 (filesystem::status, filesystem::symlink_status): Use names from
1931 (filesystem::temp_directory_path): Add implementation for Windows.
1932 * src/filesystem/std-path.cc
1933 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1935 (dot): Define constant.
1936 (path::replace_extension, is_dot): Use dot.
1937 (path::lexically_normal): Check _M_type instead of calling
1938 non-existent function.
1939 (path::_M_find_extension): Use dot. Use path::string_type not
1941 (path::_M_split_cmpts): Use dot.
1942 (filesystem_error::_M_get_what): Use u8string() not native().
1943 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
1945 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1947 * testsuite/27_io/filesystem/operations/absolute.cc: Use
1948 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
1949 * testsuite/27_io/filesystem/operations/canonical.cc: Use
1950 path::string() to get narrow string, not path::native().
1951 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
1952 with std::filesystem::path not std::basic_string.
1953 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1954 * testsuite/27_io/filesystem/operations/exists.cc: Use
1955 __gnu_test::root_path() instead of "/".
1956 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
1957 fstreams with std::filesystem::path not std::basic_string.
1958 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
1959 path::string() to get narrow string.
1960 * testsuite/27_io/filesystem/operations/space.cc: Check results for
1961 errors, expect sensible values otherwise.
1962 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
1963 helpers for adjusting the environment on Windows.
1964 * testsuite/27_io/filesystem/path/append/path.cc: Test
1965 Windows-specific behaviour.
1966 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
1967 of path::string_type objects.
1968 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
1969 string to wide string on Windows.
1970 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
1971 for backslash as root-directory.
1972 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
1973 path::string() to get narrow string.
1974 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
1976 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
1978 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
1979 different definintion of absolute paths on Windows.
1980 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1981 Do not use symlinks.
1982 * testsuite/experimental/filesystem/operations/absolute.cc: Test
1984 * testsuite/experimental/filesystem/operations/copy.cc: Construct
1985 fstreams with NTCTS not std::basic_string.
1986 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1987 * testsuite/experimental/filesystem/operations/exists.cc: Use
1988 __gnu_test::root_path() instead of "/".
1989 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
1990 fstreams with NTCTS not std::basic_string.
1991 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1992 Use path::string() to get narrow string.
1993 * testsuite/experimental/filesystem/operations/space.cc: Use
1994 __gnu_test::root_path() instead of "/".
1995 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1996 Add helpers for adjusting the environment on Windows.
1997 * testsuite/experimental/filesystem/path/append/path.cc: Use
1998 path::string() to get narrow strings for comparisons.
1999 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
2000 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2002 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2003 * testsuite/experimental/filesystem/path/native/string.cc: Use
2004 string_type not std::string.
2005 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
2006 Adjust for different definintion of absolute paths on Windows.
2007 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
2009 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
2012 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
2015 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
2016 uint_least16_t and uint_least32_t.
2017 (__make_unsigned<wchar_t>): Define unconditionally.
2018 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
2020 (__make_unsigned_selector_base): New type to provide helper templates.
2021 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
2022 __make_unsigned_selector_base helpers.
2023 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
2024 (__make_signed_selector<_Tp, true, false>): Remove intermediate
2026 (__make_signed<wchar_t>, __make_signed<char16_t>)
2027 (__make_signed<char32_t>)): Define unconditionally.
2028 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
2029 wchar_t, char16_t and char32_t are transformed correctly.
2030 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
2032 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
2033 wchar_t, char16_t and char32_t are transformed correctly.
2034 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
2037 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
2039 * include/std/variant (__erased_dtor): Qualify call to __get.
2041 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
2043 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
2044 (_Rb_tree(const allocator_type&)): Use latter.
2045 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
2046 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
2047 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
2048 * include/bits/stl_multimap.h
2049 (multimap(const allocator_type&)): Likewise.
2050 (multimap(initializer_list<value_type>, const allocator_type&)):
2052 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
2054 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
2055 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
2056 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
2057 * include/bits/stl_multiset.h
2058 (multiset(const allocator_type&)): Likewise.
2059 (multiset(initializer_list<value_type>, const allocator_type&)):
2061 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
2064 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
2067 * src/c++11/debug.cc: Remove backtrace usage.
2069 2018-05-24 Maya Rashish <coypu@sdf.org>
2072 * crossconfig.m4: Test for aligned_alloc on netbsd.
2073 * configure: Regenerate.
2075 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
2079 * include/bits/atomic_base.h (__atomic_base::value_type)
2080 (__atomic_base::difference_type): Add new typedefs.
2081 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
2082 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
2083 (atomic<T*>::operator++, atomic<T*>::operator--)
2084 (atomic<T*>::operator+=, atomic<T*>::operator-=)
2085 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
2086 to enforce C++17 requirement on pointer arithmetic.
2087 (__atomic_val_t, __atomic_diff_t): New alias templates.
2088 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
2089 (atomic_compare_exchange_weak_explicit)
2090 (atomic_compare_exchange_strong_explicit, atomic_store)
2091 (atomic_exchange, atomic_compare_exchange_weak)
2092 (atomic_compare_exchange_strong): Use __atomic_val_t to make
2093 scalar parameters be non-deduced contexts.
2094 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
2095 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
2096 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
2098 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
2099 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
2100 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
2101 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
2102 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
2104 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
2105 * testsuite/29_atomics/atomic/69769.cc: New test.
2106 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
2107 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
2108 Disable test for C++17 and later.
2109 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
2110 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
2111 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
2114 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
2116 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
2117 template to alias template.
2118 (path::__value_type_is_char): Use remove_const_t.
2119 (path:_S_string_from_iter): New helper function.
2120 (path::_S_convert(InputIter, __null_terminated))
2121 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
2122 Use _S_string_from_iter.
2123 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
2124 rep for COW strings.
2125 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2126 Change from class template to alias template.
2127 (path::__value_type_is_char): Use remove_const.
2128 (path:_S_string_from_iter): New helper function.
2129 (path::_S_convert(InputIter, __null_terminated))
2130 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
2131 Use _S_string_from_iter.
2132 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
2134 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
2135 string equality, not path equivalence.
2136 * testsuite/27_io/filesystem/path/construct/format.cc: Check
2137 construction from std::string and std::wstring and input iterators.
2138 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
2139 construction from iterators.
2140 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
2141 exact string equality, not path equivalence.
2142 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
2143 construction from iterators.
2145 * include/bits/fs_path.h (path::_M_type): Change default member
2146 initializer to _Filename.
2147 (path::begin): Create past-the-end iterator for empty path.
2148 * src/filesystem/std-path.cc (path::remove_filename()): Remove
2150 (path::has_relative_path()): Return false for empty filenames.
2151 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
2152 Fix offset of empty final component.
2153 * testsuite/27_io/filesystem/path/itr/components.cc: New.
2154 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
2156 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
2158 Add support for opening file streams from wide character strings.
2159 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
2160 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
2161 Define new overload.
2162 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
2163 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
2164 Declare new overload.
2165 * configure.ac: Check for _wfopen.
2166 * crossconfig.m4: Likewise.
2167 * configure: Regenerate.
2168 * config.h.in: Regenerate.
2169 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
2170 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
2171 Define new overload.
2172 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
2173 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
2174 Declare new overload.
2175 [_GLIBCXX_HAVE__WFOPEN]
2176 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2177 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
2178 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2179 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
2180 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2181 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
2183 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
2184 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
2185 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
2186 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
2187 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
2188 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
2189 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
2191 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
2194 * include/bits/stl_tree.h
2195 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
2198 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
2200 * src/filesystem/std-ops.cc (absolute): Report an error for empty
2202 (weakly_canonical(const path&)): Do not call canonical on empty path.
2203 (weakly_canonical(const path&, error_code&)): Likewise.
2204 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
2207 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
2208 dg-require-filesystem-ts.
2211 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
2212 initialize base class to avoid warnings.
2214 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
2216 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
2217 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
2218 little_endian element in bitmask.
2219 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
2220 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
2222 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
2224 * include/bits/stl_tree.h
2225 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
2226 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
2227 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
2228 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
2229 * include/debug/map.h
2230 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
2231 * include/debug/multimap.h
2232 (multimap(multimap&&, const_allocator_type&)): Likewise.
2233 * include/debug/set.h
2234 (set(set&&, const_allocator_type&)): Likewise.
2235 * include/debug/multiset.h
2236 (multiset(multiset&&, const_allocator_type&)): Likewise.
2237 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
2239 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
2241 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
2243 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
2245 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
2247 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
2249 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
2251 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
2254 2018-05-18 Jason Merrill <jason@redhat.com>
2256 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
2257 for conversion to const_iterator. Add defaulted copy ops.
2258 * libsupc++/new (bad_alloc): Add defaulted copy ops.
2259 * libsupc++/exception.h (exception): Add defaulted copy ops.
2260 * include/std/system_error (system_error): Add defaulted copy ops.
2261 * include/std/stdexcept (domain_error, invalid_argument)
2262 (length_error, out_of_range, range_error, overflow_error)
2263 (underflow_error): Add defaulted copy ops.
2264 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
2266 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
2267 * include/ext/throw_allocator.h (condition_base): Add defaulted
2268 default and copy ctor and copy assignment.
2270 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
2273 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
2274 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
2275 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
2276 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
2278 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
2280 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
2281 braces around body of do-while.
2282 * testsuite/28_regex/basic_regex/85098.cc: New
2284 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
2287 * src/filesystem/path.cc (path::preferred_separator): Add used
2289 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
2292 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
2293 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
2294 Refactor to separate non-throwing and throwing implementations.
2295 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
2296 if constructing the object throws.
2298 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
2301 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
2302 (linear_congruential_engine, mersenne_twister_engine)
2303 (subtract_with_carry_engine, discard_block_engine)
2304 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
2305 constrain function templates taking seed sequences.
2306 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
2307 (mersenne_twister_engine::seed(_Sseq&))
2308 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
2310 * include/ext/random (simd_fast_mersenne_twister_engine): Use
2311 __is_seed_seq to constrain function templates taking seed sequences.
2312 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
2313 Change return type to match declaration.
2314 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
2316 * testsuite/26_numerics/random/independent_bits_engine/cons/
2318 * testsuite/26_numerics/random/linear_congruential_engine/cons/
2320 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
2322 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2323 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
2325 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
2327 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
2331 * include/bits/fs_path.h (path::is_absolute()): Use same definition
2332 for all operating systems.
2333 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
2334 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
2335 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
2336 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
2338 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
2339 unused <vector> header.
2340 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2341 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2342 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2343 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2344 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
2346 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2348 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2349 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2350 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2351 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2352 * testsuite/experimental/filesystem/path/decompose/extension.cc:
2354 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2355 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2357 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2359 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2361 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2363 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2365 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2367 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2369 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2370 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2374 * include/bits/fs_path.h (path::operator/=, path::append): Construct
2375 temporary path before calling _M_append.
2376 (path::_M_append): Change parameter to path and implement C++17
2378 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
2379 and more examples from the standard.
2380 * testsuite/27_io/filesystem/path/append/source.cc: New.
2381 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
2382 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
2384 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
2385 __invoke to prevent ADL.
2387 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
2390 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
2391 exceptions from _M_terminate_output().
2392 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
2393 exceptions from close().
2394 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
2396 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
2397 (__valarray_get_storage): Call operator new directly. Remove ignored
2398 top-level restrict qualifier and add malloc attribute instead.
2399 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
2402 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
2403 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
2406 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
2408 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
2410 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
2413 * testsuite/20_util/variant/80165.cc: New.
2415 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
2417 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
2418 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
2419 of C++11 containers with Debug Mode support.
2420 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
2421 * doc/html/*: Regenerate.
2423 2018-05-10 Jason Merrill <jason@redhat.com>
2425 * include/bits/regex_compiler.h (_S_cache_size): Change from
2426 function to variable.
2428 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
2430 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
2431 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
2432 argument defaulted to +1. Doxy comments on same.
2433 * testsuite/special_functions/02_assoc_legendre/
2434 check_value.cc: Regen.
2435 * testsuite/tr1/5_numerical_facilities/special_functions/
2436 02_assoc_legendre/check_value.cc: Regen.
2438 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
2441 * include/bits/c++config.h (__replacement_assert): Add linkage
2443 * include/bits/std_abs.h: Add comment to closing brace of block.
2444 * include/c_global/cstddef: Add linkage specification.
2445 * include/c_global/cstring: Likewise.
2446 * include/c_global/cwchar: Likewise.
2448 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
2450 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
2452 (_Safe_iterator<>::_S_constant()): ...that.
2453 * include/debug/safe_local_iterator.h
2454 (_Safe_local_iterator<>::_M_constant()): Rename in...
2455 (_Safe_local_iterator<>::_S_constant()): ...that.
2456 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
2457 (_Iterator_state::__rbegin): New.
2458 (_Iterator_state::__rmiddle): New.
2459 (_Iterator_state::__rend): New.
2460 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
2461 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
2463 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
2464 _Is_iterator)): Likewise.
2465 (_Parameter::_S_reverse_state(_Iterator_state)): New.
2466 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
2467 _Is_iterator)): New.
2468 (_Parameter(std::reverse_iterator<> const&, const char*,
2469 _Is_iterator)): New.
2470 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
2471 const char*, _Is_iterator)): New.
2472 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
2474 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
2475 _Is_iterator)): New.
2476 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
2477 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
2478 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
2480 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
2482 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
2483 Use constexpr if in C++17 mode.
2484 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
2485 Copy from const object.
2486 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
2488 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
2490 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
2491 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
2494 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
2495 * include/debug/functions.h (__check_valid_range): Use latter.
2496 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
2498 * include/debug/deque
2499 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
2500 * include/debug/forward_list
2501 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
2503 * include/debug/list
2504 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2505 * include/debug/list
2506 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2507 * include/debug/map.h
2508 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2509 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
2511 * include/debug/multimap.h
2512 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2513 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
2514 const _Alloc&)): Likewise.
2515 * include/debug/set.h
2516 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2517 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
2519 * include/debug/multiset.h
2520 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
2521 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
2522 const _Alloc&)): Likewise.
2523 * include/debug/string
2524 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
2526 * include/debug/unordered_map
2527 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
2529 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
2530 const _Alloc&)): Likewise.
2531 * include/debug/unordered_set
2532 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
2534 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
2535 const _Alloc&)): Likewise.
2536 * include/debug/vector
2537 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
2539 * include/debug/formatter.h (_Error_formatter::_M_function): New.
2540 (_Error_formatter(const char*, unsigned int)): Adapt.
2541 (_Error_formatter::_M_at): Rename in...
2542 (_Error_formatter::_S_at): ...that and adapt.
2543 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
2544 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
2545 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
2548 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
2550 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
2551 Use normal std::vector even in Debug Mode.
2554 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
2555 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
2556 * include/Makefile.in: Regenerate.
2557 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
2558 within conditional block.
2560 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
2562 * doc/xml/manual/using.xml (table.cmd_options): Document that the
2563 C++17 Filesystem implementation also needs -lstdc++fs.
2566 * include/bits/fs_path.h (operator/): Permit copy elision.
2567 * include/experimental/bits/fs_path.h (operator/): Likewise.
2569 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
2571 Moar PR libstdc++/80506
2572 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
2573 Fix magic number used in loop condition.
2575 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
2577 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
2578 * include/std/optional (_Optional_payload): Add noexcept to default
2579 constructor. Re-indent.
2580 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
2581 constructor for copying disengaged payloads.
2582 (_Optional_payload<_Tp, true, false, true>): Likewise.
2583 (_Optional_payload<_Tp, true, true, false>): Likewise.
2584 (_Optional_payload<_Tp, true, false, false>): Likewise.
2585 * testsuite/20_util/optional/cons/85642.cc: New.
2586 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
2588 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
2591 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
2592 inline definitions instead of using-declarations.
2593 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
2594 * testsuite/tr1/5_numerical_facilities/special_functions/
2595 07_conf_hyperg/compile_cxx17.cc: New.
2596 * testsuite/tr1/5_numerical_facilities/special_functions/
2597 17_hyperg/compile_cxx17.cc: New.
2600 * include/std/variant (visit): Qualify std::get call.
2602 PR libstdc++/85632 use uintmax_t for arithmetic
2603 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
2604 arithmetic in result type.
2605 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
2606 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
2607 is greater than free space.
2608 * testsuite/experimental/filesystem/operations/space.cc: New.
2610 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
2611 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
2613 * testsuite/20_util/remove_cvref/value.cc: New.
2614 * testsuite/20_util/remove_cvref/value_ext.cc: New.
2616 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
2617 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
2618 (append(const basic_string&, size_type, size_type)
2619 (assign(const basic_string&, size_type, size_type)
2620 (insert(size_type, const basic_string&, size_type, size_type)
2621 (replace(size_type,size_type,const basic_string&,size_type,size_type)
2622 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
2623 Add default arguments (LWG 2268).
2624 [_GLIBCXX_USE_CXX11_ABI=0]
2625 (append(const basic_string&, size_type, size_type)
2626 (assign(const basic_string&, size_type, size_type)
2627 (insert(size_type, const basic_string&, size_type, size_type)
2628 (replace(size_type,size_type,const basic_string&,size_type,size_type)
2629 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
2631 * testsuite/21_strings/basic_string/dr2268.cc: New test.
2634 * include/std/thread (thread::__not_same): New SFINAE helper.
2635 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
2636 first argument is not a std::thread. Add static assertion to check
2637 INVOKE expression is valid.
2638 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
2639 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
2640 __invoke_result for return types and remove exception specifications.
2641 * testsuite/30_threads/thread/cons/84535.cc: New.
2643 * include/std/future (__async_result_of): Use __invoke_result instead
2646 * include/std/any (any_cast): Use __remove_cvref_t.
2647 * include/std/tuple (__make_tuple): Likewise.
2648 * include/std/type_traits (__remove_cvref_t): Define.
2649 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
2650 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
2651 * include/std/variant (__erased_hash): Use __remove_cvref_t.
2653 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
2655 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
2656 ensure overloaded comma not used.
2657 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
2658 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
2659 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
2660 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
2661 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
2662 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
2663 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
2665 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
2668 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
2669 indices to unsigned.
2670 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
2671 as failure. Refactor error handling.
2672 * testsuite/27_io/ios_base/storage/68197.cc: New.
2676 * include/bits/gslice_array.h (gslice_array): Define default
2677 constructor as deleted, as per C++11 standard.
2678 * include/bits/mask_array.h (mask_array): Likewise.
2679 * include/bits/slice_array.h (slice_array): Likewise.
2680 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
2681 to namespace __detail.
2682 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
2684 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
2685 of data members in closure objects.
2686 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
2687 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
2689 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
2690 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
2691 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
2692 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
2693 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
2694 using-declarations to namespace std.
2695 * testsuite/26_numerics/valarray/83860.cc: New.
2697 * testsuite/backward/strstream_move.cc: Remove duplicate function
2701 * include/backward/strstream (strstreambuf): Define move constructor
2702 and move assignment operator.
2703 (istrstream, ostrstream, strstream): Likewise.
2704 * testsuite/backward/strstream_move.cc: New.
2706 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
2709 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
2710 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
2711 * configure: Regenerate.
2712 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
2713 based on ENABLE_FLOAT128.
2714 * include/Makefile.in: Regenerate.
2715 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
2716 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
2717 _GLIBCXX_USE_FLOAT128.
2719 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
2721 * configure: Regenerated.
2723 2018-04-19 Jakub Jelinek <jakub@redhat.com>
2725 * configure: Regenerated.
2727 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
2728 Jakub Jelinek <jakub@redhat.com>
2731 * src/c++11/Makefile.am: Don't generate debuginfo again for
2732 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
2733 * src/c++11/Makefile.in: Regenerate.
2735 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
2738 * testsuite/30_threads/thread/cons/terminate.cc
2739 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
2741 2018-04-18 David Malcolm <dmalcolm@redhat.com>
2744 * configure: Regenerate.
2746 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
2748 * testsuite/experimental/filesystem/file_status/1.cc: Add
2749 -DUSE_FILESYSTEM_TS to dg-options.
2750 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2752 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
2753 * testsuite/experimental/filesystem/iterators/
2754 recursive_directory_iterator.cc: Likewise.
2755 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
2756 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2757 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2758 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
2759 * testsuite/experimental/filesystem/operations/create_directories.cc:
2761 * testsuite/experimental/filesystem/operations/create_directory.cc:
2763 * testsuite/experimental/filesystem/operations/create_symlink.cc:
2765 * testsuite/experimental/filesystem/operations/current_path.cc:
2767 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
2768 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2769 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
2770 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2771 * testsuite/experimental/filesystem/operations/last_write_time.cc:
2773 * testsuite/experimental/filesystem/operations/permissions.cc:
2775 * testsuite/experimental/filesystem/operations/read_symlink.cc:
2777 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2778 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
2779 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
2780 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
2782 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
2783 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
2784 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
2785 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
2786 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
2787 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
2788 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
2789 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
2790 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
2791 * testsuite/experimental/filesystem/path/construct/default.cc:
2793 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
2794 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
2795 * testsuite/experimental/filesystem/path/construct/string_view.cc:
2797 * testsuite/experimental/filesystem/path/decompose/extension.cc:
2799 * testsuite/experimental/filesystem/path/decompose/filename.cc:
2801 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
2803 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
2805 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2807 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
2809 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
2811 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2812 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
2814 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
2815 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
2816 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
2818 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
2820 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
2822 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
2824 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
2825 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
2826 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
2828 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2829 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2831 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2833 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2835 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2837 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2839 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2841 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2843 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2844 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2847 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
2849 * src/c++11/Makefile.am: Fix sed command.
2850 * src/c++11/Makefile.in: Regenerate.
2852 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
2853 handle mangled names starting with double underscores on darwin.
2854 * src/c++11/Makefile.in: Regenerate.
2856 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
2858 * src/c++11/Makefile.am: Fix comment.
2859 * src/c++11/Makefile.in: Regenerate.
2860 * src/c++11/cxx11-ios_failure.cc: Fix comment.
2861 * src/c++98/ios_failure.cc: Likewise.
2863 * src/c++11/ios.cc: Remove redundant macro definition.
2865 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
2867 * doc/xml/manual/abi.xml: Document header locations in recent
2869 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
2870 * doc/xml/manual/spine.xml: Update copyright years.
2871 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
2872 undefined behaviour.
2873 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
2874 * doc/html/*: Regenerate.
2876 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
2878 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
2879 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2880 * doc/xml/manual/containers.xml: Likewise.
2881 * doc/xml/manual/debug_mode.xml: Likewise.
2882 * doc/xml/manual/extensions.xml: Likewise.
2883 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
2884 * doc/xml/manual/using.xml: Likewise.
2885 * doc/xml/manual/utilities.xml: Likewise.
2888 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
2889 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
2890 * src/c++11/Makefile.in: Regenerate.
2891 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
2893 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2894 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
2895 * src/c++98/ios_failure.cc (__construct_ios_failure)
2896 (__destroy_ios_failure, is_ios_failure_handler): New functions.
2897 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2898 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
2899 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
2900 handler types, to always catch std::ios_base::failure.
2901 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
2902 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
2903 exceptions_failbit.cc: Likewise.
2904 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
2905 exceptions_failbit.cc: Likewise.
2906 * testsuite/27_io/basic_istream/extractors_other/char/
2907 exceptions_null.cc: Likewise.
2908 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
2909 exceptions_null.cc: Likewise.
2910 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
2911 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
2912 * testsuite/27_io/basic_ostream/inserters_other/char/
2913 exceptions_null.cc: Likewise.
2914 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
2915 exceptions_null.cc: Likewise.
2916 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
2918 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
2920 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
2921 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
2923 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
2926 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
2928 * testsuite/20_util/variant/85183.cc: New.
2930 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
2932 * include/std/variant (__get): Qualify calls to avoid ADL.
2933 (__select_index): Adjust whitespace.
2934 (variant): Add using-declaration to workaround Clang bug.
2936 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
2939 * include/bits/stl_function.h (greater::__not_overloaded)
2940 (less::__not_overloaded, greater_equal::__not_overloaded)
2941 (less_equal::__not_overloaded): Fix ambiguous specializations.
2942 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
2943 tests for type with overloaded operators.
2945 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2948 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2949 xfail execution on 32-bit Solaris/x86.
2951 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
2953 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
2954 VERIFY instead of assert.
2955 * testsuite/20_util/hash/84998.cc: New test.
2956 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
2957 copy of test adjusted for Debug Mode.
2958 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
2961 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
2964 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
2965 * include/std/bitset: Likewise.
2966 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
2968 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
2969 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
2970 * include/bits/stl_set.h (std::set<>): Likewise.
2971 * include/bits/unordered_map.h (std::unordered_map<>): Fix
2972 _Hash_merge_helper friend declaration.
2973 (std::unordered_multimap<>): Likewise.
2974 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
2975 (std::unordered_multiset<>): Likewise.
2977 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2979 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
2980 trailing slash for domain level link.
2981 * doc/xml/faq.xml: Ditto.
2982 * doc/xml/manual/appendix_free.xml (software): Ditto.
2983 * doc/xml/manual/intro.xml: Ditto.
2984 * doc/xml/manual/spine.xml: Ditto.
2985 * doc/xml/spine.xml: Ditto.
2987 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
2989 * doc/xml/manual/documentation_hacking.xml: Adjust link to
2992 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
2994 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
2995 to compile as C++98.
2997 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
3000 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
3001 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
3002 to ensure total order for pointers.
3003 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
3004 Add operator() overloads for pointer arguments and make generic
3005 overloads dispatch to new _S_cmp functions when comparisons would
3006 use built-in operators for pointers.
3007 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
3009 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
3013 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
3014 * configure: Regenerate.
3015 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
3016 (aligned_alloc): Add using-declaration.
3017 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
3019 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
3021 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
3022 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
3025 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
3028 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
3029 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
3031 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
3032 src/filesystem/std-ops.cc (create_dir): Likewise.
3034 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
3036 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
3037 (StdListIteratorPrinter): Inherit from latter.
3038 (StdFwdListIteratorPrinter): New, inherit from latter.
3039 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
3040 when iterator has no associated container.
3041 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
3042 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
3044 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
3045 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
3047 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3050 * include/std/optional (_Optional_payload): Split into multiple
3051 specializations that can handle different cases of trivial or
3052 non-trivial assignment operators.
3053 * testsuite/20_util/optional/84601.cc: New.
3054 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
3056 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
3059 * include/bits/parse_numbers.h (_Number_help): Add partial
3060 specialization to handle digit separators. Adjust partial
3061 specialization for recursion temrination to require _Pow == 1ULL.
3062 * testsuite/20_util/duration/literals/84671.cc: New
3064 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
3066 Implement the missing bits of LWG 2769
3067 * include/std/any (any_cast(const any&)): Add static_assert.
3068 (any_cast(any&)): Likewise.
3069 (any_cast(any&&)): Likewise, and remove the handling
3070 for copyable-but-not-movable type.
3071 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
3072 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
3075 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
3078 * include/std/thread (thread::__make_invoker): Construct tuple
3079 directly instead of using make_tuple.
3080 * testsuite/30_threads/async/84532.cc: New.
3081 * testsuite/30_threads/thread/84532.cc: New.
3083 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
3085 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
3086 (template<> __aligned_buffer): Define as __aligned_membuf alias.
3088 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
3091 * configure: Regenerate.
3093 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
3096 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
3097 * configure: Regenerate.
3098 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
3100 * include/Makefile.in: Regenerate.
3102 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
3105 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
3106 Add -ffloat-store to options for m68k and ia32.
3108 * doc/xml/faq.xml: Update copyright years.
3109 * doc/html/*: Regenerate.
3112 * include/std/any (any::__do_emplace): Only set _M_manager after
3113 constructing the contained object.
3114 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
3115 * testsuite/20_util/any/modifiers/83658.cc: New test.
3117 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
3120 * include/c_global/cstddef (__byte_operand): Define primary template.
3121 * testsuite/18_support/byte/81076.cc: New test.
3123 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
3125 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
3126 dg-options and dg-add-options order.
3127 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
3128 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
3130 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
3131 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
3133 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
3135 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
3136 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
3138 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
3140 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
3142 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
3144 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
3146 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
3148 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
3150 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
3152 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
3153 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
3154 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
3155 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
3156 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
3157 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
3158 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
3159 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
3160 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
3162 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
3164 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
3166 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
3169 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
3171 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
3172 include linux/types.h when checking linux/random.h header.
3173 * config.h.in: Regenerate.
3175 * src/c++11/random.cc: Conditionally include linux/types.h.
3177 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
3179 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
3181 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
3184 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
3185 pattern with exact match for std::cerr.
3187 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
3190 * include/bits/random.h (chi_squared_distribution::param): Update
3191 gamma distribution parameter.
3192 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
3196 * include/std/type_traits (has_unique_object_representations_v): Add
3198 * testsuite/20_util/has_unique_object_representations/value.cc: Check
3201 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
3203 Make optional conditionally
3204 trivially_{copy,move}_{constructible,assignable}
3205 * include/std/optional (_Optional_payload): Fix the comment in
3206 the class head and turn into a primary and one specialization.
3207 (_Optional_payload::_M_engaged): Strike the NSDMI.
3208 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
3210 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
3212 (_Optional_payload<_Tp, false>::_M_get): Likewise.
3213 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
3214 (_Optional_base_impl): Likewise.
3215 (_Optional_base): Turn into a primary and three specializations.
3216 (optional(nullopt)): Change the base init.
3217 * testsuite/20_util/optional/assignment/8.cc: New.
3218 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
3219 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
3221 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
3224 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
3225 (get_template_arg_list): New.
3226 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
3228 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
3229 of strings and regular expressions.
3230 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
3231 (FilteringTypePrinter): Add docstring. Match using startswith. Use
3232 strip_inline_namespaces instead of strip_versioned_namespace.
3233 (add_one_type_printer): Prepend namespace to match argument.
3234 (register_type_printers): Add type printers for char16_t and char32_t
3235 string types and for types using cxx11 ABI. Update calls to
3236 add_one_template_type_printer to provide default argument dicts.
3237 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
3238 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
3239 basic_string<unsigned char> and basic_string<signed char>.
3240 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
3241 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
3243 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
3246 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
3248 2018-01-13 Tim Shen <timshen@google.com>
3251 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
3252 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
3253 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
3255 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3258 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
3259 Remove dg-xfail-run-if.
3261 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
3263 * include/bits/forward_list.h
3264 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
3265 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
3266 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
3267 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
3268 (_Fwd_list_impl()): Add noexcept qualification.
3269 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
3270 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
3271 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
3272 (_Fwd_list_base()): Default.
3273 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
3274 (_Fwd_list_base(_Fwd_list_base&&)): Default.
3275 (forward_list<>()): Default.
3276 (forward_list<>(forward_list&&)): Default.
3277 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
3278 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
3279 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
3280 * include/bits/forward_list.tcc
3281 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
3282 _M_impl._M_head move assignment.
3283 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
3284 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
3286 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
3289 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
3290 (UniquePointerPrinter): Print correct template argument, not type of
3292 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
3294 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
3296 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
3297 weak_ptr of array types.
3299 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
3302 * include/bits/hashtable_policy.h
3303 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
3305 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
3306 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
3307 Add false_type parameter.
3308 (_Insert_base::insert): Adapt.
3309 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
3311 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
3312 Add __n_elt parameter, defaulted to 1.
3313 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
3314 policy _M_need_rehash.
3315 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
3316 produce only 1 rehash if necessary.
3317 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
3318 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
3320 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
3321 Jonathan Wakely <jwakely@redhat.com>
3323 PR libstdc++/59253 (partial)
3324 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
3325 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
3326 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
3328 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
3329 of unique_ptr printer.
3330 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
3331 output of shared_ptr printer.
3333 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
3336 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
3337 unnecessary symlink_status call.
3338 (remove_all(const path&, error_code&)): Use filesystem::remove.
3339 * src/filesystem/std-ops.cc: Likewise.
3342 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
3346 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
3347 report an error for ENOENT.
3348 (remove_all(const path&)): Fix type of result variable.
3349 (remove_all(const path&, error_code&)): Use non-throwing increment
3350 for directory iterator. Call POSIX remove directly to avoid redundant
3351 calls to symlink_status. Do not report errors for ENOENT.
3352 * src/filesystem/std-ops.cc: Likewise.
3353 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
3355 * testsuite/experimental/filesystem/operations/remove_all.cc:
3358 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
3361 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
3362 redundant call to ec.clear().
3363 (remove_all(const path&, error_code&))): Do not return an error for
3365 * src/filesystem/std-ops.cc: Likewise.
3366 * testsuite/27_io/filesystem/operations/remove.cc: New test.
3367 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
3368 results for non-existent paths.
3369 * testsuite/experimental/filesystem/operations/remove.cc: New test.
3370 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
3371 expected results for non-existent paths.
3373 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
3374 check status_known once.
3375 * include/experimental/bits/fs_ops.h: Likewise.
3378 * include/std/functional (__is_byte_like): New trait.
3379 (__is_std_equal_to): Remove.
3380 (__boyer_moore_base_t): Use __is_byte_like instead of
3382 * include/experimental/functional (__is_std_equal_to): Remove.
3383 (__boyer_moore_base_t): Use __is_byte_like instead of
3385 * testsuite/20_util/function_objects/83607.cc: New test.
3387 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
3389 Protect optional's deduction guide with the feature macro
3390 * include/std/optional: Use the feature macro.
3392 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3394 Update copyright years.
3396 Copyright (C) 2018 Free Software Foundation, Inc.
3398 Copying and distribution of this file, with or without modification,
3399 are permitted in any medium without royalty provided the copyright
3400 notice and this notice are preserved.