1 2018-11-11 Hans-Peter Nilsson <hp@axis.com>
4 * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
5 __atomic_base<_PTp*>::is_lock_free()): Call __atomic_always_lock_free
6 with the type-derived _S_alignment instead of __alignof the object.
7 * include/std/atomic (atomic<T>::is_lock_free()): Likewise.
9 2018-11-11 Jonathan Wakely <jwakely@redhat.com>
11 Implement P0318R1 unwrap_ref_decay and unwrap_reference
12 * include/std/type_traits (unwrap_reference, unwrap_reference_t)
13 (unwrap_ref_decay, unwrap_ref_decay_t): New traits and aliases.
14 * testsuite/20_util/unwrap_reference/1.cc: New test.
15 * testsuite/20_util/unwrap_reference/2.cc: New test.
17 Implement P1007R3 std::assume_aligned
18 * include/std/memory (assume_aligned): Implement for C++17.
19 * testsuite/20_util/assume_aligned/1.cc: New test.
20 * testsuite/20_util/assume_aligned/2_neg.cc: New test.
21 * testsuite/20_util/assume_aligned/3.cc: New test.
23 2018-11-09 Jonathan Wakely <jwakely@redhat.com>
26 * include/bits/stl_uninitialized.h (__relocate_a_1): Do not call
27 memmove when there's nothing to copy (and pointers could be null).
29 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
31 * configure: Regenerated.
33 2018-11-07 Jonathan Wakely <jwakely@redhat.com>
35 * config/abi/pre/gnu.ver: Fix patterns for size_t parameters.
37 2018-11-06 Jonathan Wakely <jwakely@redhat.com>
39 Implement std::pmr::unsynchronized_pool_resource
40 * config/abi/pre/gnu.ver: Add new symbols.
41 * include/std/memory_resource (std::pmr::__pool_resource): New class.
42 (std::pmr::unsynchronized_pool_resource): New class.
43 * src/c++17/Makefile.am: Add -fimplicit-templates to flags for
45 * src/c++17/Makefile.in: Regenerate.
46 * src/c++17/memory_resource.cc (bitset, chunk, big_block): New
48 (__pool_resource::_Pool): Define new class.
49 (munge_options, pool_index, select_num_pools): New internal functions.
50 (__pool_resource::__pool_resource, __pool_resource::~__pool_resource)
51 (__pool_resource::allocate, __pool_resource::deallocate)
52 (__pool_resource::_M_alloc_pools): Define member functions.
53 (unsynchronized_pool_resource::unsynchronized_pool_resource)
54 (unsynchronized_pool_resource::~unsynchronized_pool_resource)
55 (unsynchronized_pool_resource::release)
56 (unsynchronized_pool_resource::_M_find_pool)
57 (unsynchronized_pool_resource::do_allocate)
58 (unsynchronized_pool_resource::do_deallocate): Define member
60 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: New
62 * testsuite/20_util/unsynchronized_pool_resource/is_equal.cc: New
64 * testsuite/20_util/unsynchronized_pool_resource/options.cc: New
66 * testsuite/20_util/unsynchronized_pool_resource/release.cc: New
69 2018-11-06 John Bytheway <jbytheway@gmail.com>
72 * include/debug/safe_sequence.tcc
73 (_Safe_sequence<>::_M_transfer_from_if): Skip transfer to self.
75 2018-10-31 Joseph Myers <joseph@codesourcery.com>
78 * Makefile.am: Include multilib.am.
79 * configure.ac: Remove AC_PREREQ.
80 * Makefile.in, aclocal.m4, configure, doc/Makefile.in,
81 include/Makefile.in, libsupc++/Makefile.in, po/Makefile.in,
82 python/Makefile.in, src/Makefile.in, src/c++11/Makefile.in,
83 src/c++17/Makefile.in, src/c++98/Makefile.in,
84 src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
86 2018-10-31 Jonathan Wakely <jwakely@redhat.com>
88 * testsuite/20_util/pair/87822.cc: Test deeper nesting.
91 * include/bits/stl_pair.h (__pair_base): Change to class template.
92 (pair): Make base class type depend on template parameters.
93 * testsuite/20_util/pair/87822.cc: New test.
95 2018-10-30 Marek Polacek <polacek@redhat.com>
97 Implement P0892R2, explicit(bool).
98 * testsuite/20_util/any/cons/explicit.cc: Adjust dg-error.
99 * testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
100 * testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.
102 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
105 * include/bits/forward_list.h (_Fwd_list_impl::_Fwd_list_impl()): Use
106 trait in exception-specification instead of possibly invalid
108 * include/bits/stl_bvector.h (_Bvector_impl::_Bvector_impl()):
110 * include/bits/stl_list.h (_List_impl::_List_impl()): Likewise.
111 * include/bits/stl_vector.h (_Vector_impl::_Vector_impl()): Likewise.
112 * testsuite/23_containers/forward_list/cons/87809.cc: New test.
113 * testsuite/23_containers/list/cons/87809.cc: New test.
114 * testsuite/23_containers/vector/bool/cons/87809.cc: New test.
115 * testsuite/23_containers/vector/cons/87809.cc: New test.
118 * include/tr2/dynamic_bitset (dynamic_bitset::push_back): When there
119 are no unused bits in the last block, append a new block with the
120 right value so the bit doesn't need to be set. Only increment size
121 after setting the new bit, not before.
122 * testsuite/tr2/dynamic_bitset/pr87784.cc: New test.
124 2018-10-29 David Malcolm <dmalcolm@redhat.com>
126 * testsuite/17_intro/using_namespace_std_exp_neg.cc: Remove
127 "expected namespace-name before" error.
128 * testsuite/17_intro/using_namespace_std_tr1_neg.cc: Likewise.
130 2018-10-28 François Dumont <fdumont@gcc.gnu.org>
132 * testsuite/23_containers/deque/48101_neg.cc: Remove dg-prune-output
133 'std' from regex pattern for versioned namespace compatibility.
134 * testsuite/23_containers/vector/48101_neg.cc: Likewise.
135 * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
137 2018-10-25 Jonathan Wakely <jwakely@redhat.com>
140 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
141 (basic_string::operator=(basic_string&&)): For short strings copy the
142 buffer inline. Only fall back to using assign(const basic_string&) to
143 do a deep copy when reallocation is needed.
144 * testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
146 * testsuite/21_strings/basic_string/modifiers/assign/char/
147 move_assign_optim.cc: New test.
148 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
150 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
151 move_assign_optim.cc: New test.
153 2018-10-25 Marc Glisse <marc.glisse@inria.fr>
156 * include/bits/alloc_traits.h (_S_construct, _S_destroy, construct,
157 destroy): Add noexcept specification.
158 * include/bits/allocator.h (construct, destroy): Likewise.
159 * include/ext/alloc_traits.h (construct, destroy): Likewise.
160 * include/ext/malloc_allocator.h (construct, destroy): Likewise.
161 * include/ext/new_allocator.h (construct, destroy): Likewise.
162 * include/bits/stl_uninitialized.h (__relocate_object_a, __relocate_a,
163 __relocate_a_1): New functions.
164 (__is_trivially_relocatable): New class.
165 * include/bits/stl_vector.h (__use_relocate): New static member.
166 * include/bits/vector.tcc (reserve, _M_realloc_insert,
167 _M_default_append): Use __relocate_a.
168 (reserve, _M_assign_aux, _M_realloc_insert, _M_fill_insert,
169 _M_default_append, _M_range_insert): Move _GLIBCXX_ASAN_ANNOTATE_REINIT
171 * testsuite/23_containers/vector/modifiers/push_back/49836.cc:
172 Replace CopyConsOnlyType with DelAnyAssign.
174 2018-10-24 François Dumont <fdumont@gcc.gnu.org>
176 * include/debug/safe_unordered_container.h
177 (_Safe_unordered_container<>::_M_invalidate_locals): Take lambda
178 parameter type from local end variable.
179 (_Safe_unordered_container<>::_M_invalidate_all): Likewise.
180 * include/debug/unordered_map
181 (unordered_map<>::begin()): Use C++11 direct initialization.
182 (unordered_map<>::end()): Likewise.
183 (unordered_map<>::cbegin()): Likewise.
184 (unordered_map<>::cend()): Likewise.
185 (unordered_map<>::begin(size_type)): Likewise.
186 (unordered_map<>::end(size_type)): Likewise.
187 (unordered_map<>::cbegin(size_type)): Likewise.
188 (unordered_map<>::cend(size_type)): Likewise.
189 (unordered_map<>::emplace<>(_Args&&...)): Likewise.
190 (unordered_map<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
191 (unordered_map<>::insert(const value_type&)): Likewise.
192 (unordered_map<>::insert(value_type&&)): Likewise.
193 (unordered_map<>::insert<>(_Pair&&)): Likewise.
194 (unordered_map<>::insert(const_iterator, const value_type&)): Likewise.
195 (unordered_map<>::insert(const_iterator, value_type&&)): Likewise.
196 (unordered_map<>::insert<>(const_iterator, _Pair&&)): Likewise.
197 (unordered_map<>::try_emplace<>(const key_type&, _Args&&...)): Likewise.
198 (unordered_map<>::try_emplace<>(key_type&&, _Args&&...)): Likewise.
199 (unordered_map<>::try_emplace<>(const_iterator, const key_type&,
200 _Args&&...)): Likewise.
201 (unordered_map<>::try_emplace<>(const_iterator, key_type&&,
202 _Args&&...)): Likewise.
203 (unordered_map<>::insert_or_assign<>(const key_type&, _Obj&&)): Likewise.
204 (unordered_map<>::insert_or_assign<>(key_type&&, _Obj&&)): Likewise.
205 (unordered_map<>::insert_or_assign<>(const_iterator, const key_type&,
207 (unordered_map<>::insert_or_assign<>(const_iterator, key_type&&,
209 (unordered_map<>::insert(note_type&&)): Likewise.
210 (unordered_map<>::find(const key_type&)): Likewise.
211 (unordered_map<>::equal_range(const key_type&)): Likewise.
212 (unordered_map<>::_M_extract): New.
213 (unordered_map<>::extract(const_iterator)): Use latter.
214 (unordered_map<>::extract(const key_type&)): Likewise.
215 (unordered_map<>::_M_erase): New.
216 (unordered_map<>::erase(const key_type&)): Use latter.
217 (unordered_map<>::erase(const_iterator)): Likewise.
218 (unordered_map<>::erase(iterator)): Likewise.
219 (unordered_map<>::_M_invalidate): New.
220 (unordered_map<>::erase(const_iterator, const_iterator)): Use latter.
221 (unordered_multimap<>::begin()): Use C++11 direct initialization.
222 (unordered_multimap<>::end()): Likewise.
223 (unordered_multimap<>::cbegin()): Likewise.
224 (unordered_multimap<>::cend()): Likewise.
225 (unordered_multimap<>::begin(size_type)): Likewise.
226 (unordered_multimap<>::end(size_type)): Likewise.
227 (unordered_multimap<>::cbegin(size_type)): Likewise.
228 (unordered_multimap<>::cend(size_type)): Likewise.
229 (unordered_multimap<>::emplace<>(_Args&&...)): Likewise.
230 (unordered_multimap<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
231 (unordered_multimap<>::insert(const value_type&)): Likewise.
232 (unordered_multimap<>::insert(const_iterator, const value_type&)): Likewise.
233 (unordered_multimap<>::insert(const_iterator, value_type&&)): Likewise.
234 (unordered_multimap<>::insert<>(_Pair&&)): Likewise.
235 (unordered_multimap<>::insert<>(const_iterator, _Pair&&)): Likewise.
236 (unordered_multimap<>::insert(note_type&&)): Likewise.
237 (unordered_multimap<>::insert(const_iterator, note_type&&)): Likewise.
238 (unordered_multimap<>::find(const key_type&)): Likewise.
239 (unordered_multimap<>::equal_range(const key_type&)): Likewise.
240 (unordered_multimap<>::_M_extract): New.
241 (unordered_multimap<>::extract(const_iterator)): Use latter.
242 (unordered_multimap<>::extract(const key_type&)): Likewise.
243 (unordered_multimap<>::_M_erase): New.
244 (unordered_multimap<>::erase(const_iterator)): Likewise.
245 (unordered_multimap<>::erase(iterator)): Likewise.
246 (unordered_multimap<>::_M_invalidate): New.
247 (unordered_multimap<>::erase(const key_type&)): Use latter.
248 (unordered_multimap<>::erase(const_iterator, const_iterator)): Likewise.
249 * include/debug/unordered_set
250 (unordered_set<>::begin()): Use C++11 direct initialization.
251 (unordered_set<>::end()): Likewise.
252 (unordered_set<>::cbegin()): Likewise.
253 (unordered_set<>::cend()): Likewise.
254 (unordered_set<>::begin(size_type)): Likewise.
255 (unordered_set<>::end(size_type)): Likewise.
256 (unordered_set<>::cbegin(size_type)): Likewise.
257 (unordered_set<>::cend(size_type)): Likewise.
258 (unordered_set<>::emplace<>(_Args&&...)): Likewise.
259 (unordered_set<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
260 (unordered_set<>::insert(const value_type&)): Likewise.
261 (unordered_set<>::insert(value_type&&)): Likewise.
262 (unordered_set<>::insert(const_iterator, const value_type&)): Likewise.
263 (unordered_set<>::insert(const_iterator, value_type&&)): Likewise.
264 (unordered_set<>::insert(note_type&&)): Likewise.
265 (unordered_set<>::insert(const_iterator, note_type&&)): Likewise.
266 (unordered_set<>::find(const key_type&)): Likewise.
267 (unordered_set<>::equal_range(const key_type&)): Likewise.
268 (unordered_set<>::_M_extract): New.
269 (unordered_set<>::extract(const_iterator)): Use latter.
270 (unordered_set<>::extract(const key_type&)): Likewise.
271 (unordered_set<>::_M_erase): New.
272 (unordered_set<>::erase(const key_type&)): Use latter.
273 (unordered_set<>::erase(const_iterator)): Likewise.
274 (unordered_set<>::erase(iterator)): Likewise.
275 (unordered_set<>::_M_invalidate): New.
276 (unordered_set<>::erase(const_iterator, const_iterator)): Use latter.
277 (unordered_multiset<>::begin()): Use C++11 direct initialization.
278 (unordered_multiset<>::end()): Likewise.
279 (unordered_multiset<>::cbegin()): Likewise.
280 (unordered_multiset<>::cend()): Likewise.
281 (unordered_multiset<>::begin(size_type)): Likewise.
282 (unordered_multiset<>::end(size_type)): Likewise.
283 (unordered_multiset<>::cbegin(size_type)): Likewise.
284 (unordered_multiset<>::cend(size_type)): Likewise.
285 (unordered_multiset<>::emplace<>(_Args&&...)): Likewise.
286 (unordered_multiset<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
287 (unordered_multiset<>::insert(const value_type&)): Likewise.
288 (unordered_multiset<>::insert(const_iterator, const value_type&)): Likewise.
289 (unordered_multiset<>::insert(value_type&&)): Likewise.
290 (unordered_multiset<>::insert(const_iterator, value_type&&)): Likewise.
291 (unordered_multiset<>::insert(node_type&&)): Likewise.
292 (unordered_multiset<>::insert(const_iterator, node_type&&)): Likewise.
293 (unordered_multiset<>::find(const key_type&)): Likewise.
294 (unordered_multiset<>::equal_range(const key_type&)): Likewise.
295 (unordered_multiset<>::_M_extract): New.
296 (unordered_multiset<>::extract(const_iterator)): Use latter.
297 (unordered_multiset<>::extract(const key_type&)): Likewise.
298 (unordered_multiset<>::_M_erase): New.
299 (unordered_multiset<>::erase(const_iterator)): Likewise.
300 (unordered_multiset<>::erase(iterator)): Likewise.
301 (unordered_multiset<>::_M_invalidate): New.
302 (unordered_multiset<>::erase(const key_type&)): Use latter.
303 (unordered_multiset<>::erase(const_iterator, const_iterator)): Likewise.
305 * include/c_global/cstddef: Add versioned namespace.
307 2018-10-23 Jonathan Wakely <jwakely@redhat.com>
310 * include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
311 not delegate to default constructor.
312 (unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
313 * testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.
315 2018-10-20 François Dumont <fdumont@gcc.gnu.org>
317 * testsuite/util/testsuite_containers.h
318 (forward_members_unordered<>::forward_members_unordered
319 (const value_type&)): Add local_iterator pre and post increment checks.
320 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 new symbol.
322 2018-10-19 Jonathan Wakely <jwakely@redhat.com>
324 * testsuite/23_containers/array/requirements/explicit_instantiation/
325 3.cc: Skip test when compiled with a -std=c++NN strict mode.
326 * testsuite/23_containers/deque/requirements/explicit_instantiation/
328 * testsuite/23_containers/forward_list/requirements/
329 explicit_instantiation/3.cc: Likewise.
330 * testsuite/23_containers/list/requirements/explicit_instantiation/
332 * testsuite/23_containers/map/requirements/explicit_instantiation/
334 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
336 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
338 * testsuite/23_containers/set/requirements/explicit_instantiation/
340 * testsuite/23_containers/unordered_map/requirements/
341 explicit_instantiation/3.cc: Likewise.
342 * testsuite/23_containers/unordered_multimap/requirements/
343 explicit_instantiation/3.cc: Likewise.
344 * testsuite/23_containers/unordered_multiset/requirements/
345 explicit_instantiation/3.cc: Likewise.
346 * testsuite/23_containers/unordered_set/requirements/
347 explicit_instantiation/3.cc: Likewise.
348 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
350 * testsuite/23_containers/vector/requirements/explicit_instantiation/
353 * testsuite/23_containers/deque/48101_neg.cc: Prune additional errors
354 printed when __STRICT_ANSI__ is defined.
355 * testsuite/23_containers/forward_list/48101_neg.cc: Likewise.
356 * testsuite/23_containers/list/48101_neg.cc: Likewise.
357 * testsuite/23_containers/multiset/48101_neg.cc: Likewise.
358 * testsuite/23_containers/set/48101_neg.cc: Likewise.
359 * testsuite/23_containers/unordered_multiset/48101_neg.cc: Likewise.
360 * testsuite/23_containers/unordered_set/48101_neg.cc: Likewise.
361 * testsuite/23_containers/vector/48101_neg.cc: Likewise.
363 * testsuite/23_containers/forward_list/requirements/
364 explicit_instantiation/5.cc [__STRICT_ANSI__]: Don't test non-standard
366 * testsuite/23_containers/list/requirements/explicit_instantiation/
367 5.cc [__STRICT_ANSI__]: Likewise.
368 * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc
369 [__STRICT_ANSI__]: Likewise.
370 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
371 5.cc [__STRICT_ANSI__]: Likewise.
372 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
373 5.cc [__STRICT_ANSI__]: Likewise.
374 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc
375 [__STRICT_ANSI__]: Likewise.
376 * testsuite/23_containers/unordered_map/requirements/debug_container.cc
377 [__STRICT_ANSI__]: Likewise.
378 * testsuite/23_containers/unordered_map/requirements/
379 explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
380 * testsuite/23_containers/unordered_multimap/requirements/
381 explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
382 * testsuite/23_containers/unordered_multiset/requirements/
383 explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
384 * testsuite/23_containers/unordered_set/requirements/
385 explicit_instantiation/5.cc [__STRICT_ANSI__]: Likewise.
387 * testsuite/20_util/scoped_allocator/1.cc: Use allocator with correct
388 value type for the container.
389 * testsuite/23_containers/forward_list/cons/14.cc: Likewise.
390 * testsuite/23_containers/map/56613.cc: Likewise.
391 * testsuite/23_containers/unordered_map/55043.cc: Likewise.
392 * testsuite/23_containers/unordered_map/allocator/copy.cc: Likewise.
393 * testsuite/23_containers/unordered_map/allocator/copy_assign.cc:
395 * testsuite/23_containers/unordered_map/allocator/minimal.cc:
397 * testsuite/23_containers/unordered_map/allocator/move.cc: Likewise.
398 * testsuite/23_containers/unordered_map/allocator/move_assign.cc:
400 * testsuite/23_containers/unordered_map/allocator/noexcept.cc:
402 * testsuite/23_containers/unordered_map/cons/81891.cc: Likewise.
403 * testsuite/23_containers/unordered_map/requirements/exception/
405 * testsuite/23_containers/unordered_map/requirements/exception/
406 generation_prohibited.cc: Likewise.
407 * testsuite/23_containers/unordered_map/requirements/exception/
408 propagation_consistent.cc: Likewise.
409 * testsuite/23_containers/unordered_multimap/55043.cc: Likewise.
410 * testsuite/23_containers/unordered_multimap/allocator/copy.cc:
412 * testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc:
414 * testsuite/23_containers/unordered_multimap/allocator/minimal.cc:
416 * testsuite/23_containers/unordered_multimap/allocator/move.cc:
418 * testsuite/23_containers/unordered_multimap/allocator/move_assign.cc:
420 * testsuite/23_containers/unordered_multimap/allocator/noexcept.cc:
422 * testsuite/23_containers/unordered_multimap/requirements/exception/
424 * testsuite/23_containers/unordered_multimap/requirements/exception/
425 generation_prohibited.cc: Likewise.
426 * testsuite/23_containers/unordered_multimap/requirements/exception/
427 propagation_consistent.cc: Likewise.
428 * testsuite/23_containers/unordered_multimap/requirements/
429 explicit_instantiation/5.cc: Likewise.
430 * testsuite/ext/malloc_allocator/sanity.cc: Likewise.
432 * ext/special_functions/airy_ai/check_nan.cc: Skip test for
433 non-standard extension when a strict -std=c++NN dialect is used.
434 * ext/special_functions/airy_ai/check_value.cc: Likewise.
435 * ext/special_functions/airy_ai/compile.cc: Likewise.
436 * ext/special_functions/airy_bi/check_nan.cc: Likewise.
437 * ext/special_functions/airy_bi/check_value.cc: Likewise.
438 * ext/special_functions/airy_bi/compile.cc: Likewise.
439 * ext/special_functions/conf_hyperg/check_nan.cc: Likewise.
440 * ext/special_functions/conf_hyperg/check_value.cc: Likewise.
441 * ext/special_functions/conf_hyperg/compile.cc: Likewise.
442 * ext/special_functions/hyperg/check_nan.cc: Likewise.
443 * ext/special_functions/hyperg/check_value.cc: Likewise.
444 * ext/special_functions/hyperg/compile.cc: Likewise.
446 * testsuite/23_containers/list/requirements/explicit_instantiation/
447 5_c++0x.cc: Remove redundant test that is functionally identical to
449 * testsuite/23_containers/map/requirements/explicit_instantiation/
450 5_c++0x.cc: Likewise.
451 * testsuite/23_containers/multimap/requirements/explicit_instantiation/
452 5_c++0x.cc: Likewise.
453 * testsuite/23_containers/multiset/requirements/explicit_instantiation/
454 5_c++0x.cc: Likewise.
455 * testsuite/23_containers/set/requirements/explicit_instantiation/
456 5_c++0x.cc: Likewise.
458 * include/bits/regex_executor.tcc (_Backref_matcher::_M_apply): Use
459 _GLIBCXX_STD_A to refer to normal mode algorithms.
460 * testsuite/28_regex/headers/regex/parallel_mode.cc: New test.
461 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Remove empty
464 * include/debug/map.h (map::erase(iterator)): Add abi-tag so that
465 C++11 version mangles differently from incompatible C++98 version.
466 * include/debug/multimap.h (multimap::erase(iterator)): Likewise.
467 * include/debug/multiset.h (multiset::erase(iterator))
468 (multiset::erase(const_iterator, const_iterator)): Likewise.
469 * include/debug/set.h (set::erase(iterator))
470 (multiset::erase(const_iterator, const_iterator)): Likewise.
472 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
474 * testsuite/20_util/duration/cons/2.cc: Add -ffloat-store to fix
475 failure when compiled without optimisation.
476 * testsuite/ext/profile/mutex_extensions_neg.cc: Prune additional
477 errors caused by C++17 std::pmr alias templates.
480 * config/locale/gnu/monetary_members.cc
481 (moneypunct<char, true>::_M_initialize_moneypunct): Use
482 __narrow_multibyte_chars to convert multibyte thousands separators
484 * config/locale/gnu/numeric_members.cc
485 (numpunct<char>::_M_initialize_numpunct): Likewise.
486 (__narrow_multibyte_chars): New function.
489 * include/bits/valarray_array.h (__valarray_sum): Use first element
490 to initialize accumulator instead of value-initializing it.
491 (__valarray_product<_Tp>): Move to ...
492 * src/c++98/valarray.cc (__valarray_product<_Tp>): Here. Use first
493 element to initialize accumulator.
494 (__valarray_product(const valarray<size_t>&)): Remove const_cast made
495 unnecessary by LWG 389.
496 * testsuite/26_numerics/valarray/87641.cc: New test.
498 2018-10-18 François Dumont <fdumont@gcc.gnu.org>
501 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
503 * include/debug/list (list<>::cbegin()): Use C++11 direct
505 (list<>::cend()): Likewise.
506 (list<>::erase(const_iterator, const_iterator)): Ensure consistent
507 iterator comparisons.
508 (list<>::splice(const_iterator, list&&, const_iterator,
509 const_iterator)): Likewise.
512 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
514 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
516 (vector<>::cend()): Likewise.
517 (vector<>::insert(const_iterator, const _Tp&)): Use consistent
519 (vector<>::erase(const_iterator)): Likewise.
520 (vector<>::erase(const_iterator, const_iterator)): Likewise.
522 2018-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
525 * include/std/variant (__select_index): Fix an off-by-one.
526 * testsuite/20_util/variant/87619.cc: New.
528 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
530 * include/bits/random.h (random_device) [!_GLIBCXX_USE_DEV_RANDOM]:
531 Fix default constructor to call correct function.
533 * testsuite/experimental/net/internet/address/v4/creation.cc: Do not
534 declare ip in global namespace, to avoid collision with struct ip
535 defined in <netinet/ip.h>.
537 * include/experimental/bits/net.h: Move versioned namespace macros
539 * include/experimental/buffer: Likewise.
540 * include/experimental/executor: Likewise.
541 * include/experimental/internet: Likewise.
542 * include/experimental/io_context: Likewise.
543 * include/experimental/netfwd: Likewise.
544 * include/experimental/socket: Likewise.
545 * include/experimental/timer: Likewise.
547 * config.h.in: Regenerate.
548 * configure: Regenerate.
549 * configure.ac: Check for headers used by Networking TS.
550 * include/experimental/executor: Include <condition_variable>
552 * include/experimental/internet: Use autoconf macros for available
553 headers. Include <sys/socket.h> for. Remove <cstring> and use
554 __builtin_memcpy and __builtin_strchr.
555 (resolver_errc) [!_GLIBCXX_HAVE_NETDB_H]: Do not define.
556 (address_v4::to_string, address_v6::to_string)
557 [!_GLIBCXX_HAVE_ARPA_INET_H]: Likewise.
558 (basic_resolver_results) [!_GLIBCXX_HAVE_NETDB_H]: Make private
559 constructors report errors.
560 [!_GLIBCXX_HAVE_NETINET_TCP_H] (tcp::no_delay): Do not define.
561 * include/experimental/io_context: Likewise.
562 * include/experimental/socket: Likewise.
563 [!_GLIBCXX_HAVE_SYS_SOCKET_H, !_GLIBCXX_HAVE_POLL_H] (socket_base): Do
564 not define nested types when relevant header not available.
565 (__socket_impl::native_non_blocking) [!_GLIBCXX_HAVE_FCNTL_H]: Report
567 (__basic_socket_impl::open, __basic_socket_impl::local_endpoint)
568 (__basic_socket_impl::bind) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
569 (__basic_socket_impl::io_control) [!_GLIBCXX_HAVE_SYS_IOCTL_H]:
571 (basic_socket::at_mark, basic_socket::shutdown)
572 (basic_socket::remote_endpoint, basic_socket::connect)
573 (basic_socket::async_connect) [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
574 (basic_socket::available) [_GLIBCXX_HAVE_SYS_IOCTL_H]: Check macro
575 for <sys/ioctl.h> availability.
576 (basic_socket::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
577 (basic_datagram_socket::receive, basic_datagram_socket::async_receive)
578 (basic_datagram_socket::receive_from)
579 (basic_datagram_socket::async_receive_from)
580 (basic_datagram_socket::send, basic_datagram_socket::async_send)
581 (basic_datagram_socket::send_to, basic_datagram_socket::async_send_to)
582 [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
583 (basic_stream_socket::receive, basic_stream_socket::async_receive)
584 (basic_stream_socket::send, basic_stream_socket::async_send)
585 [!_GLIBCXX_HAVE_SYS_SOCKET_H]: Likewise.
586 (basic_socket_acceptor::listen, basic_socket_acceptor::accept)
587 (basic_socket_acceptor::async_accept) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
589 (basic_socket_acceptor::wait) [!_GLIBCXX_HAVE_POLL_H]: Likewise.
591 * testsuite/experimental/net/headers.cc: Remove dg-options.
592 * testsuite/experimental/net/buffer/arithmetic.cc: Replace dg-options
593 with dg-do using effective target.
594 * testsuite/experimental/net/buffer/const.cc: Likewise.
595 * testsuite/experimental/net/buffer/creation.cc: Likewise.
596 * testsuite/experimental/net/buffer/mutable.cc: Likewise.
597 * testsuite/experimental/net/buffer/size.cc: Likewise.
598 * testsuite/experimental/net/buffer/traits.cc: Likewise.
599 * testsuite/experimental/net/execution_context/use_service.cc:
601 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
603 * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
604 * testsuite/experimental/net/internet/address/v4/creation.cc:
606 * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
607 * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
608 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
610 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
612 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
613 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
614 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
616 * include/experimental/socket (basic_socket::at_mark): Add missing
619 * acinclude.m4 (GLIBCXX_CHECK_RANDOM_TR1): Replace with ...
620 (GLIBCXX_CHECK_DEV_RANDOM): New macro with more descriptive name.
621 Define _GLIBCXX_USE_DEV_RANDOM as well as _GLIBCXX_USE_RANDOM_TR1.
622 * config.h.in: Regenerate.
623 * configure: Regenerate.
624 * configure.ac: Use GLIBCXX_CHECK_DEV_RANDOM instead of
625 GLIBCXX_CHECK_RANDOM_TR1.
626 crossconfig.m4: Likewise.
627 * include/bits/random.h (random_device): Use _GLIBCXX_USE_DEV_RANDOM
628 instead of _GLIBCXX_USE_RANDOM_TR1.
629 * testsuite/26_numerics/random/random_device/cons/token.cc: Likewise.
631 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
633 * testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
634 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
635 Add dg-add-options net_ts.
636 * testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
637 * testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
638 * testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
639 * testsuite/experimental/net/internet/resolver/base.cc: Likewise.
640 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
641 * testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.
643 2018-10-16 Jonathan Wakely <jwakely@redhat.com>
645 * testsuite/20_util/duration/literals/range_neg.cc: Adjust pruned
646 diagnostic to account for quotes around 'constexpr'.
647 * testsuite/23_containers/deque/capacity/max_size.cc: Define static
649 * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
652 * config/abi/pre/gnu.ver: Fix typos in patterns for basic_stringbuf.
653 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: Disable
654 optimisation to check constructor definition can be linked to.
655 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: Likewise.
657 2018-10-15 Jonathan Wakely <jwakely@redhat.com>
659 * testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
660 account for change to glibc it_IT localedata (glibc bz#10797).
663 * src/c++11/cxx11-shim_facets.cc: Suppress -Wabi warnings.
665 2018-10-15 François Dumont <fdumont@gcc.gnu.org>
667 * include/debug/vector (vector<>::cbegin()): Use C++11 direct
669 (vector<>::cend()): Likewise.
670 (vector<>::emplace(const_iterator, _Args&&...)): Likewise and use
671 consistent iterator comparison.
672 (vector<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
673 (vector<>::insert(const_iterator, _InputIterator, _InputIterator)):
675 (vector<>::erase(const_iterator)): Likewise.
676 (vector<>::erase(const_iterator, const_iterator)): Likewise.
678 2018-10-12 Jonathan Wakely <jwakely@redhat.com>
680 Initial commit of Networking TS implementation.
681 * include/Makefile.am: Add new headers.
682 * include/Makefile.in: Regenerate.
683 * include/experimental/bits/net.h: New header for common
684 implementation details of Networking TS.
685 * include/experimental/buffer: New header.
686 * include/experimental/executor: New header.
687 * include/experimental/internet: New header.
688 * include/experimental/io_context: New header.
689 * include/experimental/net: New header.
690 * include/experimental/netfwd: New header.
691 * include/experimental/socket: New header.
692 * include/experimental/timer: New header.
693 * testsuite/experimental/net/buffer/arithmetic.cc: New test.
694 * testsuite/experimental/net/buffer/const.cc: New test.
695 * testsuite/experimental/net/buffer/creation.cc: New test.
696 * testsuite/experimental/net/buffer/mutable.cc: New test.
697 * testsuite/experimental/net/buffer/size.cc: New test.
698 * testsuite/experimental/net/buffer/traits.cc: New test.
699 * testsuite/experimental/net/execution_context/use_service.cc: New
701 * testsuite/experimental/net/headers.cc: New test.
702 * testsuite/experimental/net/internet/address/v4/comparisons.cc: New
704 * testsuite/experimental/net/internet/address/v4/cons.cc: New test.
705 * testsuite/experimental/net/internet/address/v4/creation.cc: New
707 * testsuite/experimental/net/internet/address/v4/members.cc: New
709 * testsuite/experimental/net/internet/resolver/base.cc: New test.
710 * testsuite/experimental/net/internet/resolver/ops/lookup.cc: New
712 * testsuite/experimental/net/internet/resolver/ops/reverse.cc: New
714 * testsuite/experimental/net/timer/waitable/cons.cc: New test.
715 * testsuite/experimental/net/timer/waitable/dest.cc: New test.
716 * testsuite/experimental/net/timer/waitable/ops.cc: New test.
719 * include/experimental/memory_resource (__resource_adaptor_imp): Do
720 not allocate sizes smaller than alignment when relying on guaranteed
722 * testsuite/experimental/memory_resource/new_delete_resource.cc:
723 Adjust expected number of bytes allocated for alignof(max_align_t).
725 2018-10-11 François Dumont <fdumont@gcc.gnu.org>
727 * include/debug/forward_list
728 (forward_list<>::before_begin()): Use C++11 direct initialization.
729 (forward_list<>::begin()): Likewise.
730 (forward_list<>::end()): Likewise.
731 (forward_list<>::cbefore_begin()): Likewise.
732 (forward_list<>::cbegin()): Likewise.
733 (forward_list<>::cend()): Likewise.
734 (forward_list<>::emplace_after<>(const_iterator, _Args&&...)): Likewise.
735 (forward_list<>::insert_after(const_iterator, const _Tp&)): Likewise.
736 (forward_list<>::insert_after(const_iterator, _Tp&&)): Likewise.
737 (forward_list<>::insert_after(const_iterator, size_type, const _Tp&)):
739 (forward_list<>::insert_after(const_iterator, initializer_list<>)):
741 (forward_list<>::erase_after(const_iterator)): Likewise.
742 (forward_list<>::erase_after(const_iterator, const_iterator)): Likewise
743 and ensure consistent iterator comparison.
745 * include/bits/forward_list.h
746 (_Fwd_list_iterator<>::operator==): Replace member function with inline
748 (_Fwd_list_iterator<>::operator!=): Likewise.
749 (_Fwd_list_const_iterator<>::operator==): Likewise.
750 (_Fwd_list_const_iterator<>::operator!=): Likewise.
751 (operator==(const _Fwd_list_iterator<>&,
752 const _Fwd_list_const_iterator<>&)): Remove.
753 (operator!=(const _Fwd_list_iterator<>&,
754 const _Fwd_list_const_iterator<>&)): Remove.
755 (forward_list<>::_Node): Take typedef from base type.
756 (forward_list<>::iterator): Likewise.
757 (forward_list<>::const_iterator): Likewise.
759 2018-10-11 Jonathan Wakely <jwakely@redhat.com>
762 * src/c++11/thread.cc (this_thread::__sleep_for)
763 [_GLIBCXX_HAVE_SLEEP]: Only call sleep for non-zero values.
764 Loop while sleep call is interrupted and until steady_clock
765 shows requested duration has elapsed.
766 (!_GLIBCXX_HAVE_USLEEP]: Use the _GLIBCXX_HAVE_SLEEP code path, but
767 avoiding the usleep call.
768 * testsuite/30_threads/this_thread/60421.cc: Test repeated
769 signal interruptions.
771 * include/bits/allocator.h
772 (operator==(const allocator<_Tp>&, const allocator<_Tp>))
773 (operator!=(const allocator<_Tp>&, const allocator<_Tp>)): Replace
775 * include/ext/debug_allocator.h (operator==, operator!=): Replace
776 with inline friend functions that compare to rebound allocators.
777 * include/ext/malloc_allocator.h (operator==, operator!=): Likewise.
778 * include/ext/new_allocator.h (operator==, operator!=): Likewise.
779 * testsuite/ext/debug_allocator/eq.cc: New test.
780 * testsuite/ext/ext_pointer/alloc_eq.cc: New test.
781 * testsuite/ext/malloc_allocator/eq.cc: New test.
782 * testsuite/ext/new_allocator/eq.cc: New test.
784 2018-10-10 Jonathan Wakely <jwakely@redhat.com>
787 * include/bits/stl_vector.h (vector::_S_max_size): Limit size to
788 PTRDIFF_MAX / sizeof(value_type).
789 * include/ext/malloc_allocator.h (malloc_allocator::max_size):
791 * include/ext/new_allocator.h (new_allocator::max_size): Likewise.
792 * testsuite/23_containers/vector/allocator/minimal.cc: Adjust
793 expected value for max_size().
794 * testsuite/23_containers/vector/capacity/87544.cc: New test.
796 2018-10-09 François Dumont <fdumont@gcc.gnu.org>
798 * include/bits/stl_list.h
799 (_List_operator<>::operator==): Replace member function with inline
801 (_List_operator<>::operator!=): Likewise.
802 (_List_const_operator<>::operator==): Likewise.
803 (_List_const_operator<>::operator!=): Likewise.
804 (operator==(const _List_iterator<>&, const _List_const_iterator<>&)):
806 (operator!=(const _List_iterator<>&, const _List_const_iterator<>&)):
809 2018-10-09 Jonathan Wakely <jwakely@redhat.com>
811 * include/bits/stringfwd.h (string, wstring, u16string, u32string):
812 Define typedefs outside of __cxx11 inline namespace.
813 * python/libstdcxx/v6/printers.py (register_type_printers): Also
814 register printers for typedefs in new location.
816 2018-10-08 Jonathan Wakely <jwakely@redhat.com>
819 * testsuite/experimental/functional/87538.cc: New test.
822 * include/std/functional (_Not_fn::operator()): Check value of
823 __is_nothrow_invocable as well.
824 * testsuite/20_util/function_objects/not_fn/87538.cc: New test.
826 2018-10-08 François Dumont <fdumont@gcc.gnu.org>
828 * include/debug/list (list<>::cbegin()): Use C++11 direct
830 (list<>::cend()): Likewise.
831 (list<>::emplace<>(const_iterator, _Args&&...)): Likewise.
832 (list<>::insert(const_iterator, initializer_list<>)): Likewise.
833 (list<>::insert(const_iterator, size_type, const _Tp&)): Likewise.
834 (list<>::erase(const_iterator, const_iterator)): Ensure consistent
835 iterator comparisons.
836 (list<>::splice(const_iterator, list&&, const_iterator,
837 const_iterator)): Likewise.
839 2018-10-05 François Dumont <fdumont@gcc.gnu.org>
841 * include/bits/stl_tree.h
842 (_Rb_tree_iterator<>::operator==): Make inline friend.
843 (_Rb_tree_iterator<>::operator!=): Likewise.
844 (_Rb_tree_const_iterator<>::operator==): Likewise.
845 (_Rb_tree_const_iterator<>::operator!=): Likewise.
846 (operator==(const _Rb_tree_iterator<>&,
847 const _Rb_tree_const_iterator&)): Remove.
848 (operator!=(const _Rb_tree_iterator<>&,
849 const _Rb_tree_const_iterator&)): Remove.
850 (operator==(const _Rb_tree<>&, const _Rb_tree<>&)): Make inline friend.
851 (operator<(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
852 (operator!=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise and
854 (operator>(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
855 (operator<=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
856 (operator>=(const _Rb_tree<>&, const _Rb_tree<>&)): Likewise.
857 * include/debug/map.h (map<>::erase(const_iterator, const_iterator)):
858 Compare __victim with _Base::cend().
859 * include/debug/multimap.h
860 (multimap<>::erase(const_iterator, const_iterator)): Likewise.
861 * include/debug/set.h (set<>::erase(const_iterator, const_iterator)):
862 Compare __victim with _Base::cend().
863 * include/debug/multiset.h
864 (multiset<>::erase(const_iterator, const_iterator)): Likewise.
866 2018-10-03 Jonathan Wakely <jwakely@redhat.com>
869 * src/c++98/locale.cc (locale::locale(const locale&)): Bypass
870 reference count updates for the classic locale.
871 (locale::~locale()): Likewise.
872 (locale::operator=(const locale&)): Likewise.
873 * src/c++98/locale_init.cc (locale::locale()): Likewise.
874 (locale::global(const locale&)): Likewise.
876 2018-10-03 François Dumont <fdumont@gcc.gnu.org>
878 * include/debug/map.h
879 (map<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
880 (map<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
881 (map<>::insert(value_type&&)): Likewise.
882 (map<>::insert<>(_Pair&&)): Likewise.
883 (map<>::insert<>(const_iterator, _Pair&&)): Likewise.
884 (map<>::try_emplace): Likewise.
885 (map<>::insert_or_assign): Likewise.
886 (map<>::insert(node_type&&)): Likewise.
887 (map<>::insert(const_iterator, node_type&&)): Likewise.
888 (map<>::erase(const_iterator)): Likewise.
889 (map<>::erase(const_iterator, const_iterator)): Likewise.
890 * include/debug/multimap.h
891 (multimap<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
892 (multimap<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
893 (multimap<>::insert<>(_Pair&&)): Likewise.
894 (multimap<>::insert<>(const_iterator, _Pair&&)): Likewise.
895 (multimap<>::insert(node_type&&)): Likewise.
896 (multimap<>::insert(const_iterator, node_type&&)): Likewise.
897 (multimap<>::erase(const_iterator)): Likewise.
898 (multimap<>::erase(const_iterator, const_iterator)): Likewise.
899 * include/debug/set.h
900 (set<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
901 (set<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
902 (set<>::insert(value_type&&)): Likewise.
903 (set<>::insert<>(const_iterator, value_type&&)): Likewise.
904 (set<>::insert(const_iterator, node_type&&)): Likewise.
905 (set<>::erase(const_iterator)): Likewise.
906 (set<>::erase(const_iterator, const_iterator)): Likewise.
907 * include/debug/multiset.h
908 (multiset<>::emplace<>(_Args&&...)): Use C++11 direct initialization.
909 (multiset<>::emplace_hint<>(const_iterator, _Args&&...)): Likewise.
910 (multiset<>::insert<>(value_type&&)): Likewise.
911 (multiset<>::insert<>(const_iterator, value_type&&)): Likewise.
912 (multiset<>::insert(node_type&&)): Likewise.
913 (multiset<>::insert(const_iterator, node_type&&)): Likewise.
914 (multiset<>::erase(const_iterator)): Likewise.
915 (multiset<>::erase(const_iterator, const_iterator)): Likewise.
917 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
920 * include/bits/stl_bvector.h (vector::begin(), vector::cbegin()):
921 Rebuild _M_start with an explicit 0 offset.
923 2018-10-02 Jonathan Wakely <jwakely@redhat.com>
925 * include/std/variant (__gen_vtable_impl::__visit_invoke): Call __get
926 directly instead of get, as caller ensures correct index is used.
927 (holds_alternative, get, get_if): Remove redundant inline specifiers.
928 (_VARIANT_RELATION_FUNCTION_TEMPLATE): Likewise.
930 2018-10-02 Joseph Myers <joseph@codesourcery.com>
932 * testsuite/lib/libstdc++.exp (libstdc++_init): Use
933 -fno-show-column in default cxxflags.
935 2018-10-01 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
937 * config/os/uclibc/os_defines.h (__NO_STRING_INLINES): Delete.
939 2018-10-01 Gerald Pfeifer <gerald@pfeifer.com>
941 * doc/xml/manual/allocator.xml: Adjust link to "Reconsidering
942 Custom Memory Allocation".
944 2018-10-01 Jonathan Wakely <jwakely@redhat.com>
946 * doc/html/*: Regenerate.
948 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
950 * doc/xml/manual/messages.xml: Switch link to www.oracle.com
953 2018-09-30 Gerald Pfeifer <gerald@pfeifer.com>
955 * doc/xml/manual/policy_data_structures_biblio.xml: Update
956 link to Microsoft Component Model Object Technologies.
958 2018-09-29 Gerald Pfeifer <gerald@pfeifer.com>
960 * doc/xml/gnu/fdl-1.3.xml: The Free Software Foundation web
961 site now uses https. Also omit the unnecessary trailing slash.
962 * doc/xml/gnu/gpl-3.0.xml: Ditto.
964 2018-09-28 François Dumont <fdumont@gcc.gnu.org>
966 * include/debug/functions.h
967 (__foreign_iterator_aux3(const _Safe_iterator<>&, const _InputeIter&,
968 const _InputIter&, __true_type)): Use empty() rather than begin() ==
971 2018-09-25 Mike Crowe <mac@mcrowe.com>
973 * include/std/condition_variable (condition_variable::wait_for): Use
974 steady clock in overload that uses a predicate.
976 2018-09-25 Jonathan Wakely <jwakely@redhat.com>
979 * include/std/variant (_Variant_storage<true, _Types...>::_M_valid):
980 Avoid runtime test when all alternatives are scalars and so cannot
981 throw during initialization.
983 2018-09-25 Gerald Pfeifer <gerald@pfeifer.com>
985 * doc/xml/manual/codecvt.xml: Move link to "UTF-8 and Unicode FAQ"
988 2018-09-24 Gerald Pfeifer <gerald@pfeifer.com>
990 * doc/xml/manual/policy_data_structures_biblio.xml: Update link
991 to "Priority Queues and the STL".
993 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
995 * doc/xml/manual/using_exceptions.xml: Move boost.orgs link to
998 2018-09-21 François Dumont <fdumont@gcc.gnu.org>
1001 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt):
1002 Use __builtin_floor to compute _M_next_resize.
1003 * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt.
1004 * testsuite/23_containers/unordered_set/hash_policy/prime_rehash.cc:
1007 2018-09-21 Jonathan Wakely <jwakely@redhat.com>
1009 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Remove.
1010 * testsuite/26_numerics/headers/cmath/hypot.cc: Restore test for
1011 long double unconditionally, but use lower tolerance when
1012 sizeof(long double) == sizeof(double).
1014 2018-09-20 Christophe Lyon <christophe.lyon@linaro.org>
1016 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: Skip
1019 2018-09-19 Jonathan Wakely <jwakely@redhat.com>
1021 * include/bits/regex_automaton.tcc (_StateSeq<_TraitsT>::_M_clone()):
1022 Remove __glibcxx_assert statements and use map::find instead of
1025 2018-09-18 François Dumont <fdumont@gcc.gnu.org>
1028 * src/c++11/hashtable_c++0x.cc:
1029 (_Prime_rehash_policy::_M_next_bkt): Return a prime no smaller than
1030 requested size, but not necessarily greater.
1031 (_Prime_rehash_policy::_M_need_rehash): Rehash only if target size is
1032 strictly greater than next resize threshold.
1033 * testsuite/23_containers/unordered_map/modifiers/reserve.cc: Adapt test
1034 to validate that there is no rehash as long as number of insertion is
1035 lower or equal to the reserved number of elements.
1037 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
1039 * include/bits/unique_ptr.h (__uniq_ptr_impl): Remove static assertion
1040 checking invocable condition.
1041 (unique_ptr::~unique_ptr, unique_ptr::reset): Restore static assertion
1042 here, where types must be complete. Pass pointer to deleter as an
1044 * testsuite/20_util/unique_ptr/requirements/incomplete.cc: New test.
1046 2018-09-13 Jonathan Wakely <jwakely@redhat.com>
1048 * include/std/variant (variant) [__clang__]: Limit workaround to
1051 2018-09-11 Jonathan Wakely <jwakely@redhat.com>
1054 * include/bits/shared_ptr.h (make_shared): Use remove_cv instead of
1056 * testsuite/20_util/shared_ptr/creation/87278.cc: New test.
1058 Implement LWG 2905 changes to constrain unique_ptr constructors
1059 * include/bits/unique_ptr.h (__uniq_ptr_impl): Add assertions to
1061 (unique_ptr::unique_ptr(pointer, const deleter_type&)): Add copy
1062 constructible constraint.
1063 (unique_ptr::unique_ptr(pointer, deleter_type&&)): Disable for
1064 deleters of reference type and add move constructible constraint.
1065 (unique_ptr::unique_ptr(pointer, remove_reference_t<deleter_type>&&)):
1066 Disable for deleters of non-reference type. Define as deleted.
1067 (unique_ptr<T[], D>): Likewise.
1068 * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Replace dg-error
1069 directives with unstable line numbers with dg-prune-output.
1070 * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
1071 * testsuite/20_util/unique_ptr/cons/lwg2905.cc: New test.
1072 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
1073 Make deleter types invocable.
1075 2018-09-05 Jonathan Wakely <jwakely@redhat.com>
1077 * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment.
1079 2018-09-03 Jonathan Wakely <jwakely@redhat.com>
1082 * testsuite/26_numerics/headers/cmath/hypot-long-double.cc: New test
1083 that runs the long double part of hypot.cc.
1084 * testsuite/26_numerics/headers/cmath/hypot.cc: Disable long double
1085 tests unless TEST_HYPOT_LONG_DOUBLE is defined.
1087 * include/bits/stl_vector.h (vector::_Temporary_value::_M_ptr):
1088 Return raw pointer not allocator's pointer type.
1089 (vector::_Temporary_value::_M_val): Use _M_ptr.
1092 * include/bits/stl_map.h
1093 (map::map(initializer_list<value_type>, const Compare&, const Alloc&))
1094 (map::map(initializer_list<value_type>, const Alloc&))
1095 (map::map(InputIterator, InputIterator, const Alloc&))
1096 (map::map(InputIterator, InputIterator))
1097 (map::map(InputIterator, InputIterator, const Compare&, const Alloc&))
1098 (map::insert(InputIterator, InputIterator)):
1099 Call _M_insert_range_unique instead of _M_insert_unique.
1100 * include/bits/stl_multimap.h
1101 (multimap::multimap(initializer_list<value_type>, const C&, const A&))
1102 (multimap::multimap(initializer_list<value_type>, const A&))
1103 (multimap::multimap(InputIterator, InputIterator, const A&))
1104 (multimap::multimap(InputIterator, InputIterator))
1105 (multimap::multimap(InputIterator, InputIterator, const C&, const A&))
1106 (multimap::insert(InputIterator, InputIterator)): Call
1107 _M_insert_range_equal instead of _M_insert_equal.
1108 * include/bits/stl_multiset.h
1109 (multiset::multiset(InputIterator, InputIterator))
1110 (multiset::multiset(InputIterator, InputIterator, const C&, const A&))
1111 (multiset::multiset(initializer_list<value_type>, const C&, const A&))
1112 (multiset::multiset(initializer_list<value_type>, const A&))
1113 (multiset::multiset(InputIterator, InputIterator, const A&))
1114 (multiset::insert(InputIterator, InputIterator)): Call
1115 _M_insert_range_equal instead of _M_insert_equal.
1116 * include/bits/stl_set.h
1117 (set::set(InputIterator, InputIterator))
1118 (set::set(InputIterator, InputIterator, const Compare&, const Alloc&))
1119 (set::set(initializer_list<value_type>, const Compare&, const Alloc&))
1120 (set::set(initializer_list<value_type>, const Alloc&))
1121 (set::set(InputIterator, InputIterator, const Alloc&))
1122 (set::insert(InputIterator, InputIterator)):
1123 Call _M_insert_range_unique instead of _M_insert_unique.
1124 * include/bits/stl_tree.h
1125 [__cplusplus >= 201103L] (_Rb_tree::__same_value_type): New alias
1126 template for SFINAE constraints.
1127 [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_unique): Pair of
1128 constrained overloads that either insert or emplace, depending on
1129 iterator's value_type.
1130 [__cplusplus >= 201103L] (_Rb_tree::_M_insert_range_equal): Likewise.
1131 [__cplusplus < 201103L] (_Rb_tree::_M_insert_range_unique)
1132 (_Rb_tree::_M_insert_range_equal): New functions replacing range
1133 versions of _M_insert_unique and _M_insert_equal.
1134 (_Rb_tree::_M_insert_unique(_InputIterator, _InputIterator))
1135 (_Rb_tree::_M_insert_equal(_InputIterator, _InputIterator)): Remove.
1136 * testsuite/23_containers/map/modifiers/insert/87194.cc: New test.
1137 * testsuite/23_containers/multimap/modifiers/insert/87194.cc: New test.
1138 * testsuite/23_containers/multiset/modifiers/insert/87194.cc: New test.
1139 * testsuite/23_containers/set/modifiers/insert/87194.cc: New test.
1142 * include/bits/stl_map.h (map::insert(_Pair&&))
1143 (map::insert(const_iterator, _Pair&&)): Do emplace instead of insert.
1144 * include/bits/stl_multimap.h (multimap::insert(_Pair&&))
1145 (multimap::insert(const_iterator, _Pair&&)): Likewise.
1146 * include/bits/unordered_map.h (unordered_map::insert(_Pair&&))
1147 (unordered_map::insert(const_iterator, _Pair&&))
1148 (unordered_multimap::insert(_Pair&&))
1149 (unordered_multimap::insert(const_iterator, _Pair&&)): Likewise.
1150 * testsuite/23_containers/map/modifiers/insert/78595.cc: New test.
1151 * testsuite/23_containers/multimap/modifiers/insert/78595.cc: New test.
1152 * testsuite/23_containers/unordered_map/modifiers/78595.cc: New test.
1153 * testsuite/23_containers/unordered_multimap/modifiers/78595.cc: New
1156 2018-09-02 François Dumont <fdumont@gcc.gnu.org>
1158 * include/debug/safe_iterator.h
1159 (_Safe_iterator<_It, _Seq, _Cat>::_Self): New.
1160 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>::_Self):
1162 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1164 (_GLIBCXX_DEBUG_VERIFY_OPERANDS, _GLIBCXX_DEBUG_VERIFY_EQ_OPERANDS)
1165 (_GLIBCXX_DEBUG_VERIFY_REL_OPERANDS)
1166 (_GLIBCXX_DEBUG_VERIFY_DIST_OPERANDS): Define macros.
1167 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1168 ::operator+(difference_type)): Use latters, inline as friend.
1169 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1170 ::operator-(difference_type)): Likewise.
1171 (operator==(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1173 (operator!=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1175 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1176 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1178 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1179 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1181 (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1182 (operator+(difference_type, const _Safe_iterator<>&)): Likewise.
1183 (operator-(const _Safe_iterator<>&, difference_type)): Likewise.
1184 * include/debug/safe_iterator.tcc
1185 (_Safe_iterator<>::_M_can_advance(difference_type)): Take parameter by
1187 * include/debug/safe_local_iterator.h
1188 (_Safe_local_iterator<_It, _Seq>::_Self): New.
1189 (_Safe_local_iterator<_It, _Seq>::_OtherSelf): New.
1190 (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Define macro.
1191 (operator==(const _Safe_local_iterator<>&,
1192 const _Safe_local_iterator<>&)): Use latter, inline as friend.
1193 (operator!=(const _Safe_local_iterator<>&,
1194 const _Safe_local_iterator<>&)): Likewise.
1195 * testsuite/util/testsuite_containers.h: Include utility.
1196 (struct forward_members_unordered<_Tp, bool>): Remove 2nd template
1198 (forward_members_unordered<>::forward_members_unordered(value_type&)):
1199 Add using namespace std::rel_ops.
1200 Add iterator_concept_checks on local_iterator and const_local_iterator.
1201 Add asserts on comparison between const_local_iterator and
1203 (struct forward_members_unordered<_Tp, false>): Remove partial
1205 * testsuite/23_containers/forward_list/types/1.cc: New.
1206 * testsuite/23_containers/list/types/1.cc: New.
1208 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
1210 * doc/xml/manual/profile_mode.xml: Update three ieeexplore.ieee.org
1213 2018-08-31 Sandra Loosemore <sandra@codesourcery.com>
1215 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/10.cc:
1216 Add dg-require-fileio.
1217 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/11.cc:
1219 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/5.cc:
1221 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
1223 * testsuite/25_algorithms/copy/streambuf_iterators/wchar_t/4.cc:
1225 * testsuite/25_algorithms/find/istreambuf_iterators/wchar_t/2.cc:
1227 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-1.cc: Likewise.
1228 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-2.cc: Likewise.
1229 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-3.cc: Likewise.
1230 * testsuite/27_io/basic_filebuf/close/wchar_t/12790-4.cc: Likewise.
1231 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/11543.cc: Likewise.
1232 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-1.cc:
1234 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-2.cc:
1236 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-3.cc:
1238 * testsuite/27_io/basic_filebuf/seekoff/wchar_t/12790-4.cc:
1240 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-1.cc:
1242 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-2.cc:
1244 * testsuite/27_io/basic_filebuf/seekpos/wchar_t/12790-4.cc:
1246 * testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc: Likewise.
1247 * testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc: Likewise.
1248 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: Likewise.
1249 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: Likewise.
1250 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
1252 * testsuite/27_io/basic_istream/extractors_other/wchar_t/2.cc:
1254 * testsuite/27_io/basic_istream/get/wchar_t/2.cc: Likewise.
1255 * testsuite/27_io/basic_istream/getline/wchar_t/5.cc: Likewise.
1256 * testsuite/27_io/basic_istream/ignore/wchar_t/2.cc: Likewise.
1257 * testsuite/27_io/basic_istream/ignore/wchar_t/3.cc: Likewise.
1258 * testsuite/27_io/basic_istream/seekg/wchar_t/sstream.cc: Likewise.
1259 * testsuite/27_io/basic_istream/tellg/wchar_t/sstream.cc: Likewise.
1260 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: Likewise.
1261 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: Likewise.
1262 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/1.cc:
1264 * testsuite/27_io/objects/wchar_t/10.cc: Likewise.
1265 * testsuite/27_io/objects/wchar_t/12048-1.cc: Likewise.
1266 * testsuite/27_io/objects/wchar_t/12048-2.cc: Likewise.
1267 * testsuite/27_io/objects/wchar_t/12048-3.cc: Likewise.
1268 * testsuite/27_io/objects/wchar_t/12048-4.cc: Likewise.
1269 * testsuite/27_io/objects/wchar_t/12048-5.cc: Likewise.
1270 * testsuite/experimental/string_view/inserters/wchar_t/2.cc:
1272 * testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc: Likewise.
1274 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
1276 * testsuite/experimental/propagate_const/observers/1.cc: Make
1277 dependence on -fdelete-null-pointer-checks explicit.
1279 2018-08-30 Jonathan Wakely <jwakely@redhat.com>
1281 * include/bits/hashtable_policy.h (__clp2): Fix calculation for LLP64
1282 targets where sizeof(size_t) > sizeof(long). Avoid undefined shifts
1283 of the number of bits in the type.
1284 * include/std/bit (__ceil2): Avoid undefined shifts.
1285 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Test values with
1286 the most signifiant bit set.
1288 * config/abi/pre/gnu.ver: Add missing exports for mingw.
1290 * include/ext/pointer.h (_Pointer_adapter): Define operators for
1291 pointer arithmetic using long long offsets.
1292 * testsuite/ext/ext_pointer/1.cc: Test pointer arithmetic using
1295 2018-08-29 Jonathan Wakely <jwakely@redhat.com>
1298 * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Check D_FMT
1299 string for alternative format.
1301 2018-08-28 Jonathan Wakely <jwakely@redhat.com>
1304 * src/filesystem/std-path.cc (path::lexically_normal): When handling
1305 a dot-dot filename, preserve an empty final component in the iteration
1307 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for
1309 * testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests
1310 for more than two adjacent dot-dot filenames.
1311 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with
1312 preferred-separator in expected normalized strings.
1314 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
1317 * configure.host (OPT_LDFLAGS): Don't append
1318 -fvisibility-inlines-hidden for newer Darwin.
1320 2018-08-24 Marc Glisse <marc.glisse@inria.fr>
1323 * libsupc++/new (operator new(size_t, nothrow_t), operator
1324 new[](size_t, nothrow_t), operator new(size_t, align_val_t, nothrow_t),
1325 operator new[](size_t, align_val_t, nothrow_t)): Add malloc attribute.
1327 2018-08-24 Jonathan Wakely <jwakely@redhat.com>
1329 * include/debug/deque (std::__debug::deque): Declare.
1330 * include/debug/forward_list (std::__debug::forward_list): Declare.
1331 * include/debug/list (std::__debug::list): Declare.
1332 * include/debug/map (std::__debug::map): Declare.
1333 * include/debug/set (std::__debug::set): Declare.
1334 * include/debug/unordered_map (std::__debug::unordered_map): Declare.
1335 * include/debug/unordered_set (std::__debug::unordered_set): Declare.
1336 * include/debug/vector (std::__debug::vector): Declare.
1337 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc: New test.
1338 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc: New
1340 * testsuite/23_containers/list/pmr_typedefs_debug.cc: New test.
1341 * testsuite/23_containers/map/pmr_typedefs_debug.cc: New test.
1342 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc: New test.
1343 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc: New test.
1344 * testsuite/23_containers/set/pmr_typedefs_debug.cc: New test.
1345 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc: New
1347 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
1349 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
1351 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc: New
1353 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
1354 Adjust dg-error lineno.
1355 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc: New
1358 2018-08-23 Jonathan Wakely <jwakely@redhat.com>
1360 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
1361 Only define when RTTI is enabled.
1363 * include/debug/vector (__niter_base): Define for C++98.
1365 * testsuite/25_algorithms/partial_sort_copy/debug/irreflexive_neg.cc:
1366 Fix C++98 test to not use C++11 features.
1367 * testsuite/25_algorithms/fill_n/2.cc: Likewise.
1369 * scripts/check_compile: Fix comments.
1371 * include/debug/string (insert(__const_iterator, _InIter, _InIter)):
1372 [!_GLIBCXX_USE_CXX11_ABI]: Replace use of C++11-only cbegin() with
1373 begin(), for C++98 compatibility.
1375 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
1376 (basic_string::__const_iterator): Change access to protected.
1377 [!_GLIBCXX_USE_CXX11_ABI] (basic_string::__const_iterator): Define
1378 as typedef for iterator.
1379 * include/debug/string (__const_iterator): Use typedef from base.
1380 (insert(const_iterator, _CharT))
1381 (replace(const_iterator, const_iterator, const basic_string&))
1382 (replace(const_iterator, const_iterator, const _CharT*, size_type))
1383 (replace(const_iterator, const_iterator, const CharT*))
1384 (replace(const_iterator, const_iterator, size_type, _CharT))
1385 (replace(const_iterator, const_iterator, _InputIter, _InputIter))
1386 (replace(const_iterator, const_iterator, initializer_list<_CharT>)):
1387 Change const_iterator parameters to __const_iterator.
1388 (insert(iterator, size_type, _CharT)): Add C++98 overload.
1389 (insert(const_iterator, _InputIterator, _InputIterator)): Change
1390 const_iterator parameter to __const_iterator.
1391 [!_GLIBCXX_USE_CXX11_ABI]: Add workaround for incorrect return type
1392 of base's member function.
1393 (insert(const_iterator, size_type, _CharT)) [!_GLIBCXX_USE_CXX11_ABI]:
1395 (insert(const_iterator, initializer_list<_CharT>))
1396 [!_GLIBCXX_USE_CXX11_ABI]: Likewise.
1397 * testsuite/21_strings/basic_string/init-list.cc: Remove effective
1400 * testsuite/20_util/reference_wrapper/lwg2993.cc: Fix C++11 test to
1401 not use C++14 feature.
1402 * testsuite/23_containers/list/68222_neg.cc: Likewise.
1404 * testsuite/21_strings/basic_string/init-list.cc:
1406 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
1408 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1411 * testsuite/23_containers/deque/capacity/max_size.cc: Fix test for
1413 * testsuite/23_containers/deque/modifiers/assign/1.cc: Likewise.
1414 * testsuite/23_containers/list/modifiers/assign/1.cc: Likewise.
1415 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: Likewise.
1416 * testsuite/23_containers/vector/capacity/max_size.cc: Likewise.
1417 * testsuite/23_containers/vector/modifiers/assign/1.cc: Likewise.
1419 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
1422 * include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
1423 (experimental::pmr::match_results, experimental::pmr::cmatch)
1424 (experimental::pmr::smatch, experimental::pmr::wcmatch)
1425 (experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
1426 because COW strings don't support C++11 allocator model.
1427 * include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
1428 (experimental::pmr::basic_string, experimental::pmr::string)
1429 (experimental::pmr::u16string, experimental::pmr::u32string)
1430 (experimental::pmr::wstring): Likewise.
1431 * include/std/regex [!_GLIBCXX_USE_CXX11_ABI] (pmr::match_results)
1432 (pmr::cmatch, pmr::smatch, pmr::wcmatch, pmr::wsmatch): Likewise.
1433 * include/std/string [!_GLIBCXX_USE_CXX11_ABI] (pmr::basic_string)
1434 (pmr::string, pmr::u16string, pmr::u32string, pmr::wstring): Likewise.
1435 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Require
1437 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
1440 * include/bits/deque.tcc (deque::_M_range_initialize): Use
1441 _S_check_init_len to check size.
1442 (deque::_M_push_back_aux, deque::_M_push_front_aux): Throw length
1443 error if size would exceed max_size().
1444 * include/bits/stl_deque.h (_Deque_base::size_type): Remove typedef.
1445 (_Deque_base(_Deque_base&&, const allocator_type&, size_t)): Use
1446 size_t instead of size_type.
1447 (deq(size_type, const allocator_type&)
1448 (deq(size_type, const value_type&, const allocator_type&)
1449 (deque::_M_initialize_dispatch): Use _S_check_init_len to check size.
1450 (deque::max_size): Call _S_max_size.
1451 (deque::_S_check_init_len, deque::_S_max_size): New functions.
1452 * include/bits/stl_vector.h (vector(size_type, const allocator_type&))
1453 (vector(size_type, const value_type&, const allocator_type&))
1454 (vector::_M_initialize_dispatch, vector::_M_range_initialize): Use
1455 _S_check_init_len to check size.
1456 (vector::max_size): Call _S_max_size.
1457 (vector::_M_check_len): Prevent max from being expanded as a
1458 function-like macro.
1459 (vector::_S_check_init_len, vector::_S_max_size): New functions.
1460 * include/bits/vector.tcc (vector::_M_assign_aux): Use
1461 _S_check_init_len to check size.
1462 * testsuite/23_containers/deque/capacity/max_size.cc: New test.
1463 * testsuite/23_containers/vector/capacity/max_size.cc: New test.
1465 2018-08-22 François Dumont <fdumont@gcc.gnu.org>
1468 * include/debug/safe_iterator.h
1469 (_Safe_iterator<_It, _Sq, _Cat>): Add category template parameter.
1470 (_Safe_iterator<>::_Const_iterator): Remove.
1471 (_Safe_iterator<>::_IsConstant): New.
1472 (_Safe_iterator<>::_OtherIterator): New.
1473 (_Safe_iterator<_It, _Sq, _Cat>::_Safe_iterator<_MutIte>(
1474 const _Safe_iterator<_MutIte, _Sq, _Cat>&)): Add _IsConstant::__value in
1475 __gnu_cxx::__enable_if condition.
1476 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to): New.
1477 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_from_begin): New.
1478 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to_end): New.
1479 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>): New.
1480 (_Safe_iterator<_It, _Sq, _Cat>::operator--()): Move...
1481 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1482 ::operator--()): ...here.
1483 (_Safe_iterator<_It, _Sq, _Cat>::operator--(int)): Move...
1484 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1485 ::operator--(int)): ...here.
1486 (_Safe_iterator<_It, _Sq, _Cat>::_M_decrementable()): Move...
1487 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
1488 ::_M_decrementable()): ...here.
1489 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>): New.
1490 (_Safe_iterator<_It, _Sq, _Cat>::operator[](const difference_type&)):
1492 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1493 ::operator[](const difference_type&)): ...here.
1494 (_Safe_iterator<_It, _Sq, _Cat>::operator+=(const difference_type&)):
1496 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1497 ::operator+=(const difference_type&)): ...here.
1498 (_Safe_iterator<_It, _Sq, _Cat>::operator+(const difference_type&)):
1500 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1501 ::operator+(const difference_type&)): ...here.
1502 (_Safe_iterator<_It, _Sq, _Cat>::operator-=(const difference_type&)):
1504 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1505 ::operator-=(const difference_type&)): ...here.
1506 (_Safe_iterator<_It, _Sq, _Cat>::operator-(const difference_type&)):
1508 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
1509 ::operator-(const difference_type&)): ...here.
1510 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1511 Constraint to random access iterators.
1512 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1514 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1515 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1517 (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
1518 (operator+(const difference_type&, const _Safe_iterator<>&)): Likewise.
1519 (__check_dereferenceable(const _Safe_iterator<>&)): Remove.
1520 (__get_distance): Remove.
1521 (__get_distance_from_begin): Remove.
1522 (__get_distance_to_end): Remove.
1523 (struct __is_safe_random_iterator<_Safe_iterator<>>): Remove partial
1525 (__base(const _Safe_iterator<>&, std::input_iterator_tag)): Remove.
1526 (__base(const _Safe_iterator<>&, std::random_access_iterator_tag)): Remove.
1527 (__base(const _Safe_iterator<>&)): Constraint to random access iterator.
1528 * include/debug/safe_iterator.tcc
1529 (_Safe_iterator<>::_M_get_distance_from_begin()): New.
1530 (_Safe_iterator<>::_M_get_distance_to_end()): New.
1531 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator<>&)): New.
1532 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
1533 ::_M_valid_range): New.
1534 * include/debug/safe_local_iterator.h
1535 (_Safe_local_iterator<>::_Const_local_iterator): Remove.
1536 (_Safe_local_iterator<>::_IsConstant): New.
1537 (_Safe_local_iterator<>::_OtherIterator): New.
1538 (_Safe_local_iterator<_It, _Cont>::_Safe_local_iterator<_MutIte, _Cont>(
1539 const _Safe_local_iterator<_MutIte, _Seq>&)): Add _IsConstant::__value
1540 in __gnu_cxx::__enable_if condition. If singular compare base iterator
1541 with _MutIte rather than _It.
1542 (_Safe_local_iterator<>::_S_constant): Make constexpr.
1543 (_Safe_local_iterator<>::_M_get_distance_to): New.
1544 (__check_dereferenceable(const _Safe_local_iterator<>&)): Remove.
1545 (__get_distance(const _Safe_local_iterator<>&,
1546 const _Safe_local_iterator<>&, std::input_iterator_tag)): Remove.
1547 (__valid_range(const _Safe_local_iterator<>&,
1548 const _Safe_local_iterator<>&)): New.
1549 * include/debug/safe_local_iterator.tcc
1550 (_Safe_local_iterator<>::_M_get_distance_to): New.
1551 * include/debug/deque (std::__debug::deque<>): Add
1552 ::__gnu_debug::_Safe_iterator<> friend declaration.
1553 * include/debug/forward_list (std::__debug::forward_list<>): Likewise.
1554 * include/debug/list (std::__debug::list<>): Likewise.
1555 * include/debug/map.h (std::__debug::map<>): Likewise.
1556 * include/debug/multimap.h (std::__debug::multimap<>): Likewise.
1557 * include/debug/set.h (std::__debug::set<>): Likewise.
1558 * include/debug/multiset.h (std::__debug::multiset<>): Likewise.
1559 * include/debug/string (std::__debug::basic_string<>): Likewise.
1560 * include/debug/unordered_map (std::__debug::unordered_map<>): Likewise
1561 and add ::__gnu_debug::_Safe_local_iterator<> friend declaration.
1562 (std::__debug::unordered_multimap<>): Likewise.
1563 * include/debug/unordered_set (std::__debug::unordered_set<>): Likewise.
1564 (std::__debug::unordered_multiset<>): Likewise.
1565 * include/debug/formatter.h: Adapt.
1566 * include/debug/helper_functions.h
1567 (__gnu_debug::_Safe_local_iterator<>): Add declaration.
1568 (__get_distance<_Ite>(_Ite, _Ite, std::random_access_iterator_tag):
1569 Pass parameter by copy.
1570 (__get_distance<_Ite>(_Ite, _Ite, std::input_iterator_tag): Likewise.
1571 (__get_distance<_Ite>(_Ite, _Ite): Likewise.
1572 (__valid_range_aux<_Integral>): Pass _Integral by copy.
1573 (__valid_range<_InputIterator>): Pass _InputIterator by copy.
1574 (__valid_range<>(const _Safe_iterator<>&,
1575 const _Safe_iterator<>&, typename _Distance_traits<>::__type&)):
1577 (__valid_range(const _Safe_local_iterator<>&,
1578 const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
1580 (__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
1582 (__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
1584 (__can_advance): Adapt.
1585 (struct __is_safe_random_iterator<>): Remove.
1586 (struct _SIter_base<>): Remove.
1587 * include/debug/functions.h: Include <bits/stl_iterator.h>.
1588 (__check_dereferenceable): Remove.
1589 (__foreign_iterator_aux4, __foreign_iterator_aux3): Adapt.
1590 (__foreign_iterator_aux2, __foreign_iterator_aux): Adapt.
1591 (__foreign_iterator): Adapt.
1592 * include/debug/stl_iterator.h
1593 (__is_safe_random_iterator<std::reverse_iterator<>>): Remove.
1594 (__base(const std::reverse_iterator<_Safe_iterator<_It, _Sq>)):
1595 Constraint for random access iterators.
1596 (__niter_base): Adapt.
1597 * testsuite/util/testsuite_containers.h:
1598 Include <bits/boost_concept_check.h>.
1599 (iterator_concept_checks<_It, _Mutable, _Category>): New.
1600 (citerator<_Cont>::forward_members::forward_members()): Instantiate
1601 latter for container iterator and const_iterator.
1602 * testsuite/23_containers/list/68222_neg.cc: New.
1603 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: Adapt
1605 * testsuite/23_containers/unordered_set/debug/debug_functions.cc:
1607 * testsuite/23_containers/vector/debug/debug_functions.cc (test01):
1610 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
1613 * doc/xml/manual/status_cxx1998.xml: Document size_type and
1614 difference_type for containers.
1615 * doc/html/*: Regenerate.
1617 2018-08-21 François Dumont <fdumont@gcc.gnu.org>
1619 P0646R1 Improving the Return Value of Erase-Like Algorithms I
1620 * include/debug/forward_list (forward_list::__remove_return_type):
1621 Define typedef as size_type or void, according to __cplusplus value.
1622 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1623 empty, according to __cplusplus value.
1624 (_GLIBCXX20_ONLY): Define macro.
1625 (forward_list::remove, forward_list::unique): Use typedef and macro
1626 to change return type and add abi-tag for C++2a. Return number of
1627 removed elements for C++2a.
1628 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
1629 typedef to change return type for C++2a. Return number of removed
1631 * include/debug/list (list::__remove_return_type): Define typedef as
1632 size_type or void, according to __cplusplus value.
1633 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1634 empty, according to __cplusplus value.
1635 (_GLIBCXX20_ONLY): Define macro.
1636 (list::remove, list::unique): Use typedef and macro to change return
1637 type and add abi-tag for C++2a. Return number of removed elements for
1639 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef
1640 to change return type for C++2a. Return number of removed elements for
1643 2018-08-21 David Edelsohn <dje.gcc@gmail.com>
1645 * testsuite/18_support/new_nothrow.cc: XFAIL on AIX.
1647 2018-08-21 Jonathan Wakely <jwakely@redhat.com>
1649 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Remove
1650 redundant dg-do directive.
1651 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
1652 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
1653 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
1654 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
1656 2018-08-20 Jonathan Wakely <jwakely@redhat.com>
1659 * include/std/tuple (_Tuple_impl::operator=): Define as deleted.
1660 (_Tuple_impl::_M_assign): New functions to perform assignment instead
1661 of assignment operators.
1662 (_Tuple_impl::_M_swap): Remove exception specification.
1663 (_Tuple_impl<_Idx, _Head>): Likewise.
1664 (_TC::_NonNestedTuple, _TC::_NotSameTuple): Use __remove_cvref_t.
1665 (__tuple_base): Remove.
1666 (tuple, tuple<_T1, _T2>): Remove inheritance from __tuple_base.
1667 (tuple::operator=, tuple<_T1, _T2>::operator=): Call _M_assign.
1668 (tuple::swap, tuple<_T1, _T2>::swap): Define exception specification
1669 using __is_nothrow_swappable.
1670 (tuple<_T1, _T2>::tuple(_U1&&, _U2&&)): Use __remove_cvref_t.
1672 * include/std/optional (_Optional_payload): Use variable templates
1673 for conditions in default template arguments and exception
1675 (optional): Likewise. Adjust indentation.
1676 (optional::__not_self, optional::__not_tag, optional::_Requires): New
1678 (optional::optional): Use new helpers in constructor constraints.
1679 * include/std/type_traits (__or_v, __and_v): New variable templates.
1680 * testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
1681 dg-prune-output. Remove unused header.
1683 2018-08-18 François Dumont <fdumont@gcc.gnu.org>
1685 * testsuite/25_algorithms/copy/86658.cc: Use dg-options to define
1688 2018-08-17 Jonathan Wakely <jwakely@redhat.com>
1691 * include/std/tuple (__tuple_base): New class template with deleted
1692 copy assignment operator.
1693 (tuple, tuple<_T1, _T2>): Derive from __tuple_base<tuple> so that
1694 implicit copy/move assignment operator will be deleted/suppressed.
1695 (tuple::__assignable, tuple<_T1, _T2>::__assignable): New helper
1696 functions for SFINAE constraints on assignment operators.
1697 (tuple::__nothrow_assignable, tuple<_T1, _T2>::__nothrow_assignable):
1698 New helper functions for exception specifications.
1699 (tuple::operator=(const tuple&), tuple::operator=(tuple&&))
1700 (tuple<_T1, _T2>::operator=(const tuple&))
1701 (tuple<_T1, _T2>::operator=(tuple&&)): Change parameter types to
1702 __nonesuch_no_braces when the operator should be defined implicitly.
1703 Use __nothrow_assignable for exception specifications.
1704 (tuple::operator=(const tuple<_UElements...>&))
1705 (tuple::operator=(tuple<_UElements...>&&))
1706 (tuple<_T1, _T2>::operator=(const tuple<_U1, _U2>&))
1707 (tuple<_T1, _T2>::operator=(tuple<_U1, _U2>&&))
1708 (tuple<_T1, _T2>::operator=(const pair<_U1, _U2>&))
1709 (tuple<_T1, _T2>::operator=(pair<_U1, _U2>&&)): Constrain using
1710 __assignable and use __nothrow_assignable for exception
1712 * python/libstdcxx/v6/printers.py (is_specialization_of): Accept
1713 gdb.Type as first argument, instead of a string.
1714 (StdTuplePrinter._iterator._is_nonempty_tuple): New method to check
1715 tuple for expected structure.
1716 (StdTuplePrinter._iterator.__init__): Use _is_nonempty_tuple.
1717 * testsuite/20_util/tuple/dr2729.cc: New test.
1718 * testsuite/20_util/tuple/element_access/get_neg.cc: Change dg-error
1721 2018-08-16 Jonathan Wakely <jwakely@redhat.com>
1723 * include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning
1724 about signed/unsigned comparison.
1726 * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
1727 deprecation warnings for using uncaught_exception().
1730 * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
1731 (logic_error::logic_error(logic_error&&))
1732 (logic_error::operator=(logic_error&&))
1733 (runtime_error::runtime_error(runtime_error&&))
1734 (runtime_error::operator=(runtime_error&&)): Copy strings instead of
1735 moving, to avoid allocating empty reps for moved-from strings.
1737 2018-08-15 Jonathan Wakely <jwakely@redhat.com>
1739 * include/experimental/regex: Remove begin/end macros for namespace.
1740 * include/experimental/string: Likewise.
1741 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
1743 * testsuite/experimental/polymorphic_allocator/
1744 pmr_typedefs_forward_list.cc: New test.
1745 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
1747 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
1749 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
1751 * testsuite/experimental/polymorphic_allocator/
1752 pmr_typedefs_multimap.cc: New test.
1753 * testsuite/experimental/polymorphic_allocator/
1754 pmr_typedefs_multiset.cc: New test.
1755 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
1757 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1759 * testsuite/experimental/polymorphic_allocator/
1760 pmr_typedefs_unordered_map.cc: New test.
1761 * testsuite/experimental/polymorphic_allocator/
1762 pmr_typedefs_unordered_multimap.cc: New test.
1763 * testsuite/experimental/polymorphic_allocator/
1764 pmr_typedefs_unordered_multiset.cc: New test.
1765 * testsuite/experimental/polymorphic_allocator/
1766 pmr_typedefs_unordered_set.cc: New test.
1767 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
1770 * include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
1771 calls to __uses_allocator_construct_impl and __use_alloc.
1772 * include/experimental/memory_resource
1773 (polymorphic_allocator::_M_construct): Remove.
1774 (polymorphic_allocator::construct): Call __uses_allocator_construct.
1775 Qualify calls to __use_alloc.
1776 * include/std/memory_resource (polymorphic_allocator::construct): Fix
1777 type in SFINAE constraint. Use constexpr if instead of tag dispatching
1778 to _S_construct overloads.
1779 (polymorphic_allocator::construct(pair<T1, T2>*, ...)): Fix order of
1780 arguments to _S_construct_p.
1781 (polymorphic_allocator::_S_construct): Remove.
1782 (polymorphic_allocator::_S_construct_p): Return allocators by value
1784 * include/std/scoped_allocator (scoped_allocator_adaptor::construct):
1785 Qualify calls to __use_alloc.
1786 * testsuite/20_util/polymorphic_allocator/construct_pair.cc: New test,
1787 copied from testsuite/20_util/scoped_allocator/construct_pair.cc.
1788 * testsuite/experimental/polymorphic_allocator/1.cc: New test.
1789 * testsuite/experimental/polymorphic_allocator/construct_pair.cc:
1792 * src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
1793 (atomic_mem_res): Add unsynchronized definition for single-threaded.
1795 2018-08-14 Jonathan Wakely <jwakely@redhat.com>
1798 * include/bits/stl_tempbuf.h (return_temporary_buffer): Use
1799 non-placement delete.
1801 * include/std/chrono (__check_overflow): Simplify definition.
1802 (_Checked_integral_constant): Remove.
1805 * src/c++17/default_resource.h: New file, defining default_res.
1806 * src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
1807 (atomic_mem_res): Define alternative for atomic<memory_resource*>
1808 using a mutex instead of atomics.
1811 * config/abi/pre/gnu.ver: Export new symbol.
1812 * doc/xml/manual/abi.xml: Document new versions.
1813 * include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
1814 (basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
1815 * include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
1816 Declare new overload.
1817 * src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
1818 and static member function.
1819 (__throw_ios_failure(const char*, int)): Define.
1820 * src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
1821 (__throw_ios_failure(const char*, int)): Define.
1823 2018-08-14 Jeremy Sawicki <jeremy-gcc@sawicki.us>
1825 * include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&))
1826 (_Rope_const_iterator::operator=(const _Rope_const_iterator&))
1827 (_Rope_iterator::operator=(const _Rope_iterator&)): Ensure
1828 copied/assigned rope iterators don't retain pointers to the iterator
1829 they were copied/assigned from.
1830 * testsuite/ext/rope/7.cc: New.
1832 2018-08-13 Jonathan Wakely <jwakely@redhat.com>
1835 * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
1836 Combine definitions to avoid --detect-odr-violations warning.
1838 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
1839 __is_pow2 to check for valid alignment. Avoid branching when rounding
1840 size to multiple of alignment.
1842 * include/Makefile.am: Install <bit> and <version> for freestanding.
1843 * include/Makefile.in: Regenerate.
1844 * testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.
1847 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1850 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1852 * configure: Regenerate.
1854 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1857 * doc/xml/manual/intro.xml: Document LWG 206 change.
1858 * libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1859 * libsupc++/del_opa.cc: Likewise.
1860 * libsupc++/del_opant.cc: Likewise.
1861 * libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
1863 * libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1864 * libsupc++/del_opsa.cc: Likewise.
1865 * libsupc++/del_opva.cc: Likewise.
1866 * libsupc++/del_opvant.cc: Likewise.
1867 * libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
1868 instead of operator delete(ptr).
1869 * libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
1870 * libsupc++/del_opvsa.cc: Likewise.
1871 * libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
1872 * libsupc++/new_opa.cc: Use nullptr instead of literal 0.
1873 * libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
1875 * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
1877 * libsupc++/new_opvant.cc: Use nullptr and noexcept.
1878 * libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
1879 operator new(sz, nothrow).
1880 * testsuite/18_support/new_nothrow.cc: New test.
1882 2018-08-10 Martin Liska <mliska@suse.cz>
1884 * libsupc++/new_op.cc (new): Remove __builtin_expect as malloc
1885 predictor can handle that.
1886 * libsupc++/new_opa.cc: Likewise.
1887 * libsupc++/new_opnt.cc (new): Likewise.
1889 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
1892 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
1894 * configure: Regenerate.
1896 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
1898 * include/std/deque (std::pmr::deque): Declare alias.
1899 * include/std/forward_list (std::pmr::forward_list): Likewise.
1900 * include/std/list (std::pmr::list): Likewise.
1901 * include/std/map (std::pmr::map, std::pmr::multimap): Likewise.
1902 * include/std/regex (std::pmr::match_results, std::pmr::cmatch)
1903 (std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise.
1904 * include/std/set (std::pmr::set, std::pmr::multiset): Likewise.
1905 * include/std/string (std::pmr::basic_string, std::pmr::string)
1906 (std::pmr::u16string, std::pmr::u32string, std::pmr::wstring):
1908 * include/std/unordered_map (std::pmr::unordered_map)
1909 (std::pmr::unordered_multimap): Likewise.
1910 * include/std/unordered_set (std::pmr::unordered_set)
1911 (std::pmr::unordered_multiset): Likewise.
1912 * include/std/vector (std::pmr::vector): Likewise.
1913 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test.
1914 * testsuite/23_containers/deque/types/pmr_typedefs.cc: New test.
1915 * testsuite/23_containers/forward_list/pmr_typedefs.cc: New test.
1916 * testsuite/23_containers/list/pmr_typedefs.cc: New test.
1917 * testsuite/23_containers/map/pmr_typedefs.cc: New test.
1918 * testsuite/23_containers/multimap/pmr_typedefs.cc: New test.
1919 * testsuite/23_containers/multiset/pmr_typedefs.cc: New test.
1920 * testsuite/23_containers/set/pmr_typedefs.cc: New test.
1921 * testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test.
1922 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New
1924 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
1926 * testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test.
1927 * testsuite/23_containers/vector/pmr_typedefs.cc: New test.
1928 * testsuite/28_regex/match_results/pmr_typedefs.cc: New test.
1930 2018-08-08 François Dumont <fdumont@gcc.gnu.org>
1932 * include/bits/stl_algo.h
1933 (__rotate(_Ite, _Ite, _Ite, forward_iterator_tag))
1934 (__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag))
1935 (__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move code
1937 (rotate(_Ite, _Ite, _Ite)): ...here.
1938 (__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, _Dist)):
1939 Simplify rotate call.
1940 (__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)):
1942 (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
1945 2018-08-08 Jonathan Wakely <jwakely@redhat.com>
1947 * libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
1948 avoid clashing with an ::aligned_alloc function that was not detected
1951 * doc/xml/manual/using.xml: Fix markup for empty table entry.
1952 * doc/html/*: Regenerate.
1954 * doc/xml/manual/using.xml: Add missing header to table and fix typo.
1955 * doc/html/*: Regenerate.
1958 * include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
1959 Clear error_code when cached type is used.
1960 * testsuite/27_io/filesystem/directory_entry/86597.cc: New test.
1962 2018-08-07 Jonathan Wakely <jwakely@redhat.com>
1965 * include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
1966 here instead of in _Move_assign_base.
1967 (_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
1968 (_Copy_assign_base::operator=): Use _M_destructive_move when changing
1969 the contained value to another alternative.
1970 (_Move_assign_base::operator=): Likewise.
1971 (_Move_assign_base::_M_destructive_move): Remove.
1972 * testsuite/20_util/variant/86874.cc: New test.
1975 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
1976 Replace macro with inline function.
1977 [__sun]: Increase alignment to meet memalign precondition.
1978 [!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
1979 (aligned_alloc): Move check for valid alignment to operator new.
1980 Remove redundant check for non-zero size, it's enforced by the caller.
1981 (operator new): Move check for valid alignment here. Use
1982 __builtin_expect on check for zero size.
1984 * config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
1985 * include/std/memory_resource (monotonic_buffer_resource::release):
1986 Call _M_release_buffers to free buffers.
1987 (monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
1988 allocate a new buffer from upstream.
1989 (monotonic_buffer_resource::_M_new_buffer): Declare.
1990 (monotonic_buffer_resource::_M_release_buffers): Declare.
1991 (monotonic_buffer_resource::_Chunk): Replace definition with
1992 declaration as opaque type.
1993 * src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
1995 (monotonic_buffer_resource::_M_new_buffer): Define.
1996 (monotonic_buffer_resource::_M_release_buffers): Define.
1998 2018-08-05 François Dumont <fdumont@gcc.gnu.org>
2000 * include/bits/stl_iterator.h: Fix comment.
2002 2018-08-03 Jonathan Wakely <jwakely@redhat.com>
2004 * src/c++11/system_error.cc
2005 (system_error_category::default_error_condition): Add workaround for
2006 ENOTEMPTY and EEXIST having the same value on AIX.
2007 * testsuite/19_diagnostics/error_category/system_category.cc: Add
2008 extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
2010 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
2012 * configure: Regenerate.
2013 * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS.
2014 * src/c++11/futex.cc: Use __glibcxx_assert instead of
2015 _GLIBCXX_DEBUG_ASSERT.
2017 2018-08-01 Mike Crowe <mac@mcrowe.com>
2019 * include/std/condition_variable (wait_for): Use steady_clock.
2021 2018-08-01 Mike Crowe <mac@mcrowe.com>
2023 * include/std/condition_variable (wait_until): Only report timeout
2024 if we really have timed out when measured against the
2025 caller-supplied clock.
2026 * testsuite/30_threads/condition_variable/members/2.cc: Add test
2027 case to confirm above behaviour.
2029 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
2032 * src/c++11/system_error.cc
2033 (system_error_category::default_error_condition): New override to
2034 check for POSIX errno values.
2035 * testsuite/19_diagnostics/error_category/generic_category.cc: New
2036 * testsuite/19_diagnostics/error_category/system_category.cc: New
2039 2018-07-31 Jonathan Wakely <jwakely@redhat.com>
2042 * include/bits/stl_pair.h (__pair_base): New class with deleted copy
2043 assignment operator.
2044 (pair): Derive from __pair_base.
2045 (pair::operator=): Remove deleted overload.
2046 * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
2047 so that new base class isn't shown in GDB.
2048 * testsuite/20_util/pair/86751.cc: New test.
2049 * testsuite/20_util/pair/ref_assign.cc: New test.
2051 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
2052 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
2053 (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
2054 instead of __has_builtin.
2055 * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
2056 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
2057 * include/std/version [!_GLIBCXX_HAS_GTHREADS]
2058 (__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
2059 (__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
2060 [!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
2061 (__cpp_lib_has_unique_object_representations): Don't define when
2062 builtin not available.
2063 [!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
2065 [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
2066 * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
2069 * doc/xml/manual/test.xml: Improve documentation on writing tests for
2071 * doc/xml/manual/using.xml: Document all headers for C++11 and later.
2072 * doc/html/*: Regenerate.
2074 * include/ext/pointer.h [__cplusplus >= 201103L]
2075 (_Pointer_adapter::operator bool): Add explicit conversion operator
2076 to replace safe bool idiom.
2078 2018-07-30 Jonathan Wakely <jwakely@redhat.com>
2081 * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
2082 _S_to_pointer (LWG 1052, LWG 2118).
2083 (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
2084 * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
2085 * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.
2087 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
2088 workaround for aligned_alloc bug on AIX.
2089 * testsuite/18_support/new_aligned.cc: New test.
2091 2018-07-26 Marek Polacek <polacek@redhat.com>
2093 * testsuite/30_threads/condition_variable_any/cond.cc: New.
2095 2018-07-26 Marek Polacek <polacek@redhat.com>
2097 * src/c++98/locale_init.cc: Fix #ifdef condition.
2099 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
2101 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Add
2102 dg-require-cstdint directive.
2103 * testsuite/20_util/allocator/overaligned.cc: Likewise.
2104 * testsuite/20_util/any/cons/aligned.cc: Likewise.
2105 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Likewise.
2106 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: Likewise.
2107 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
2109 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
2110 * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise.
2111 * testsuite/23_containers/set/allocator/move_assign.cc: Likewise.
2112 * testsuite/25_algorithms/make_heap/complexity.cc: Likewise.
2113 * testsuite/25_algorithms/pop_heap/complexity.cc: Require cstdint and
2114 random_device effective-target.
2115 * testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
2116 * testsuite/25_algorithms/sample/1.cc: Require cstdint.
2117 * testsuite/25_algorithms/sample/2.cc: Likewise.
2118 * testsuite/25_algorithms/sort_heap/complexity.cc: Require cstdint
2120 * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
2122 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2124 * testsuite/26_numerics/random/discard_block_engine/requirements/
2125 constexpr_data.cc: Likewise.
2126 * testsuite/26_numerics/random/discard_block_engine/requirements/
2127 constexpr_functions.cc: Likewise.
2128 * testsuite/26_numerics/random/independent_bits_engine/requirements/
2129 constexpr_functions.cc: Likewise.
2130 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
2131 constexpr_data.cc: Likewise.
2132 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
2133 constexpr_functions.cc: Likewise.
2134 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
2135 constexpr_data.cc: Likewise.
2136 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
2137 constexpr_functions.cc: Likewise.
2138 * testsuite/26_numerics/random/pr60037-neg.cc: Likewise.
2139 * testsuite/26_numerics/random/seed_seq/cons/65631.cc: Likewise.
2140 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
2141 constexpr_data.cc: Add dg-require-cstdint directive.
2142 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
2143 constexpr_functions.cc: Likewise.
2144 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
2145 constexpr_data.cc: Likewise.
2146 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
2147 constexpr_functions.cc: Likewise.
2148 * testsuite/26_numerics/random/uniform_real_distribution/operators/
2150 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Likewise.
2151 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
2152 * testsuite/experimental/algorithm/sample.cc: Likewise.
2153 * testsuite/experimental/algorithm/search.cc: Likewise.
2154 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
2155 * testsuite/experimental/any/cons/aligned.cc: Likewise.
2156 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2158 * testsuite/experimental/memory_resource/resource_adaptor.cc: Likewise.
2159 * testsuite/experimental/random/randint.cc: Likewise.
2160 * testsuite/experimental/source_location/1.cc: Likewise.
2161 * testsuite/ext/bitmap_allocator/overaligned.cc: Likewise.
2162 * testsuite/ext/malloc_allocator/overaligned.cc: Likewise.
2163 * testsuite/ext/mt_allocator/overaligned.cc: Likewise.
2164 * testsuite/ext/new_allocator/overaligned.cc: Likewise.
2165 * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise.
2166 * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
2167 * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
2168 * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
2169 * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
2170 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
2171 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2172 * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
2173 * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
2174 * testsuite/ext/pool_allocator/overaligned.cc: Likewise.
2175 * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Likewise.
2176 * testsuite/ext/throw_allocator/check_deallocate_null.cc: Likewise.
2177 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
2178 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
2179 * testsuite/ext/throw_allocator/deallocate_global.cc: Likewise.
2180 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
2181 * testsuite/ext/throw_allocator/explicit_instantiation.cc: Likewise.
2182 * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
2183 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
2185 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
2186 * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
2187 * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
2188 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
2190 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
2191 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
2192 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
2194 * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
2196 * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
2198 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
2199 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
2200 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
2201 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
2202 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
2203 * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
2205 * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
2207 * testsuite/30_threads/recursive_timed_mutex/dest/
2208 destructor_locked.cc: Likewise.
2209 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
2210 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
2211 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
2213 * testsuite/30_threads/recursive_timed_mutex/native_handle/
2214 typesizes.cc: Likewise.
2215 * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
2217 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
2219 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
2221 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
2223 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2225 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2227 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2229 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
2231 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
2232 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
2233 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
2234 * testsuite/30_threads/scoped_lock/requirements/
2235 explicit_instantiation.cc: Likewise.
2236 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise.
2237 * testsuite/30_threads/shared_future/cons/assign.cc: Likewise.
2238 * testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.
2239 * testsuite/30_threads/shared_future/cons/copy.cc: Likewise.
2240 * testsuite/30_threads/shared_future/cons/default.cc: Likewise.
2241 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
2242 * testsuite/30_threads/shared_future/cons/move_assign.cc: Likewise.
2243 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
2244 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
2245 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
2246 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
2247 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
2248 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
2249 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
2250 * testsuite/30_threads/shared_future/requirements/
2251 explicit_instantiation.cc: Likewise.
2252 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
2253 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
2254 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
2255 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
2256 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
2257 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
2258 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
2259 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
2260 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
2261 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
2262 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
2263 * testsuite/30_threads/shared_lock/requirements/
2264 explicit_instantiation.cc: Likewise.
2265 * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Likewise.
2266 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2267 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Likewise.
2268 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
2269 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
2271 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2272 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2273 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2274 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
2275 * testsuite/30_threads/shared_timed_mutex/cons/assign_neg.cc: Likewise.
2276 * testsuite/30_threads/shared_timed_mutex/cons/copy_neg.cc: Likewise.
2277 * testsuite/30_threads/shared_timed_mutex/requirements/
2278 standard_layout.cc: Likewise.
2279 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
2280 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
2281 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
2282 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
2283 * testsuite/30_threads/this_thread/1.cc: Likewise.
2284 * testsuite/30_threads/this_thread/2.cc: Likewise.
2285 * testsuite/30_threads/this_thread/3.cc: Likewise.
2286 * testsuite/30_threads/this_thread/4.cc: Likewise.
2287 * testsuite/30_threads/this_thread/58038.cc: Likewise.
2288 * testsuite/30_threads/thread/70503.cc: Likewise.
2289 * testsuite/30_threads/thread/84532.cc: Likewise.
2290 * testsuite/30_threads/thread/adl.cc: Likewise.
2291 * testsuite/30_threads/thread/cons/1.cc: Likewise.
2292 * testsuite/30_threads/thread/cons/2.cc: Likewise.
2293 * testsuite/30_threads/thread/cons/3.cc: Likewise.
2294 * testsuite/30_threads/thread/cons/4.cc: Likewise.
2295 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
2296 * testsuite/30_threads/thread/cons/5.cc: Likewise.
2297 * testsuite/30_threads/thread/cons/6.cc: Likewise.
2298 * testsuite/30_threads/thread/cons/7.cc: Likewise.
2299 * testsuite/30_threads/thread/cons/8.cc: Likewise.
2300 * testsuite/30_threads/thread/cons/84535.cc: Likewise.
2301 * testsuite/30_threads/thread/cons/9.cc: Likewise.
2302 * testsuite/30_threads/thread/cons/assign_neg.cc: Likewise.
2303 * testsuite/30_threads/thread/cons/copy_neg.cc: Likewise.
2304 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2305 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
2306 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
2307 * testsuite/30_threads/thread/id/operators.cc: Likewise.
2308 * testsuite/30_threads/thread/members/1.cc: Likewise.
2309 * testsuite/30_threads/thread/members/2.cc: Likewise.
2310 * testsuite/30_threads/thread/members/3.cc: Likewise.
2311 * testsuite/30_threads/thread/members/4.cc: Likewise.
2312 * testsuite/30_threads/thread/members/5.cc: Likewise.
2313 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
2315 * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
2316 * testsuite/30_threads/thread/swap/1.cc: Likewise.
2317 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
2318 * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
2319 * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
2320 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
2321 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
2322 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
2323 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
2325 * testsuite/30_threads/timed_mutex/requirements/
2326 standard_layout.cc: Likewise.
2327 * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
2328 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
2329 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
2330 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
2331 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
2332 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
2333 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
2334 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
2335 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
2336 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
2337 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
2338 * testsuite/30_threads/try_lock/1.cc: Likewise.
2339 * testsuite/30_threads/try_lock/2.cc: Likewise.
2340 * testsuite/30_threads/try_lock/3.cc: Likewise.
2341 * testsuite/30_threads/try_lock/4.cc: Likewise.
2342 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
2343 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
2344 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
2345 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
2346 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
2347 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
2348 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
2349 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
2350 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
2351 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
2352 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
2353 * testsuite/30_threads/unique_lock/requirements/
2354 explicit_instantiation.cc: Likewise.
2355 * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
2357 * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
2359 * testsuite/30_threads/async/49668.cc: Likewise.
2360 * testsuite/30_threads/async/54297.cc: Likewise.
2361 * testsuite/30_threads/async/84532.cc: Likewise.
2362 * testsuite/30_threads/async/any.cc: Likewise.
2363 * testsuite/30_threads/async/async.cc: Likewise.
2364 * testsuite/30_threads/async/except.cc: Likewise.
2365 * testsuite/30_threads/async/forced_unwind.cc: Likewise.
2366 * testsuite/30_threads/async/launch.cc: Likewise.
2367 * testsuite/30_threads/async/lwg2021.cc: Likewise.
2368 * testsuite/30_threads/async/sync.cc: Likewise.
2369 * testsuite/30_threads/call_once/39909.cc: Likewise.
2370 * testsuite/30_threads/call_once/49668.cc: Likewise.
2371 * testsuite/30_threads/call_once/60497.cc: Likewise.
2372 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
2373 * testsuite/30_threads/call_once/constexpr.cc: Likewise.
2374 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
2375 * testsuite/30_threads/call_once/once_flag.cc: Likewise.
2376 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
2377 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
2378 * testsuite/30_threads/condition_variable/cons/assign_neg.cc:
2380 * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise.
2381 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
2382 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
2383 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
2384 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
2385 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
2386 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
2388 * testsuite/30_threads/condition_variable/requirements/
2389 standard_layout.cc: Likewise.
2390 * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
2392 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
2393 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
2394 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
2395 * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
2397 * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
2399 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
2400 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2401 * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
2402 * testsuite/30_threads/future/cons/constexpr.cc: Likewise.
2403 * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
2404 * testsuite/30_threads/future/cons/default.cc: Likewise.
2405 * testsuite/30_threads/future/cons/move.cc: Likewise.
2406 * testsuite/30_threads/future/cons/move_assign.cc: Likewise.
2407 * testsuite/30_threads/future/members/45133.cc: Likewise.
2408 * testsuite/30_threads/future/members/get.cc: Likewise.
2409 * testsuite/30_threads/future/members/get2.cc: Likewise.
2410 * testsuite/30_threads/future/members/share.cc: Likewise.
2411 * testsuite/30_threads/future/members/valid.cc: Likewise.
2412 * testsuite/30_threads/future/members/wait.cc: Likewise.
2413 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
2414 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
2415 * testsuite/30_threads/future/requirements/explicit_instantiation.cc:
2417 * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
2419 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
2420 * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Likewise.
2421 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
2422 * testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
2423 * testsuite/30_threads/lock/1.cc: Likewise.
2424 * testsuite/30_threads/lock/2.cc: Likewise.
2425 * testsuite/30_threads/lock/3.cc: Likewise.
2426 * testsuite/30_threads/lock/4.cc: Likewise.
2427 * testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
2428 * testsuite/30_threads/lock_guard/requirements/
2429 explicit_instantiation.cc: Likewise.
2430 * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Likewise.
2431 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
2432 * testsuite/30_threads/mutex/cons/assign_neg.cc: Likewise.
2433 * testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
2434 * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
2435 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
2436 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
2437 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
2438 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
2439 * testsuite/30_threads/mutex/requirements/standard_layout.cc::
2441 * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
2442 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
2443 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
2444 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
2445 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
2446 * testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
2447 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
2448 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
2449 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
2450 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
2451 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
2452 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
2453 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
2454 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
2455 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
2456 * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Likewise.
2457 * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
2458 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
2459 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
2460 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2462 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2463 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2464 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2465 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2466 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2467 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2468 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2469 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2470 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2471 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2472 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2473 * testsuite/30_threads/packaged_task/requirements/
2474 explicit_instantiation.cc: Likewise.
2475 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
2476 * testsuite/30_threads/promise/60966.cc: Likewise.
2477 * testsuite/30_threads/promise/69106.cc: Likewise.
2478 * testsuite/30_threads/promise/cons/1.cc: Likewise.
2479 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2480 * testsuite/30_threads/promise/cons/alloc2.cc: Likewise.
2481 * testsuite/30_threads/promise/cons/alloc_min.cc: Likewise.
2482 * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
2483 * testsuite/30_threads/promise/cons/copy_neg.cc: Likewise.
2484 * testsuite/30_threads/promise/cons/move.cc: Likewise.
2485 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2486 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2487 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2488 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2489 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2490 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2491 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2492 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2493 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2494 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2495 * testsuite/30_threads/promise/members/swap.cc: Likewise.
2496 * testsuite/30_threads/promise/requirements/explicit_instantiation.cc:
2498 * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
2500 * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
2502 * testsuite/20_util/align/2.cc: Remove dg-require-cstdint directive.
2503 * testsuite/20_util/duration/arithmetic/1.cc: Likewise.
2504 * testsuite/20_util/duration/arithmetic/2.cc: Likewise.
2505 * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
2506 * testsuite/20_util/duration/arithmetic/dr934-1.cc: Likewise.
2507 * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
2508 * testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
2509 * testsuite/20_util/duration/cons/1.cc: Likewise.
2510 * testsuite/20_util/duration/cons/1_neg.cc: Likewise.
2511 * testsuite/20_util/duration/cons/2.cc: Likewise.
2512 * testsuite/20_util/duration/cons/54025.cc: Likewise.
2513 * testsuite/20_util/duration/cons/dr974_neg.cc: Likewise.
2514 * testsuite/20_util/duration/requirements/explicit_instantiation/
2515 explicit_instantiation.cc: Likewise.
2516 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2517 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2518 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2519 * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Likewise.
2520 * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
2521 * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
2522 * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
2523 * testsuite/20_util/ratio/cons/cons1.cc: Likewise.
2524 * testsuite/20_util/ratio/operations/45866.cc: Likewise.
2525 * testsuite/20_util/ratio/operations/47913.cc: Likewise.
2526 * testsuite/20_util/ratio/operations/53840.cc: Likewise.
2527 * testsuite/20_util/ratio/operations/ops1.cc: Likewise.
2528 * testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
2529 * testsuite/20_util/system_clock/1.cc: Likewise.
2530 * testsuite/20_util/time_point/1.cc: Likewise.
2531 * testsuite/20_util/time_point/2.cc: Likewise.
2532 * testsuite/20_util/time_point/3.cc: Likewise.
2533 * testsuite/20_util/time_point/requirements/explicit_instantiation/
2534 explicit_instantiation.cc: Likewise.
2535 * testsuite/21_strings/basic_string/requirements/
2536 explicit_instantiation/char16_t/1.cc: Likewise.
2537 * testsuite/21_strings/basic_string/requirements/
2538 explicit_instantiation/char32_t/1.cc: Likewise.
2539 * testsuite/21_strings/basic_string_view/requirements/
2540 explicit_instantiation/char16_t/1.cc: Likewise.
2541 * testsuite/21_strings/basic_string_view/requirements/
2542 explicit_instantiation/char32_t/1.cc: Likewise.
2543 * testsuite/21_strings/char_traits/requirements/
2544 explicit_instantiation/char16_t/1.cc: Likewise.
2545 * testsuite/21_strings/char_traits/requirements/
2546 explicit_instantiation/char32_t/1.cc: Likewise.
2547 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
2548 * testsuite/22_locale/codecvt/char16_t.cc: Likewise.
2549 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
2550 * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
2552 * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
2554 * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
2556 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
2557 * testsuite/23_containers/vector/bool/72847.cc: Likewise.
2558 * testsuite/23_containers/vector/debug/multithreaded_swap.cc:
2560 * testsuite/experimental/string_view/requirements/
2561 explicit_instantiation/char16_t/1.cc: Likewise.
2562 * testsuite/experimental/string_view/requirements/
2563 explicit_instantiation/char32_t/1.cc: Likewise.
2564 * testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/
2566 * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
2569 * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2570 (random_condition, throw_value_random, throw_allocator_random)
2571 (std::hash<throw_value_random>): Do not define when <tr1/random> is
2573 * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
2574 define transactional memory support when <stdint.h> is not usable.
2576 * include/bits/hashtable_policy.h (__detail::__clp2): Use faster
2577 implementation that doesn't depend on <stdint.h> types.
2578 * include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
2579 std::size_t when std::uintptr_t is not usable.
2580 [!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
2581 (undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
2582 Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
2584 * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2585 (hash<u16string>, hash<u32string>): Remove dependency on
2586 _GLIBCXX_USE_C99_STDINT_TR1.
2587 * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2588 (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
2589 _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
2590 __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
2591 * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2592 (codecvt<char16_t, char, mbstate_t>)
2593 (codecvt<char32_t, char, mbstate_t>)
2594 (codecvt_byname<char16_t, char, mbstate_t>)
2595 (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
2596 on _GLIBCXX_USE_C99_STDINT_TR1.
2597 * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2598 (_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
2599 * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2600 (char_traits<char16_t>, char_traits<char32_t>)
2601 (basic_string<char16_t>, basic_string<char32_t>): Remove dependency
2602 on _GLIBCXX_USE_C99_STDINT_TR1.
2603 * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2604 (u16string_view, u32string_view, hash<u16string_view>)
2605 (hash<u32string_view>, operator""sv(const char16_t, size_t))
2606 (operator""sv(const char32_t, size_t)): Likewise.
2607 * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2608 (hash<__u16vstring>, hash<__u32vstring>): Likewise.
2609 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2610 (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
2611 (__u32sso_string, __u32rc_string): Likewise.
2612 * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
2613 (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
2614 * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
2615 (u16string_view, u32string_view, hash<u16string_view>)
2616 (hash<u32string_view>, operator""sv(const char16_t, size_t))
2617 (operator""sv(const char32_t, size_t)): Likewise.
2618 * src/c++11/codecvt.cc: Likewise.
2619 * src/c++98/locale_init.cc: Likewise.
2620 * src/c++98/localename.cc: Likewise.
2622 * include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2623 (__atomic_futex_unsigned_base): Remove dependency on
2624 _GLIBCXX_USE_C99_STDINT_TR1 macro.
2625 * include/bits/unique_lock.h [!_GLIBCXX_USE_C99_STDINT_TR1]
2626 (unique_lock): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1.
2627 * include/c_global/cstdint [!_GLIBCXX_USE_C99_STDINT_TR1] (intmax_t)
2628 (uintmax_t): Define using predefined macros.
2629 * include/std/chrono [!_GLIBCXX_USE_C99_STDINT_TR1] (duration)
2630 (time_point, system_clock, high_resolution_clock, steady_clock): Remove
2631 dependency on _GLIBCXX_USE_C99_STDINT_TR1 macro.
2632 (nanoseconds, microseconds, milliseconds, seconds, minutes, hours):
2633 [!_GLIBCXX_USE_C99_STDINT_TR1]: Define using __INT64_TYPE__ or
2634 long long when <stdint.h> is not usable.
2635 * include/std/condition_variable [!_GLIBCXX_USE_C99_STDINT_TR1]
2636 (condition_variable, condition_variable_any): Remove dependency on
2637 _GLIBCXX_USE_C99_STDINT_TR1.
2638 * include/std/future [!_GLIBCXX_USE_C99_STDINT_TR1] (future, promise)
2639 (packaged_task, async): Likewise.
2640 * include/std/mutex [!_GLIBCXX_USE_C99_STDINT_TR1] (recursive_mutex)
2641 (timed_mutex, recursive_timed_mutex, try_lock, lock, scoped_lock)
2642 (once_flag, call_once): Likewise.
2643 * include/std/ratio [!_GLIBCXX_USE_C99_STDINT_TR1] (ratio): Likewise.
2644 * include/std/shared_mutex [!_GLIBCXX_USE_C99_STDINT_TR1]
2645 (shared_mutex, shared_timed_mutex, shared_lock): Likewise.
2646 * include/std/thread [!_GLIBCXX_USE_C99_STDINT_TR1] (thread)
2647 (this_thread::get_id, this_thread::yield, this_thread::sleep_for)
2648 (this_thread::sleep_until): Likewise.
2649 * src/c++11/chrono.cc: Remove dependency on
2650 _GLIBCXX_USE_C99_STDINT_TR1 macro.
2651 * src/c++11/condition_variable.cc: Likewise.
2652 * src/c++11/futex.cc: Likewise.
2653 * src/c++11/future.cc: Likewise.
2654 * src/c++11/mutex.cc: Likewise.
2655 * src/c++11/thread.cc: Likewise.
2656 * testsuite/20_util/duration/literals/range_neg.cc: Adjust dg-error.
2657 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
2658 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
2659 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
2660 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
2661 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
2663 2018-07-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2666 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2667 xfail execution on 32-bit Solaris/x86.
2669 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
2671 * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
2672 (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
2673 (vector::_M_move_assign): Reorder the swaps.
2675 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
2678 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
2679 same alignment for post-release allocation.
2681 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
2684 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
2685 buffer being misaligned and so returned pointer not being at start.
2687 * include/experimental/memory_resource: Include <cstddef> header.
2689 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
2690 * src/Makefile.am: Add comment.
2691 * src/c++17/Makefile.in: Regenerate.
2693 * include/Makefile.am: Add new <bits/unique_lock.h> header.
2694 * include/Makefile.in: Regenerate.
2695 * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
2696 (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
2697 (unique_lock): Move definition to ...
2698 * include/bits/unique_lock.h: New header.
2699 [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
2700 [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
2701 (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
2702 (unique_lock::try_lock_for): Define only when <chrono> is usable.
2703 * include/std/condition_variable: Include <bits/unique_lock.h>.
2704 * include/std/mutex: Likewise.
2706 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
2708 * config/abi/pre/gnu.ver: Export new symbols.
2709 * configure: Regenerate.
2710 * include/Makefile.am: Add new <memory_resource> header.
2711 * include/Makefile.in: Regenerate.
2712 * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
2713 * include/std/memory_resource: New header.
2714 (memory_resource, polymorphic_allocator, new_delete_resource)
2715 (null_memory_resource, set_default_resource, get_default_resource)
2716 (pool_options, monotonic_buffer_resource): Define.
2717 * src/Makefile.am: Add c++17 directory.
2718 * src/Makefile.in: Regenerate.
2719 * src/c++11/Makefile.am: Fix comment.
2720 * src/c++17/Makefile.am: Add makefile for new sub-directory.
2721 * src/c++17/Makefile.in: Generate.
2722 * src/c++17/memory_resource.cc: New.
2723 (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
2724 (default_res, new_delete_resource, null_memory_resource)
2725 (set_default_resource, get_default_resource): Define.
2726 * testsuite/20_util/memory_resource/1.cc: New test.
2727 * testsuite/20_util/memory_resource/2.cc: New test.
2728 * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
2729 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
2730 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
2731 * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
2732 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
2734 * testsuite/20_util/polymorphic_allocator/1.cc: New test.
2735 * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
2736 * testsuite/20_util/polymorphic_allocator/select.cc: New test.
2737 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
2738 Define concrete memory resource for testing.
2739 (__gnu_test::default_resource_mgr): Define RAII helper for changing
2743 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
2744 parameter by reference, to avoid copying invalid iterators.
2745 * testsuite/25_algorithms/copy/86658.cc: New test.
2747 * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
2748 local variables for number of digits instead of type aliases.
2749 (__log2p1): Remove redundant branch also checked in __countl_zero.
2751 * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
2752 conditions. Add comments.
2753 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
2754 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
2755 * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
2757 * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
2758 (__uses_allocator_helper): Check conditions directly instead of
2759 using __is_erased_or_convertible.
2761 * include/experimental/memory_resource: Adjust comments and
2763 (__resource_adaptor_imp): Add second template parameter for type of
2764 memory resource base class.
2765 (memory_resource): Define default constructor, destructor, copy
2766 constructor and copy assignment operator as defaulted.
2769 * include/experimental/memory_resource (__get_default_resource): Use
2770 placement new to create an object with dynamic storage duration.
2772 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
2775 * include/experimental/memory_resource
2776 (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
2777 (__resource_adaptor_common::__guaranteed_alignment): New helper to
2778 give maximum alignment an allocator guarantees. Specialize for known
2779 allocators using new and malloc.
2780 (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
2781 (__resource_adaptor_imp::do_deallocate): Likewise.
2782 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2783 Check that new and delete are called with expected sizes.
2785 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2788 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
2791 2018-07-20 Fangrui Song <maskray@google.com>
2793 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
2794 _GLIBCXX_VISIBILITY(default).
2796 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
2799 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
2801 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
2803 * include/std/type_traits (__is_member_object_pointer_helper): Use
2804 __not_<is_function<_Tp>>::type instead of integral_constant.
2805 (__is_member_function_pointer_helper): Likewise for
2806 is_function<_Tp>::type.
2807 (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
2808 (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
2809 (is_trivially_constructible): Remove redundant use of
2811 (__is_trivially_copy_assignable_impl): Remove redundant use of
2813 (__is_trivially_move_assignable_impl): Remove redundant use of
2815 (is_trivially_destructible): Use __bool_constant.
2816 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
2817 tests for scalar types.
2819 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
2821 * include/bits/stl_algobase.h (__copy_move_a): Used
2822 __is_trivially_copyable.
2823 (__copy_move_backward_a): Likewise.
2824 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
2827 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
2830 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
2831 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
2832 * configure: Regenerate.
2833 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
2834 * doc/Makefile.in: Regenerate.
2835 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
2836 * include/Makefile.in: Regenerate.
2837 * libsupc++/Makefile.in: Regenerate.
2838 * po/Makefile.in: Regenerate.
2839 * python/Makefile.in: Regenerate.
2840 * src/Makefile.in: Regenerate.
2841 * src/c++11/Makefile.in: Regenerate.
2842 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
2843 from -Wabi=2 that don't affect exported symbols.
2844 * src/c++98/Makefile.in: Regenerate.
2845 * src/filesystem/Makefile.in: Regenerate.
2846 * testsuite/Makefile.in: Regenerate.
2848 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
2849 (_Async_state_common::_M_join): Simplify use of std::call_once and
2850 corresponding explicit instantiation.
2851 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
2852 (__bind_simple): Remove definitions and explicit instantiation that
2853 are not required by exported symbols.
2855 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
2857 * scripts/create_testsuite_files: Fix typo in comment.
2860 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
2861 non-standard partial specialization.
2862 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
2863 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
2864 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
2866 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
2868 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
2869 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
2870 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2872 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
2874 * include/debug/functions.h (__gnu_debug::__check_string): Move...
2875 * include/debug/string (__gnu_debug::__check_string): ... here.
2876 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
2877 (__glibcxx_check_string_n_constructor): New.
2878 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
2880 (__glibcxx_check_string_constructor): New.
2881 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
2883 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
2884 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
2886 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
2888 PR libstdc++/84928 use std::move in <numeric> algorithms
2889 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
2890 conditionally move, according to __cplusplus value.
2891 (accumulate, inner_product, partial_sum, adjacent_difference): Use
2892 _GLIBCXX_MOVE_IF_20.
2893 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
2894 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
2895 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
2896 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
2898 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
2900 P0935R0 Eradicating unnecessarily explicit default constructors
2901 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
2902 default constructor symbols.
2903 * include/std/sstream (basic_stringbuf, basic_istringstream)
2904 (basic_ostringstream, basic_stringstream): Remove default arguments
2905 from explicit constructors taking ios_base::openmode and add separate
2906 non-explicit default constructors.
2907 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
2908 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
2909 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
2910 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
2911 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
2913 * include/std/variant (__accepted_index): Use void_t.
2915 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
2918 * config/abi/pre/gnu.ver: Export move constructors and move
2919 assignment operators for std::logic_error and std::runtime_error.
2920 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
2921 _GLIBCXX_USE_NOEXCEPT.
2922 (logic_error, runtime_error): Declare move constructors and move
2923 assignment operators. When not declared already, define copy
2924 constructors and copy assignment operators as explicit-defaulted.
2925 (domain_error, invalid_argument, length_error, out_of_range)
2926 (overflow_error, underflow_error): Define move constructors and move
2927 assignment operators as explicitly-defaulted.
2928 * libsupc++/exception.h (exception): Likewise.
2929 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
2930 move constructors and move assignment operators as defaulted.
2931 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
2932 assignment operators are defined.
2934 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
2936 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2938 * testsuite/21_strings/basic_string/requirements/
2939 explicit_instantiation/debug.cc: Likewise.
2942 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2943 (basic_string::assign(basic_string&&)): Add conditional noexcept
2944 depending on the allocator's is_always_equal property (LWG 2063).
2945 * testsuite/21_strings/basic_string/modifiers/assign/char/
2946 move_assign.cc: Check for non-throwing exception specification.
2947 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
2948 move_assign.cc: Likewise.
2951 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2952 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
2953 Add GLIBCXX_NOEXCEPT.
2954 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
2955 to depend on the allocator's is_always_equal property (LWG 2063).
2956 (basic_string::swap(basic_string&)): Likewise.
2957 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
2958 (basic_string::swap(basic_string&)): Likewise.
2959 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
2960 Check is_nothrow_move_assignable.
2961 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
2962 Check is_nothrow_move_assignable.
2963 * testsuite/21_strings/basic_string/cons/char/
2964 noexcept_move_construct.cc: Likewise.
2965 * testsuite/21_strings/basic_string/cons/wchar_t/
2966 noexcept_move_construct.cc: Likewise.
2968 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
2970 P0646R1 Improving the Return Value of Erase-Like Algorithms I
2971 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
2973 (forward_list::__remove_return_type): Define typedef as size_type or
2974 void, according to __cplusplus value.
2975 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
2976 empty, according to __cplusplus value.
2977 (forward_list::remove, forward_list::unique): Use typedef and macro
2978 to change return type and add abi-tag for C++2a.
2979 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
2980 typedef to change return type for C++2a.
2981 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
2982 (forward_list::remove, forward_list::remove_if<Pred>)
2983 (forward_list::unique<BinPred>): Return number of removed elements
2985 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
2986 (list::remove, list::unique, list::remove_if<Predicate>)
2987 (list::unique<BinaryPredicate>): Return number of removed elements
2989 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
2990 (list::__remove_return_type): Define typedef as size_type or
2991 void, according to __cplusplus value.
2992 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
2993 empty, according to __cplusplus value.
2994 (list::remove, list::unique): Use typedef and macro to change return
2995 type and add abi-tag for C++2a.
2996 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
2997 typedef to change return type for C++2a.
2998 * include/std/version (__cpp_lib_list_remove_return_type): Define.
2999 * testsuite/23_containers/forward_list/operations/
3000 remove_cxx20_return.cc: New.
3001 * testsuite/23_containers/forward_list/operations/
3002 unique_cxx20_return.cc: New.
3004 P0458R2 Checking for Existence of an Element in Associative Containers
3005 * include/bits/stl_map.h (map::contains): Add for C++2a.
3006 * include/bits/stl_multimap.h (multimap::contains): Likewise.
3007 * include/bits/stl_multiset.h (multiset::contains): Likewise.
3008 * include/bits/stl_set.h (set::contains): Likewise.
3009 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
3010 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
3011 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
3012 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
3013 * include/bits/unordered_map.h (unordered_map::contains)
3014 (unordered_multimap::contains): Add for C++2a.
3015 * include/bits/unordered_set.h (unordered_set::contains)
3016 (unordered_multiset::contains): Likewise.
3017 * testsuite/23_containers/map/operations/contains.cc: New.
3018 * testsuite/23_containers/multimap/operations/contains.cc: New.
3019 * testsuite/23_containers/multiset/operations/contains.cc: New.
3020 * testsuite/23_containers/set/operations/contains.cc: New.
3021 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
3022 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
3024 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
3026 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
3028 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
3031 * include/debug/string
3032 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
3033 Use __glibcxx_check_insert_range.
3034 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
3035 __gnu_debug::string when _GLIBCXX_DEBUG.
3036 * 21_strings/basic_string/init-list.cc: Likewise.
3037 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
3038 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
3039 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
3040 * 21_strings/basic_string/types/1.cc: Likewise.
3042 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
3044 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
3045 target for std::random_device.
3046 * testsuite/26_numerics/random/random_device/cons/default.cc:
3048 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
3049 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
3050 * testsuite/experimental/random/randint.cc: Likewise.
3051 * testsuite/lib/libstdc++.exp
3052 (check_effective_target_random_device): New proc.
3054 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
3055 Jakub Jelinek <jakub@redhat.com>
3057 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
3059 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
3062 * include/std/type_traits (is_trivially_constructible): Check
3063 is_constructible before __is_trivially_constructible.
3064 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
3065 tests, including negative cases.
3066 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
3067 zero for dg-error lineno.
3068 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
3071 * include/std/bit (__rotl, __rotr): Avoid branch.
3072 (_If_is_unsigned_integer): Use remove_cv_t.
3073 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
3075 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
3077 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
3078 * include/Makefile.am: Add new header.
3079 * include/Makefile.in: Regenerate.
3080 * include/precompiled/stdc++.h: Include new header.
3081 * include/std/bit: New header.
3082 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
3083 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
3085 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
3086 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
3087 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
3088 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
3090 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
3091 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
3092 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
3093 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
3094 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
3095 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
3096 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
3097 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
3098 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
3099 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
3101 * include/bits/alloc_traits.h: Remove redundant preprocessor
3104 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
3106 * include/bits/stl_algobase.h (__niter_wrap): New.
3107 (__copy_move_a2(_II, _II, _OI)): Use latter.
3108 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
3109 (fill_n(_OI, _Size, const _Tp&)): Likewise.
3110 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
3111 * include/debug/stl_iterator.h
3112 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
3113 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
3114 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
3115 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
3117 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
3119 P0758R1 Implicit conversion traits
3120 * include/std/type_traits [__cplusplus > 201703]
3121 (__is_convertible_helper::__is_nothrow_type): Define new member.
3122 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
3124 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
3125 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
3127 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
3128 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
3129 * testsuite/20_util/is_nothrow_convertible/requirements/
3130 explicit_instantiation.cc: New.
3131 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
3134 P0887R1 The identity metafunction
3135 * include/std/type_traits (type_identity, type_identity_t): Define
3137 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
3138 * testsuite/20_util/type_identity/requirements/
3139 explicit_instantiation.cc:New.
3140 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
3142 * include/bits/regex.h (sub_match::operator string_type): Call str().
3143 (sub_match::compare): Use _M_str() instead of str().
3144 (sub_match::_M_compare): New public function.
3145 (sub_match::__string_view): New helper type.
3146 (sub_match::_M_str): New overloaded functions to avoid creating a
3147 string_type object when not needed.
3148 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
3149 Use sub_match::_M_compare instead of creating string_type objects.
3150 Fix Doxygen comments.
3151 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
3152 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
3154 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
3156 * include/std/type_traits (__enable_if_t): Define for C++11.
3157 * testsuite/28_regex/sub_match/compare.cc: New.
3158 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
3160 (input_iterator_wrapper): Use remove_cv for value_type argument of
3161 std::iterator base class.
3163 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
3165 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
3166 Add whitespace to dejagnu directive.
3167 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
3169 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
3171 * include/bits/stl_vector.h
3172 (struct _Vector_base<>::_Vector_impl_data): New.
3173 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
3174 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
3175 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
3176 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
3177 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
3178 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
3179 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
3180 (_Vector_base()): Default.
3181 (_Vector_base(_Vector_base&&)): Default.
3182 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
3183 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
3184 (_Vector_base::_M_create_storage(size_t)): Make protected.
3185 (vector()): Default.
3186 (vector(vector&&)): Default.
3187 (vector(vector&&, const allocator_type&, true_type)): New.
3188 (vector(vector&&, const allocator_type&, false_type)): New.
3189 (vector(vector&&, const allocator_type&)): Use latters.
3190 (vector(_InputIte, _InputIte, const allocator_type&)): Call
3191 _M_range_initialize directly.
3192 * include/debug/vector
3193 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
3194 * testsuite/23_containers/vector/allocator/default_init.cc: New.
3195 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
3198 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
3200 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
3201 (__is_byte<byte>): Define specialization for std::byte.
3204 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
3205 Declare explicit instantiations of COW empty reps and I/O functions.
3207 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
3209 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
3211 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
3213 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
3215 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
3218 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
3221 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
3222 Replace dict comprehension.
3225 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3228 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
3229 Add try-catch block.
3230 * testsuite/23_containers/vector/cons/86292.cc: New.
3232 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
3234 * include/experimental/algorithm (sample, shuffle): Add new overloads
3235 using per-thread random number engine.
3236 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
3237 dependencies by using __gnu_test::test_container.
3238 * testsuite/experimental/algorithm/sample-2.cc: New.
3239 * testsuite/experimental/algorithm/shuffle.cc: New.
3241 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
3243 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
3244 different size_t mangling on 32-bit targets.
3247 * include/experimental/memory_resource
3248 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
3249 enough for result of left shift.
3252 * include/bits/basic_string.tcc:
3253 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
3254 (basic_string<char>::_Rep::_S_empty_rep_storage)
3255 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
3256 instantiation declarations.
3257 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
3258 explicit instantiation declarations.
3259 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
3260 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
3262 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
3265 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
3266 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
3267 * configure: Regenerate.
3268 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
3269 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
3270 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
3271 (basic_string::insert(iterator, initializer_list<C>)): Suppress
3273 * include/debug/string (basic_string::insert(iterator, C)): Change
3274 first parameter to const_iterator.
3275 (basic_string::insert(iterator, size_type, C)): Likewise. Change
3276 return type to iterator.
3277 (basic_string::insert(iterator, InputIterator, InputIterator)):
3279 (basic_string::insert(iterator, initializer_list<C>)): Change first
3280 parameter to const_iterator and return type to iterator.
3281 * src/c++11/string-inst.cc: Extend comment.
3282 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
3284 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
3286 * testsuite/util/testsuite_abi.cc: Add new symbol version.
3288 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3291 * include/experimental/memory_resource
3292 (__resource_adaptor_imp::do_deallocate): Add missing return.
3293 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
3294 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
3295 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
3296 __gnu_cxx::malloc_allocator.
3299 * include/experimental/memory_resource (__resource_adaptor_common):
3301 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
3302 pointer from unaligned, and vice versa.
3303 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
3304 allocated pointer to meet alignment request.
3305 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
3306 original pointer for deallocation.
3307 (__resource_adaptor_imp::do_is_equal): Reformat.
3308 (__resource_adaptor_imp::_S_aligned_size): Remove.
3309 (__resource_adaptor_imp::_S_supported): Remove.
3310 (new_delete_resource): Use __gnu_cxx::new_allocator.
3311 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
3312 extended alignments and use debug_allocator to check for matching
3313 allocate/deallocate pairs.
3315 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
3317 * include/debug/safe_iterator.h
3318 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
3319 Compare __x base iterator with a value-initialized iterator of the
3322 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
3325 * include/experimental/memory_resource (__resource_adaptor_imp): Add
3326 static assertions to enforce requirements on pointer types.
3327 (__resource_adaptor_imp::get_allocator()): Add noexcept.
3328 (new_delete_resource, null_memory_resource): Return address of an
3329 object with dynamic storage duration.
3330 (__null_memory_resource): Remove.
3331 * testsuite/experimental/memory_resource/70966.cc: New.
3333 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
3334 missed from recent commit.
3336 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
3338 * include/std/utility: Remove unused <exception> header.
3340 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
3342 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
3343 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
3344 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
3345 a specialization of std::pair.
3346 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
3347 pair elements are constructed correctly.
3349 LWG 2989 hide path iostream operators from normal lookup
3350 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
3352 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
3354 LWG 3050 Fix cv-qualification of convertibility constraints
3355 * include/std/chrono (duration, operator*, operator/, operator%): Use
3356 const-qualified type as source type in is_convertible constraints.
3357 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
3358 * testsuite/20_util/duration/cons/dr3050.cc: New.
3359 * testsuite/20_util/duration/literals/range.cc: Rename to...
3360 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
3363 2018-06-18 Maya Rashish <coypu@sdf.org>
3365 * crossconfig.m4: Handle OpenBSD just like NetBSD.
3366 * configure: Rebuilt.
3368 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
3370 P0754R2 <version> header
3371 * include/Makefile.am: Add new header.
3372 * include/Makefile.in: Regenerate.
3373 * include/bits/c++config: Change doxygen comment to suggest <version>
3374 instead of <iosfwd>.
3375 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
3376 unconditionally. Add C++17 and C++20 headers.
3377 * include/std/version: New header.
3378 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
3379 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
3380 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
3381 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
3382 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
3383 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
3384 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
3386 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
3387 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
3388 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
3389 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
3390 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
3391 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
3392 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
3394 * testsuite/18_support/headers/version/macros.cc: New.
3395 * testsuite/18_support/headers/version/macros.cc: New.
3397 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
3398 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
3400 * config.h.in: Regenerate.
3401 * configure: Regenerate.
3402 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
3404 LWG 3035. std::allocator's constructors should be constexpr
3405 * include/bits/allocator.h (allocator): Add constexpr to constructors
3406 for C++2a. Replace dynamic exception specifications with NOTHROW
3408 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
3410 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
3411 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
3412 to constructors for C++2a.
3413 * include/ext/new_allocator.h (new_allocator): Likewise.
3415 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
3417 LWG 3076 basic_string CTAD ambiguity
3418 * doc/xml/manual/intro.xml: Document LWG 3076 change.
3419 * include/bits/basic_string.h
3420 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
3421 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
3422 template constrained by _RequireAllocator.
3423 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
3424 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
3426 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
3428 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3431 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
3434 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3435 (basic_string::data()): Unshare string.
3436 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
3439 * include/std/string_view (basic_string_view(const CharT*)): Remove
3440 check for null pointer and add nonnull attribute.
3441 (compare(const CharT*), compare(size_type, size_type, const CharT*))
3442 (find(const CharT*, size_type), rfind(const CharT*, size_type))
3443 (find_first_of(const CharT*, size_type))
3444 (find_last_of(const CharT*, size_type))
3445 (find_first_not_of(const CharT*, size_type))
3446 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
3447 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
3448 * testsuite/21_strings/basic_string_view/operations/compare/char/
3450 * testsuite/21_strings/basic_string_view/operations/find/char/
3452 * testsuite/21_strings/basic_string_view/operations/rfind/char/
3456 * include/bits/random.h (random_device(const string&)): Remove
3459 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
3460 define for C++17 and above.
3462 LWG 2993 reference_wrapper<T> conversion from T&&
3463 * doc/xml/manual/intro.xml: Document LWG 2993 change.
3464 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
3465 (reference_wrapper(_Tp&&)): Remove.
3466 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
3468 (reference_wrapper): Add deduction guide.
3469 * testsuite/20_util/reference_wrapper/deduction.cc: New.
3470 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
3472 LWG 3039 Unnecessary decay in thread and packaged_task
3473 * include/std/future (__constrain_pkgdtask): Replace with ...
3474 (packaged_task::__not_same): New alias template, using
3475 __remove_cvref_t instead of decay.
3476 * include/std/thread (thread::__not_same): Add comment.
3478 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
3480 LWG 3075 basic_string needs deduction guides from basic_string_view
3481 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
3482 deduction from string views.
3483 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3486 LWG 3074 make scalar types non-deduced in valarray non-member functions
3487 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
3488 scalar parameters to be a non-deduced context.
3489 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
3491 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
3492 * testsuite/26_numerics/valarray/transcend.cc: New.
3494 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
3495 Move back to <utility>.
3496 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
3499 P0935R0 Eradicating unnecessarily explicit default constructors
3500 * include/backward/strstream (strstreambuf): Add non-explicit default
3502 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
3504 * include/bits/regex.h (match_results): Likewise.
3505 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
3506 default constructor.
3507 * testsuite/22_locale/conversions/string/1.cc: Likewise.
3508 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
3509 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
3511 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
3512 macro from <utility> and change type to long.
3513 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
3514 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
3517 P0935R0 Eradicating unnecessarily explicit default constructors
3518 * include/bits/random.h (uniform_real_distribution::param_type)
3519 (normal_distribution::param_type, lognormal_distribution::param_type)
3520 (gamma_distribution::param_type, chi_squared_distribution::param_type)
3521 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
3522 (student_t_distribution::param_type)
3523 (bernoulli_distribution::param_type)
3524 (binomial_distribution::param_type)
3525 (geometric_distribution::param_type)
3526 (negative_binomial_distribution::param_type)
3527 (poisson_distribution::param_type)
3528 (exponential_distribution::param_type)
3529 (weibull_distribution::param_type)
3530 (extreme_value_distribution::param_type): Add non-explicit default
3531 constructors. Remove default argument for first parameter of explicit
3533 * include/bits/uniform_int_dist.h
3534 (uniform_int_distribution::param_type): Likewise.
3535 * include/ext/random
3536 (beta_distribution::param_type, rice_distribution::param_type)
3537 (nakagami_distribution::param_type, pareto_distribution::param_type)
3538 (k_distribution::param_type, arcsine_distribution::param_type)
3539 (hoyt_distribution::param_type, triangular_distribution::param_type)
3540 (von_mises_distribution::param_type)
3541 (hypergeometric_distribution::param_type)
3542 (logistic_distribution::param_type)
3543 (uniform_inside_sphere_distribution::param_type): Likewise.
3544 (uniform_on_sphere_distribution::param_type): Make default constructor
3546 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
3547 Test param_type for non-explicit default constructor.
3548 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
3550 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3552 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3554 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3556 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3558 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3560 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3562 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3564 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3566 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3568 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3570 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3572 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3574 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3576 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3578 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3580 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3582 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3584 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3586 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
3587 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
3588 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
3589 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
3591 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
3592 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
3593 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
3594 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
3596 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
3597 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
3598 * testsuite/ext/random/triangular_distribution/cons/default.cc:
3600 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3602 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3604 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3607 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
3608 Jonathan Wakely <jwakely@redhat.com>
3611 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
3612 Default-construct new elements before moving existing ones.
3613 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
3616 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
3619 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
3621 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
3622 Use node allocator to create and destroy elements.
3623 (forward_list::_Tp_alloc_type): Remove unused typedef.
3624 (forward_list::_Alloc_traits): Use allocator_traits instead of
3625 __gnu_cxx::__alloc_traits.
3627 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
3629 * include/debug/helper_functions.h
3630 (__gnu_debug::_Safe_iterator<>): Add declaration.
3631 (__can_advance(_Ite, _Size)): New.
3632 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
3633 * include/debug/functions.h
3634 (__gnu_debug::_Safe_iterator<>): Remove declaration.
3635 * include/debug/stl_iterator.h
3636 (__can_advance(const _Safe_iterator<>&)): New definition.
3637 * include/debug/stl_iterator.h
3638 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
3639 (__can_advance(const std::move_iterator<>&, _Size)): New.
3640 * include/debug/macros.h (__glibcxx_check_can_increment): New.
3641 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
3642 * include/bits/stl_algobase.h (fill_n): Use latter.
3643 * testsuite/25_algorithms/fill_n/2.cc: New.
3644 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
3645 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
3646 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
3647 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
3649 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
3650 (__glibcxx_requires_can_decrement_range): New.
3652 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
3654 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
3655 (__glibcxx_check_can_decrement_range): New.
3656 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
3657 __glibcxx_requires_can_increment_range.
3658 (std::move(_II, _II, _OI)): Likewise.
3659 (std::copy_backward(_BI, _BI, _BI2)): Use
3660 __glibcxx_requires_can_decrement_range.
3661 (std::move_backward(_BI, _BI, _BI2)): Likewise.
3662 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
3663 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
3664 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
3665 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
3666 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
3667 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
3669 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
3671 P0935R0 Eradicating unnecessarily explicit default constructors
3672 * include/bits/random.h (linear_congruential_engine)
3673 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
3674 (uniform_real_distribution, normal_distribution)
3675 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
3676 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
3677 (bernoulli_distribution, binomial_distribution,geometric_distribution)
3678 (negative_binomial_distribution, exponential_distribution)
3679 (weibull_distribution, extreme_value_distribution): Add non-explicit
3680 default constructors. Remove default argument for first parameter of
3681 explicit constructors.
3682 (piecewise_constant_distribution, piecewise_linear_distribution):
3683 Make default constructor non-explicit.
3684 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
3685 non-explicit default constructors. Remove default argument for first
3686 parameter of explicit constructor.
3687 * include/ext/random
3688 (simd_fast_mersenne_twister_engine, beta_distribution)
3689 (rice_distribution, nakagami_distribution, pareto_distribution)
3690 (k_distribution, arcsine_distribution, hoyt_distribution)
3691 (triangular_distribution, von_mises_distribution)
3692 (hypergeometric_distribution, logistic_distribution)
3693 (uniform_inside_sphere_distribution): Likewise.
3694 (uniform_on_sphere_distribution): Make default constructor
3696 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
3697 Test for non-explicit default constructor. Fix references to standard.
3698 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
3700 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
3702 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
3704 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
3706 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
3708 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
3710 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
3712 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
3714 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
3716 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
3718 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
3720 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
3722 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
3724 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
3726 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
3728 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
3730 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
3732 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
3734 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
3736 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
3737 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
3738 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
3739 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
3741 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
3742 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
3743 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
3744 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
3746 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
3747 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
3748 * testsuite/ext/random/triangular_distribution/cons/default.cc:
3750 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
3752 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
3754 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
3756 * testsuite/util/testsuite_common_types.h
3757 (implicitly_default_constructible): New helper.
3759 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
3761 * include/bits/ios_base.h (ios::Init::Init(const Init&))
3762 (ios::Init::operator=): Define as defaulted.
3763 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
3765 * include/bits/stream_iterator.h (istream_iterator::operator=)
3766 (ostream_iterator::operator=): Likewise.
3767 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
3769 * include/std/bitset (bitset::reference::reference(const reference&)):
3771 * include/std/complex (complex<float>::complex(const complex&))
3772 (complex<double>::complex(const complex&))
3773 (complex<long double>::complex(const complex&)): Likewise.
3775 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
3777 * include/bits/regex.h (sub_match): Add noexcept to default
3778 constructor and length observer.
3779 (match_results): Add noexcept to default constructor and observers
3780 with no preconditions. Define destructor as defaulted.
3781 (operator==, operator!=, swap): Add noexcept.
3782 (regex_iterator): Add default member initializers and define default
3783 constructor and destructor as defaulted. Add noexcept to equality
3784 and dereference operators.
3786 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
3788 * src/c++11/debug.cc
3789 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
3790 (_Safe_iterator_base::_M_detach_single()): Likewise.
3791 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
3792 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
3794 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3796 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
3797 move of const value.
3799 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3802 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
3803 rather than __cpp_transactional_memory >= 201505L.
3805 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
3808 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
3809 Define new partial specialization.
3810 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
3812 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
3813 value not reference for iteration.
3814 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
3816 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
3817 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
3820 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
3822 * include/std/type_traits: Fix comment typos.
3824 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
3826 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
3827 * testsuite/experimental/filesystem/operations/read_symlink.cc:
3830 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
3832 * include/bits/stl_tempbuf.h
3833 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
3834 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
3835 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
3836 * include/bits/stl_algo.h (__stable_partition): Adapt.
3837 (__inplace_merge): Adapt.
3838 (__stable_sort): Adapt.
3840 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
3843 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
3844 unconditionally. Remove redundant declaration.
3845 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
3846 alignment-specifier.
3848 * include/bits/postypes.h (fpos): Define special members as defaulted.
3851 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
3852 the static variable correctly.
3854 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
3856 PR libstdc++/78870 support std::filesystem on Windows
3857 * config.h.in: Regenerate.
3858 * configure: Regenerate.
3859 * configure.ac: Check for link, readlink and symlink.
3860 * include/bits/fs_path.h (path::operator/=(const path&)): Move
3861 definition out of class body.
3862 (path::is_absolute(), path::_M_append(path)): Likewise.
3863 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
3864 (operator>>(basic_istream, path&)): Likewise.
3865 (u8path): Reorder definitions and fix Windows implementation.
3866 (path::is_absolute()): Define inline and fix for Windows.
3867 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
3868 Define POSIX version inline.
3869 (path::_M_append(path)): Define inline.
3870 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
3871 definition out of class body.
3872 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
3874 (operator>>(basic_istream, path&)): Likewise.
3875 (path::is_absolute()): Define inline and fix for Windows.
3876 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
3877 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
3878 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
3879 Define as adaptors for Windows functions/types or as
3880 using-declarations for POSIX functions/types.
3881 (_Dir_base, get_file_type): Qualify names to use declarations from
3882 __gnu_posix namespace.
3883 (_Dir_base::is_dor_or_dotdot): New helper functions.
3884 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
3885 names to use declarations from __gnu_posix namespace.
3886 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
3887 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
3888 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
3889 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
3890 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
3891 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
3892 Define as adaptors for Windows functions/types or as
3893 using-declarations for POSIX functions/types.
3894 (stat_type, do_copy_file): Qualify names to use declarations from
3895 __gnu_posix namespace.
3896 (do_space): Declare new function.
3897 (make_file_type): Only use S_ISLNK if defined.
3898 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
3899 path::value_type not char.
3900 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
3901 names to use declarations from __gnu_posix namespace.
3902 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
3903 add implementation for Windows.
3904 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
3905 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
3906 [!_PC_PATH_MAX]: Don't use pathconf.
3907 [PATH_MAX]: Use if defined.
3908 (filesystem::current_path(const path&, error_code&))
3909 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
3910 (filesystem::last_write_time, filesystem::permissions): Use names
3912 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
3913 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
3914 implementation for Windows.
3915 (filesystem::rename, filesystem::resize_file): Use names from
3917 (filesystem::space): Use do_space.
3918 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
3919 (filesystem::status, filesystem::symlink_status): Use names from
3921 (filesystem::temp_directory_path): Add implementation for Windows.
3922 * src/filesystem/path.cc (dot): Define constant.
3923 (path::replace_extension): Use dot.
3924 (path::_M_find_extension): Likewise. Use path::string_type not
3926 (path::_M_split_cmpts): Use dot.
3927 (filesystem_error::_M_get_what): Use u8string() not native().
3928 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
3929 Qualify names to use declarations from __gnu_posix namespace.
3930 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
3932 (filesystem::absolute(const path&, error_code&)): Add implementation
3934 (char_ptr, filesystem::canonical): Use path::value_type not char.
3935 (do_copy_file): Use names from __gnu_posix.
3936 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
3938 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
3939 names to use declarations from __gnu_posix namespace.
3940 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
3941 add implementation for Windows.
3942 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
3943 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
3944 [!_PC_PATH_MAX]: Don't use pathconf.
3945 [PATH_MAX]: Use if defined.
3946 (filesystem::current_path(const path&, error_code&))
3947 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
3948 (filesystem::last_write_time, filesystem::permissions): Use names
3950 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
3951 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
3952 implementation for Windows.
3953 (filesystem::rename, filesystem::resize_file): Use names from
3956 (filesystem::space): Use do_space.
3957 (filesystem::status, filesystem::symlink_status): Use names from
3959 (filesystem::temp_directory_path): Add implementation for Windows.
3960 * src/filesystem/std-path.cc
3961 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
3963 (dot): Define constant.
3964 (path::replace_extension, is_dot): Use dot.
3965 (path::lexically_normal): Check _M_type instead of calling
3966 non-existent function.
3967 (path::_M_find_extension): Use dot. Use path::string_type not
3969 (path::_M_split_cmpts): Use dot.
3970 (filesystem_error::_M_get_what): Use u8string() not native().
3971 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
3973 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3975 * testsuite/27_io/filesystem/operations/absolute.cc: Use
3976 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
3977 * testsuite/27_io/filesystem/operations/canonical.cc: Use
3978 path::string() to get narrow string, not path::native().
3979 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
3980 with std::filesystem::path not std::basic_string.
3981 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
3982 * testsuite/27_io/filesystem/operations/exists.cc: Use
3983 __gnu_test::root_path() instead of "/".
3984 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
3985 fstreams with std::filesystem::path not std::basic_string.
3986 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
3987 path::string() to get narrow string.
3988 * testsuite/27_io/filesystem/operations/space.cc: Check results for
3989 errors, expect sensible values otherwise.
3990 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
3991 helpers for adjusting the environment on Windows.
3992 * testsuite/27_io/filesystem/path/append/path.cc: Test
3993 Windows-specific behaviour.
3994 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
3995 of path::string_type objects.
3996 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
3997 string to wide string on Windows.
3998 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
3999 for backslash as root-directory.
4000 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
4001 path::string() to get narrow string.
4002 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
4004 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
4006 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
4007 different definintion of absolute paths on Windows.
4008 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4009 Do not use symlinks.
4010 * testsuite/experimental/filesystem/operations/absolute.cc: Test
4012 * testsuite/experimental/filesystem/operations/copy.cc: Construct
4013 fstreams with NTCTS not std::basic_string.
4014 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
4015 * testsuite/experimental/filesystem/operations/exists.cc: Use
4016 __gnu_test::root_path() instead of "/".
4017 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
4018 fstreams with NTCTS not std::basic_string.
4019 * testsuite/experimental/filesystem/operations/last_write_time.cc:
4020 Use path::string() to get narrow string.
4021 * testsuite/experimental/filesystem/operations/space.cc: Use
4022 __gnu_test::root_path() instead of "/".
4023 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
4024 Add helpers for adjusting the environment on Windows.
4025 * testsuite/experimental/filesystem/path/append/path.cc: Use
4026 path::string() to get narrow strings for comparisons.
4027 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
4028 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
4030 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
4031 * testsuite/experimental/filesystem/path/native/string.cc: Use
4032 string_type not std::string.
4033 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
4034 Adjust for different definintion of absolute paths on Windows.
4035 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
4037 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
4040 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
4043 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
4044 uint_least16_t and uint_least32_t.
4045 (__make_unsigned<wchar_t>): Define unconditionally.
4046 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
4048 (__make_unsigned_selector_base): New type to provide helper templates.
4049 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
4050 __make_unsigned_selector_base helpers.
4051 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
4052 (__make_signed_selector<_Tp, true, false>): Remove intermediate
4054 (__make_signed<wchar_t>, __make_signed<char16_t>)
4055 (__make_signed<char32_t>)): Define unconditionally.
4056 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
4057 wchar_t, char16_t and char32_t are transformed correctly.
4058 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
4060 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
4061 wchar_t, char16_t and char32_t are transformed correctly.
4062 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
4065 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
4067 * include/std/variant (__erased_dtor): Qualify call to __get.
4069 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
4071 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
4072 (_Rb_tree(const allocator_type&)): Use latter.
4073 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
4074 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
4075 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
4076 * include/bits/stl_multimap.h
4077 (multimap(const allocator_type&)): Likewise.
4078 (multimap(initializer_list<value_type>, const allocator_type&)):
4080 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
4082 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
4083 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
4084 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
4085 * include/bits/stl_multiset.h
4086 (multiset(const allocator_type&)): Likewise.
4087 (multiset(initializer_list<value_type>, const allocator_type&)):
4089 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
4092 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
4095 * src/c++11/debug.cc: Remove backtrace usage.
4097 2018-05-24 Maya Rashish <coypu@sdf.org>
4100 * crossconfig.m4: Test for aligned_alloc on netbsd.
4101 * configure: Regenerate.
4103 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
4107 * include/bits/atomic_base.h (__atomic_base::value_type)
4108 (__atomic_base::difference_type): Add new typedefs.
4109 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
4110 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
4111 (atomic<T*>::operator++, atomic<T*>::operator--)
4112 (atomic<T*>::operator+=, atomic<T*>::operator-=)
4113 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
4114 to enforce C++17 requirement on pointer arithmetic.
4115 (__atomic_val_t, __atomic_diff_t): New alias templates.
4116 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
4117 (atomic_compare_exchange_weak_explicit)
4118 (atomic_compare_exchange_strong_explicit, atomic_store)
4119 (atomic_exchange, atomic_compare_exchange_weak)
4120 (atomic_compare_exchange_strong): Use __atomic_val_t to make
4121 scalar parameters be non-deduced contexts.
4122 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
4123 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
4124 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
4126 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
4127 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
4128 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
4129 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
4130 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
4132 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
4133 * testsuite/29_atomics/atomic/69769.cc: New test.
4134 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
4135 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
4136 Disable test for C++17 and later.
4137 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
4138 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
4139 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
4142 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
4144 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
4145 template to alias template.
4146 (path::__value_type_is_char): Use remove_const_t.
4147 (path:_S_string_from_iter): New helper function.
4148 (path::_S_convert(InputIter, __null_terminated))
4149 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
4150 Use _S_string_from_iter.
4151 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
4152 rep for COW strings.
4153 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
4154 Change from class template to alias template.
4155 (path::__value_type_is_char): Use remove_const.
4156 (path:_S_string_from_iter): New helper function.
4157 (path::_S_convert(InputIter, __null_terminated))
4158 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
4159 Use _S_string_from_iter.
4160 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
4162 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
4163 string equality, not path equivalence.
4164 * testsuite/27_io/filesystem/path/construct/format.cc: Check
4165 construction from std::string and std::wstring and input iterators.
4166 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
4167 construction from iterators.
4168 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
4169 exact string equality, not path equivalence.
4170 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
4171 construction from iterators.
4173 * include/bits/fs_path.h (path::_M_type): Change default member
4174 initializer to _Filename.
4175 (path::begin): Create past-the-end iterator for empty path.
4176 * src/filesystem/std-path.cc (path::remove_filename()): Remove
4178 (path::has_relative_path()): Return false for empty filenames.
4179 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
4180 Fix offset of empty final component.
4181 * testsuite/27_io/filesystem/path/itr/components.cc: New.
4182 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
4184 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
4186 Add support for opening file streams from wide character strings.
4187 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
4188 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
4189 Define new overload.
4190 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
4191 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
4192 Declare new overload.
4193 * configure.ac: Check for _wfopen.
4194 * crossconfig.m4: Likewise.
4195 * configure: Regenerate.
4196 * config.h.in: Regenerate.
4197 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
4198 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
4199 Define new overload.
4200 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
4201 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
4202 Declare new overload.
4203 [_GLIBCXX_HAVE__WFOPEN]
4204 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4205 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
4206 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4207 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
4208 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
4209 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
4211 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
4212 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
4213 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
4214 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
4215 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
4216 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
4217 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
4219 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
4222 * include/bits/stl_tree.h
4223 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
4226 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
4228 * src/filesystem/std-ops.cc (absolute): Report an error for empty
4230 (weakly_canonical(const path&)): Do not call canonical on empty path.
4231 (weakly_canonical(const path&, error_code&)): Likewise.
4232 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
4235 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
4236 dg-require-filesystem-ts.
4239 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
4240 initialize base class to avoid warnings.
4242 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
4244 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
4245 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
4246 little_endian element in bitmask.
4247 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
4248 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
4250 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
4252 * include/bits/stl_tree.h
4253 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
4254 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
4255 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
4256 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
4257 * include/debug/map.h
4258 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
4259 * include/debug/multimap.h
4260 (multimap(multimap&&, const_allocator_type&)): Likewise.
4261 * include/debug/set.h
4262 (set(set&&, const_allocator_type&)): Likewise.
4263 * include/debug/multiset.h
4264 (multiset(multiset&&, const_allocator_type&)): Likewise.
4265 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
4267 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
4269 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
4271 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
4273 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
4275 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
4277 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
4279 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
4282 2018-05-18 Jason Merrill <jason@redhat.com>
4284 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
4285 for conversion to const_iterator. Add defaulted copy ops.
4286 * libsupc++/new (bad_alloc): Add defaulted copy ops.
4287 * libsupc++/exception.h (exception): Add defaulted copy ops.
4288 * include/std/system_error (system_error): Add defaulted copy ops.
4289 * include/std/stdexcept (domain_error, invalid_argument)
4290 (length_error, out_of_range, range_error, overflow_error)
4291 (underflow_error): Add defaulted copy ops.
4292 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
4294 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
4295 * include/ext/throw_allocator.h (condition_base): Add defaulted
4296 default and copy ctor and copy assignment.
4298 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
4301 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
4302 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
4303 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
4304 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
4306 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
4308 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
4309 braces around body of do-while.
4310 * testsuite/28_regex/basic_regex/85098.cc: New
4312 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
4315 * src/filesystem/path.cc (path::preferred_separator): Add used
4317 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
4320 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
4321 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
4322 Refactor to separate non-throwing and throwing implementations.
4323 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
4324 if constructing the object throws.
4326 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
4329 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
4330 (linear_congruential_engine, mersenne_twister_engine)
4331 (subtract_with_carry_engine, discard_block_engine)
4332 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
4333 constrain function templates taking seed sequences.
4334 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
4335 (mersenne_twister_engine::seed(_Sseq&))
4336 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
4338 * include/ext/random (simd_fast_mersenne_twister_engine): Use
4339 __is_seed_seq to constrain function templates taking seed sequences.
4340 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
4341 Change return type to match declaration.
4342 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
4344 * testsuite/26_numerics/random/independent_bits_engine/cons/
4346 * testsuite/26_numerics/random/linear_congruential_engine/cons/
4348 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
4350 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4351 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
4353 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
4355 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
4359 * include/bits/fs_path.h (path::is_absolute()): Use same definition
4360 for all operating systems.
4361 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
4362 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
4363 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
4364 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
4366 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
4367 unused <vector> header.
4368 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
4369 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
4370 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
4371 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
4372 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
4374 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
4376 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
4377 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
4378 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
4379 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
4380 * testsuite/experimental/filesystem/path/decompose/extension.cc:
4382 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
4383 * testsuite/experimental/filesystem/path/query/has_extension.cc:
4385 * testsuite/experimental/filesystem/path/query/has_filename.cc:
4387 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
4389 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
4391 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
4393 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
4395 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
4397 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
4398 * testsuite/experimental/filesystem/path/query/is_relative.cc:
4402 * include/bits/fs_path.h (path::operator/=, path::append): Construct
4403 temporary path before calling _M_append.
4404 (path::_M_append): Change parameter to path and implement C++17
4406 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
4407 and more examples from the standard.
4408 * testsuite/27_io/filesystem/path/append/source.cc: New.
4409 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
4410 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
4412 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
4413 __invoke to prevent ADL.
4415 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
4418 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
4419 exceptions from _M_terminate_output().
4420 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
4421 exceptions from close().
4422 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
4424 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
4425 (__valarray_get_storage): Call operator new directly. Remove ignored
4426 top-level restrict qualifier and add malloc attribute instead.
4427 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
4430 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
4431 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
4434 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
4436 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
4438 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
4441 * testsuite/20_util/variant/80165.cc: New.
4443 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
4445 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
4446 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
4447 of C++11 containers with Debug Mode support.
4448 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
4449 * doc/html/*: Regenerate.
4451 2018-05-10 Jason Merrill <jason@redhat.com>
4453 * include/bits/regex_compiler.h (_S_cache_size): Change from
4454 function to variable.
4456 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4458 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
4459 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
4460 argument defaulted to +1. Doxy comments on same.
4461 * testsuite/special_functions/02_assoc_legendre/
4462 check_value.cc: Regen.
4463 * testsuite/tr1/5_numerical_facilities/special_functions/
4464 02_assoc_legendre/check_value.cc: Regen.
4466 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
4469 * include/bits/c++config.h (__replacement_assert): Add linkage
4471 * include/bits/std_abs.h: Add comment to closing brace of block.
4472 * include/c_global/cstddef: Add linkage specification.
4473 * include/c_global/cstring: Likewise.
4474 * include/c_global/cwchar: Likewise.
4476 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
4478 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
4480 (_Safe_iterator<>::_S_constant()): ...that.
4481 * include/debug/safe_local_iterator.h
4482 (_Safe_local_iterator<>::_M_constant()): Rename in...
4483 (_Safe_local_iterator<>::_S_constant()): ...that.
4484 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
4485 (_Iterator_state::__rbegin): New.
4486 (_Iterator_state::__rmiddle): New.
4487 (_Iterator_state::__rend): New.
4488 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
4489 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
4491 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
4492 _Is_iterator)): Likewise.
4493 (_Parameter::_S_reverse_state(_Iterator_state)): New.
4494 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
4495 _Is_iterator)): New.
4496 (_Parameter(std::reverse_iterator<> const&, const char*,
4497 _Is_iterator)): New.
4498 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
4499 const char*, _Is_iterator)): New.
4500 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
4502 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
4503 _Is_iterator)): New.
4504 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
4505 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
4506 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
4508 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
4510 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
4511 Use constexpr if in C++17 mode.
4512 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
4513 Copy from const object.
4514 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
4516 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
4518 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
4519 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
4522 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
4523 * include/debug/functions.h (__check_valid_range): Use latter.
4524 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
4526 * include/debug/deque
4527 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4528 * include/debug/forward_list
4529 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
4531 * include/debug/list
4532 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4533 * include/debug/list
4534 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4535 * include/debug/map.h
4536 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4537 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4539 * include/debug/multimap.h
4540 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4541 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
4542 const _Alloc&)): Likewise.
4543 * include/debug/set.h
4544 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4545 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
4547 * include/debug/multiset.h
4548 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
4549 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
4550 const _Alloc&)): Likewise.
4551 * include/debug/string
4552 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
4554 * include/debug/unordered_map
4555 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
4557 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
4558 const _Alloc&)): Likewise.
4559 * include/debug/unordered_set
4560 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
4562 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
4563 const _Alloc&)): Likewise.
4564 * include/debug/vector
4565 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
4567 * include/debug/formatter.h (_Error_formatter::_M_function): New.
4568 (_Error_formatter(const char*, unsigned int)): Adapt.
4569 (_Error_formatter::_M_at): Rename in...
4570 (_Error_formatter::_S_at): ...that and adapt.
4571 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
4572 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
4573 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
4576 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
4578 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
4579 Use normal std::vector even in Debug Mode.
4582 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
4583 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
4584 * include/Makefile.in: Regenerate.
4585 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
4586 within conditional block.
4588 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
4590 * doc/xml/manual/using.xml (table.cmd_options): Document that the
4591 C++17 Filesystem implementation also needs -lstdc++fs.
4594 * include/bits/fs_path.h (operator/): Permit copy elision.
4595 * include/experimental/bits/fs_path.h (operator/): Likewise.
4597 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
4599 Moar PR libstdc++/80506
4600 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
4601 Fix magic number used in loop condition.
4603 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
4605 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
4606 * include/std/optional (_Optional_payload): Add noexcept to default
4607 constructor. Re-indent.
4608 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
4609 constructor for copying disengaged payloads.
4610 (_Optional_payload<_Tp, true, false, true>): Likewise.
4611 (_Optional_payload<_Tp, true, true, false>): Likewise.
4612 (_Optional_payload<_Tp, true, false, false>): Likewise.
4613 * testsuite/20_util/optional/cons/85642.cc: New.
4614 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
4616 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
4619 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
4620 inline definitions instead of using-declarations.
4621 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
4622 * testsuite/tr1/5_numerical_facilities/special_functions/
4623 07_conf_hyperg/compile_cxx17.cc: New.
4624 * testsuite/tr1/5_numerical_facilities/special_functions/
4625 17_hyperg/compile_cxx17.cc: New.
4628 * include/std/variant (visit): Qualify std::get call.
4630 PR libstdc++/85632 use uintmax_t for arithmetic
4631 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
4632 arithmetic in result type.
4633 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
4634 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
4635 is greater than free space.
4636 * testsuite/experimental/filesystem/operations/space.cc: New.
4638 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
4639 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
4641 * testsuite/20_util/remove_cvref/value.cc: New.
4642 * testsuite/20_util/remove_cvref/value_ext.cc: New.
4644 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
4645 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
4646 (append(const basic_string&, size_type, size_type)
4647 (assign(const basic_string&, size_type, size_type)
4648 (insert(size_type, const basic_string&, size_type, size_type)
4649 (replace(size_type,size_type,const basic_string&,size_type,size_type)
4650 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4651 Add default arguments (LWG 2268).
4652 [_GLIBCXX_USE_CXX11_ABI=0]
4653 (append(const basic_string&, size_type, size_type)
4654 (assign(const basic_string&, size_type, size_type)
4655 (insert(size_type, const basic_string&, size_type, size_type)
4656 (replace(size_type,size_type,const basic_string&,size_type,size_type)
4657 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
4659 * testsuite/21_strings/basic_string/dr2268.cc: New test.
4662 * include/std/thread (thread::__not_same): New SFINAE helper.
4663 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
4664 first argument is not a std::thread. Add static assertion to check
4665 INVOKE expression is valid.
4666 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
4667 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
4668 __invoke_result for return types and remove exception specifications.
4669 * testsuite/30_threads/thread/cons/84535.cc: New.
4671 * include/std/future (__async_result_of): Use __invoke_result instead
4674 * include/std/any (any_cast): Use __remove_cvref_t.
4675 * include/std/tuple (__make_tuple): Likewise.
4676 * include/std/type_traits (__remove_cvref_t): Define.
4677 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
4678 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
4679 * include/std/variant (__erased_hash): Use __remove_cvref_t.
4681 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
4683 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
4684 ensure overloaded comma not used.
4685 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
4686 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
4687 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
4688 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
4689 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
4690 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
4691 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
4693 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
4696 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
4697 indices to unsigned.
4698 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
4699 as failure. Refactor error handling.
4700 * testsuite/27_io/ios_base/storage/68197.cc: New.
4704 * include/bits/gslice_array.h (gslice_array): Define default
4705 constructor as deleted, as per C++11 standard.
4706 * include/bits/mask_array.h (mask_array): Likewise.
4707 * include/bits/slice_array.h (slice_array): Likewise.
4708 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
4709 to namespace __detail.
4710 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
4712 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
4713 of data members in closure objects.
4714 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
4715 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
4717 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
4718 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
4719 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
4720 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
4721 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
4722 using-declarations to namespace std.
4723 * testsuite/26_numerics/valarray/83860.cc: New.
4725 * testsuite/backward/strstream_move.cc: Remove duplicate function
4729 * include/backward/strstream (strstreambuf): Define move constructor
4730 and move assignment operator.
4731 (istrstream, ostrstream, strstream): Likewise.
4732 * testsuite/backward/strstream_move.cc: New.
4734 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
4737 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
4738 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
4739 * configure: Regenerate.
4740 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
4741 based on ENABLE_FLOAT128.
4742 * include/Makefile.in: Regenerate.
4743 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
4744 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
4745 _GLIBCXX_USE_FLOAT128.
4747 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
4749 * configure: Regenerated.
4751 2018-04-19 Jakub Jelinek <jakub@redhat.com>
4753 * configure: Regenerated.
4755 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4756 Jakub Jelinek <jakub@redhat.com>
4759 * src/c++11/Makefile.am: Don't generate debuginfo again for
4760 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
4761 * src/c++11/Makefile.in: Regenerate.
4763 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
4766 * testsuite/30_threads/thread/cons/terminate.cc
4767 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
4769 2018-04-18 David Malcolm <dmalcolm@redhat.com>
4772 * configure: Regenerate.
4774 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
4776 * testsuite/experimental/filesystem/file_status/1.cc: Add
4777 -DUSE_FILESYSTEM_TS to dg-options.
4778 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
4780 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
4781 * testsuite/experimental/filesystem/iterators/
4782 recursive_directory_iterator.cc: Likewise.
4783 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
4784 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
4785 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4786 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
4787 * testsuite/experimental/filesystem/operations/create_directories.cc:
4789 * testsuite/experimental/filesystem/operations/create_directory.cc:
4791 * testsuite/experimental/filesystem/operations/create_symlink.cc:
4793 * testsuite/experimental/filesystem/operations/current_path.cc:
4795 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
4796 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
4797 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
4798 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
4799 * testsuite/experimental/filesystem/operations/last_write_time.cc:
4801 * testsuite/experimental/filesystem/operations/permissions.cc:
4803 * testsuite/experimental/filesystem/operations/read_symlink.cc:
4805 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
4806 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
4807 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
4808 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
4810 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
4811 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
4812 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
4813 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
4814 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
4815 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
4816 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
4817 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
4818 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
4819 * testsuite/experimental/filesystem/path/construct/default.cc:
4821 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
4822 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
4823 * testsuite/experimental/filesystem/path/construct/string_view.cc:
4825 * testsuite/experimental/filesystem/path/decompose/extension.cc:
4827 * testsuite/experimental/filesystem/path/decompose/filename.cc:
4829 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
4831 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
4833 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
4835 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
4837 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
4839 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
4840 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4842 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
4843 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
4844 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
4846 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
4848 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
4850 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
4852 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
4853 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
4854 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
4856 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
4857 * testsuite/experimental/filesystem/path/query/has_extension.cc:
4859 * testsuite/experimental/filesystem/path/query/has_filename.cc:
4861 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
4863 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
4865 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
4867 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
4869 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
4871 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
4872 * testsuite/experimental/filesystem/path/query/is_relative.cc:
4875 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
4877 * src/c++11/Makefile.am: Fix sed command.
4878 * src/c++11/Makefile.in: Regenerate.
4880 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
4881 handle mangled names starting with double underscores on darwin.
4882 * src/c++11/Makefile.in: Regenerate.
4884 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
4886 * src/c++11/Makefile.am: Fix comment.
4887 * src/c++11/Makefile.in: Regenerate.
4888 * src/c++11/cxx11-ios_failure.cc: Fix comment.
4889 * src/c++98/ios_failure.cc: Likewise.
4891 * src/c++11/ios.cc: Remove redundant macro definition.
4893 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
4895 * doc/xml/manual/abi.xml: Document header locations in recent
4897 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
4898 * doc/xml/manual/spine.xml: Update copyright years.
4899 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
4900 undefined behaviour.
4901 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
4902 * doc/html/*: Regenerate.
4904 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
4906 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
4907 * doc/xml/manual/backwards_compatibility.xml: Likewise.
4908 * doc/xml/manual/containers.xml: Likewise.
4909 * doc/xml/manual/debug_mode.xml: Likewise.
4910 * doc/xml/manual/extensions.xml: Likewise.
4911 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
4912 * doc/xml/manual/using.xml: Likewise.
4913 * doc/xml/manual/utilities.xml: Likewise.
4916 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
4917 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
4918 * src/c++11/Makefile.in: Regenerate.
4919 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
4921 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
4922 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
4923 * src/c++98/ios_failure.cc (__construct_ios_failure)
4924 (__destroy_ios_failure, is_ios_failure_handler): New functions.
4925 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
4926 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
4927 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
4928 handler types, to always catch std::ios_base::failure.
4929 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
4930 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
4931 exceptions_failbit.cc: Likewise.
4932 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
4933 exceptions_failbit.cc: Likewise.
4934 * testsuite/27_io/basic_istream/extractors_other/char/
4935 exceptions_null.cc: Likewise.
4936 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
4937 exceptions_null.cc: Likewise.
4938 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
4939 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
4940 * testsuite/27_io/basic_ostream/inserters_other/char/
4941 exceptions_null.cc: Likewise.
4942 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
4943 exceptions_null.cc: Likewise.
4944 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
4946 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
4948 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
4949 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
4951 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
4954 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
4956 * testsuite/20_util/variant/85183.cc: New.
4958 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
4960 * include/std/variant (__get): Qualify calls to avoid ADL.
4961 (__select_index): Adjust whitespace.
4962 (variant): Add using-declaration to workaround Clang bug.
4964 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
4967 * include/bits/stl_function.h (greater::__not_overloaded)
4968 (less::__not_overloaded, greater_equal::__not_overloaded)
4969 (less_equal::__not_overloaded): Fix ambiguous specializations.
4970 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
4971 tests for type with overloaded operators.
4973 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4976 * testsuite/experimental/memory_resource/resource_adaptor.cc:
4977 xfail execution on 32-bit Solaris/x86.
4979 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
4981 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
4982 VERIFY instead of assert.
4983 * testsuite/20_util/hash/84998.cc: New test.
4984 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
4985 copy of test adjusted for Debug Mode.
4986 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
4989 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
4992 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
4993 * include/std/bitset: Likewise.
4994 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
4996 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
4997 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
4998 * include/bits/stl_set.h (std::set<>): Likewise.
4999 * include/bits/unordered_map.h (std::unordered_map<>): Fix
5000 _Hash_merge_helper friend declaration.
5001 (std::unordered_multimap<>): Likewise.
5002 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
5003 (std::unordered_multiset<>): Likewise.
5005 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
5007 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
5008 trailing slash for domain level link.
5009 * doc/xml/faq.xml: Ditto.
5010 * doc/xml/manual/appendix_free.xml (software): Ditto.
5011 * doc/xml/manual/intro.xml: Ditto.
5012 * doc/xml/manual/spine.xml: Ditto.
5013 * doc/xml/spine.xml: Ditto.
5015 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
5017 * doc/xml/manual/documentation_hacking.xml: Adjust link to
5020 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
5022 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
5023 to compile as C++98.
5025 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
5028 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
5029 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
5030 to ensure total order for pointers.
5031 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
5032 Add operator() overloads for pointer arguments and make generic
5033 overloads dispatch to new _S_cmp functions when comparisons would
5034 use built-in operators for pointers.
5035 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
5037 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
5041 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
5042 * configure: Regenerate.
5043 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
5044 (aligned_alloc): Add using-declaration.
5045 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
5047 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
5049 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
5050 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
5053 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
5056 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
5057 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
5059 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
5060 src/filesystem/std-ops.cc (create_dir): Likewise.
5062 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
5064 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
5065 (StdListIteratorPrinter): Inherit from latter.
5066 (StdFwdListIteratorPrinter): New, inherit from latter.
5067 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
5068 when iterator has no associated container.
5069 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
5070 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
5072 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
5073 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
5075 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
5078 * include/std/optional (_Optional_payload): Split into multiple
5079 specializations that can handle different cases of trivial or
5080 non-trivial assignment operators.
5081 * testsuite/20_util/optional/84601.cc: New.
5082 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
5084 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
5087 * include/bits/parse_numbers.h (_Number_help): Add partial
5088 specialization to handle digit separators. Adjust partial
5089 specialization for recursion temrination to require _Pow == 1ULL.
5090 * testsuite/20_util/duration/literals/84671.cc: New
5092 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
5094 Implement the missing bits of LWG 2769
5095 * include/std/any (any_cast(const any&)): Add static_assert.
5096 (any_cast(any&)): Likewise.
5097 (any_cast(any&&)): Likewise, and remove the handling
5098 for copyable-but-not-movable type.
5099 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
5100 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
5103 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
5106 * include/std/thread (thread::__make_invoker): Construct tuple
5107 directly instead of using make_tuple.
5108 * testsuite/30_threads/async/84532.cc: New.
5109 * testsuite/30_threads/thread/84532.cc: New.
5111 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
5113 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
5114 (template<> __aligned_buffer): Define as __aligned_membuf alias.
5116 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
5119 * configure: Regenerate.
5121 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
5124 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
5125 * configure: Regenerate.
5126 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
5128 * include/Makefile.in: Regenerate.
5130 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
5133 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
5134 Add -ffloat-store to options for m68k and ia32.
5136 * doc/xml/faq.xml: Update copyright years.
5137 * doc/html/*: Regenerate.
5140 * include/std/any (any::__do_emplace): Only set _M_manager after
5141 constructing the contained object.
5142 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
5143 * testsuite/20_util/any/modifiers/83658.cc: New test.
5145 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
5148 * include/c_global/cstddef (__byte_operand): Define primary template.
5149 * testsuite/18_support/byte/81076.cc: New test.
5151 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
5153 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
5154 dg-options and dg-add-options order.
5155 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
5156 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
5158 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
5159 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
5161 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
5163 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
5164 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
5166 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
5168 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
5170 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
5172 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
5174 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
5176 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
5178 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
5180 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
5181 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
5182 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
5183 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
5184 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
5185 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
5186 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
5187 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
5188 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
5190 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
5192 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
5194 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
5197 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
5199 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
5200 include linux/types.h when checking linux/random.h header.
5201 * config.h.in: Regenerate.
5203 * src/c++11/random.cc: Conditionally include linux/types.h.
5205 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
5207 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
5209 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
5212 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
5213 pattern with exact match for std::cerr.
5215 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
5218 * include/bits/random.h (chi_squared_distribution::param): Update
5219 gamma distribution parameter.
5220 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
5224 * include/std/type_traits (has_unique_object_representations_v): Add
5226 * testsuite/20_util/has_unique_object_representations/value.cc: Check
5229 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
5231 Make optional conditionally
5232 trivially_{copy,move}_{constructible,assignable}
5233 * include/std/optional (_Optional_payload): Fix the comment in
5234 the class head and turn into a primary and one specialization.
5235 (_Optional_payload::_M_engaged): Strike the NSDMI.
5236 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
5238 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
5240 (_Optional_payload<_Tp, false>::_M_get): Likewise.
5241 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
5242 (_Optional_base_impl): Likewise.
5243 (_Optional_base): Turn into a primary and three specializations.
5244 (optional(nullopt)): Change the base init.
5245 * testsuite/20_util/optional/assignment/8.cc: New.
5246 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
5247 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
5249 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
5252 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
5253 (get_template_arg_list): New.
5254 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
5256 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
5257 of strings and regular expressions.
5258 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
5259 (FilteringTypePrinter): Add docstring. Match using startswith. Use
5260 strip_inline_namespaces instead of strip_versioned_namespace.
5261 (add_one_type_printer): Prepend namespace to match argument.
5262 (register_type_printers): Add type printers for char16_t and char32_t
5263 string types and for types using cxx11 ABI. Update calls to
5264 add_one_template_type_printer to provide default argument dicts.
5265 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
5266 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
5267 basic_string<unsigned char> and basic_string<signed char>.
5268 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
5269 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
5271 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
5274 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
5276 2018-01-13 Tim Shen <timshen@google.com>
5279 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
5280 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
5281 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
5283 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5286 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
5287 Remove dg-xfail-run-if.
5289 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
5291 * include/bits/forward_list.h
5292 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
5293 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
5294 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
5295 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
5296 (_Fwd_list_impl()): Add noexcept qualification.
5297 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
5298 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
5299 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
5300 (_Fwd_list_base()): Default.
5301 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
5302 (_Fwd_list_base(_Fwd_list_base&&)): Default.
5303 (forward_list<>()): Default.
5304 (forward_list<>(forward_list&&)): Default.
5305 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
5306 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
5307 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
5308 * include/bits/forward_list.tcc
5309 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
5310 _M_impl._M_head move assignment.
5311 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
5312 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
5314 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
5317 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
5318 (UniquePointerPrinter): Print correct template argument, not type of
5320 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
5322 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
5324 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
5325 weak_ptr of array types.
5327 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
5330 * include/bits/hashtable_policy.h
5331 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
5333 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
5334 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
5335 Add false_type parameter.
5336 (_Insert_base::insert): Adapt.
5337 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
5339 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
5340 Add __n_elt parameter, defaulted to 1.
5341 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
5342 policy _M_need_rehash.
5343 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
5344 produce only 1 rehash if necessary.
5345 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
5346 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
5348 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
5349 Jonathan Wakely <jwakely@redhat.com>
5351 PR libstdc++/59253 (partial)
5352 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
5353 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
5354 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
5356 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
5357 of unique_ptr printer.
5358 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
5359 output of shared_ptr printer.
5361 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
5364 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
5365 unnecessary symlink_status call.
5366 (remove_all(const path&, error_code&)): Use filesystem::remove.
5367 * src/filesystem/std-ops.cc: Likewise.
5370 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
5374 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
5375 report an error for ENOENT.
5376 (remove_all(const path&)): Fix type of result variable.
5377 (remove_all(const path&, error_code&)): Use non-throwing increment
5378 for directory iterator. Call POSIX remove directly to avoid redundant
5379 calls to symlink_status. Do not report errors for ENOENT.
5380 * src/filesystem/std-ops.cc: Likewise.
5381 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
5383 * testsuite/experimental/filesystem/operations/remove_all.cc:
5386 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
5389 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
5390 redundant call to ec.clear().
5391 (remove_all(const path&, error_code&))): Do not return an error for
5393 * src/filesystem/std-ops.cc: Likewise.
5394 * testsuite/27_io/filesystem/operations/remove.cc: New test.
5395 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
5396 results for non-existent paths.
5397 * testsuite/experimental/filesystem/operations/remove.cc: New test.
5398 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
5399 expected results for non-existent paths.
5401 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
5402 check status_known once.
5403 * include/experimental/bits/fs_ops.h: Likewise.
5406 * include/std/functional (__is_byte_like): New trait.
5407 (__is_std_equal_to): Remove.
5408 (__boyer_moore_base_t): Use __is_byte_like instead of
5410 * include/experimental/functional (__is_std_equal_to): Remove.
5411 (__boyer_moore_base_t): Use __is_byte_like instead of
5413 * testsuite/20_util/function_objects/83607.cc: New test.
5415 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
5417 Protect optional's deduction guide with the feature macro
5418 * include/std/optional: Use the feature macro.
5420 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5422 Update copyright years.
5424 Copyright (C) 2018 Free Software Foundation, Inc.
5426 Copying and distribution of this file, with or without modification,
5427 are permitted in any medium without royalty provided the copyright
5428 notice and this notice are preserved.