PR libstdc++/87061 remove pmr type aliases for COW strings
[gcc.git] / libstdc++-v3 / ChangeLog
1 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
2
3 PR libstdc++/87061
4 * include/experimental/regex [!_GLIBCXX_USE_CXX11_ABI]
5 (experimental::pmr::match_results, experimental::pmr::cmatch)
6 (experimental::pmr::smatch, experimental::pmr::wcmatch)
7 (experimental::pmr::wsmatch): Do not declare for gcc4-compatible ABI,
8 because COW strings don't support C++11 allocator model.
9 * include/experimental/string [!_GLIBCXX_USE_CXX11_ABI]
10 (experimental::pmr::basic_string, experimental::pmr::string)
11 (experimental::pmr::u16string, experimental::pmr::u32string)
12 (experimental::pmr::wstring): Likewise.
13 * include/std/regex [!_GLIBCXX_USE_CXX11_ABI] (pmr::match_results)
14 (pmr::cmatch, pmr::smatch, pmr::wcmatch, pmr::wsmatch): Likewise.
15 * include/std/string [!_GLIBCXX_USE_CXX11_ABI] (pmr::basic_string)
16 (pmr::string, pmr::u16string, pmr::u32string, pmr::wstring): Likewise.
17 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Require
18 cxx11-abi.
19 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
20
21 PR libstdc++/78448
22 * include/bits/deque.tcc (deque::_M_range_initialize): Use
23 _S_check_init_len to check size.
24 (deque::_M_push_back_aux, deque::_M_push_front_aux): Throw length
25 error if size would exceed max_size().
26 * include/bits/stl_deque.h (_Deque_base::size_type): Remove typedef.
27 (_Deque_base(_Deque_base&&, const allocator_type&, size_t)): Use
28 size_t instead of size_type.
29 (deq(size_type, const allocator_type&)
30 (deq(size_type, const value_type&, const allocator_type&)
31 (deque::_M_initialize_dispatch): Use _S_check_init_len to check size.
32 (deque::max_size): Call _S_max_size.
33 (deque::_S_check_init_len, deque::_S_max_size): New functions.
34 * include/bits/stl_vector.h (vector(size_type, const allocator_type&))
35 (vector(size_type, const value_type&, const allocator_type&))
36 (vector::_M_initialize_dispatch, vector::_M_range_initialize): Use
37 _S_check_init_len to check size.
38 (vector::max_size): Call _S_max_size.
39 (vector::_M_check_len): Prevent max from being expanded as a
40 function-like macro.
41 (vector::_S_check_init_len, vector::_S_max_size): New functions.
42 * include/bits/vector.tcc (vector::_M_assign_aux): Use
43 _S_check_init_len to check size.
44 * testsuite/23_containers/deque/capacity/max_size.cc: New test.
45 * testsuite/23_containers/vector/capacity/max_size.cc: New test.
46
47 2018-08-22 François Dumont <fdumont@gcc.gnu.org>
48
49 PR libstdc++/68222
50 * include/debug/safe_iterator.h
51 (_Safe_iterator<_It, _Sq, _Cat>): Add category template parameter.
52 (_Safe_iterator<>::_Const_iterator): Remove.
53 (_Safe_iterator<>::_IsConstant): New.
54 (_Safe_iterator<>::_OtherIterator): New.
55 (_Safe_iterator<_It, _Sq, _Cat>::_Safe_iterator<_MutIte>(
56 const _Safe_iterator<_MutIte, _Sq, _Cat>&)): Add _IsConstant::__value in
57 __gnu_cxx::__enable_if condition.
58 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to): New.
59 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_from_begin): New.
60 (_Safe_iterator<_It, _Sq, _Cat>::_M_get_distance_to_end): New.
61 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>): New.
62 (_Safe_iterator<_It, _Sq, _Cat>::operator--()): Move...
63 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
64 ::operator--()): ...here.
65 (_Safe_iterator<_It, _Sq, _Cat>::operator--(int)): Move...
66 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
67 ::operator--(int)): ...here.
68 (_Safe_iterator<_It, _Sq, _Cat>::_M_decrementable()): Move...
69 (_Safe_iterator<_It, _Sq, std::bidirectional_iterator_tag>
70 ::_M_decrementable()): ...here.
71 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>): New.
72 (_Safe_iterator<_It, _Sq, _Cat>::operator[](const difference_type&)):
73 Move...
74 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
75 ::operator[](const difference_type&)): ...here.
76 (_Safe_iterator<_It, _Sq, _Cat>::operator+=(const difference_type&)):
77 Move...
78 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
79 ::operator+=(const difference_type&)): ...here.
80 (_Safe_iterator<_It, _Sq, _Cat>::operator+(const difference_type&)):
81 Move...
82 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
83 ::operator+(const difference_type&)): ...here.
84 (_Safe_iterator<_It, _Sq, _Cat>::operator-=(const difference_type&)):
85 Move...
86 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
87 ::operator-=(const difference_type&)): ...here.
88 (_Safe_iterator<_It, _Sq, _Cat>::operator-(const difference_type&)):
89 Move...
90 (_Safe_iterator<_It, _Sq, std::random_access_iterator_tag>
91 ::operator-(const difference_type&)): ...here.
92 (operator<(const _Safe_iterator<>&, const _Safe_iterator<>&)):
93 Constraint to random access iterators.
94 (operator<=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
95 Likewise.
96 (operator>(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
97 (operator>=(const _Safe_iterator<>&, const _Safe_iterator<>&)):
98 Likewise.
99 (operator-(const _Safe_iterator<>&, const _Safe_iterator<>&)): Likewise.
100 (operator+(const difference_type&, const _Safe_iterator<>&)): Likewise.
101 (__check_dereferenceable(const _Safe_iterator<>&)): Remove.
102 (__get_distance): Remove.
103 (__get_distance_from_begin): Remove.
104 (__get_distance_to_end): Remove.
105 (struct __is_safe_random_iterator<_Safe_iterator<>>): Remove partial
106 specialization.
107 (__base(const _Safe_iterator<>&, std::input_iterator_tag)): Remove.
108 (__base(const _Safe_iterator<>&, std::random_access_iterator_tag)): Remove.
109 (__base(const _Safe_iterator<>&)): Constraint to random access iterator.
110 * include/debug/safe_iterator.tcc
111 (_Safe_iterator<>::_M_get_distance_from_begin()): New.
112 (_Safe_iterator<>::_M_get_distance_to_end()): New.
113 (_Safe_iterator<>::_M_get_distance_to(const _Safe_iterator<>&)): New.
114 (_Safe_iterator<_It, _Seq, std::random_access_iterator_tag>
115 ::_M_valid_range): New.
116 * include/debug/safe_local_iterator.h
117 (_Safe_local_iterator<>::_Const_local_iterator): Remove.
118 (_Safe_local_iterator<>::_IsConstant): New.
119 (_Safe_local_iterator<>::_OtherIterator): New.
120 (_Safe_local_iterator<_It, _Cont>::_Safe_local_iterator<_MutIte, _Cont>(
121 const _Safe_local_iterator<_MutIte, _Seq>&)): Add _IsConstant::__value
122 in __gnu_cxx::__enable_if condition. If singular compare base iterator
123 with _MutIte rather than _It.
124 (_Safe_local_iterator<>::_S_constant): Make constexpr.
125 (_Safe_local_iterator<>::_M_get_distance_to): New.
126 (__check_dereferenceable(const _Safe_local_iterator<>&)): Remove.
127 (__get_distance(const _Safe_local_iterator<>&,
128 const _Safe_local_iterator<>&, std::input_iterator_tag)): Remove.
129 (__valid_range(const _Safe_local_iterator<>&,
130 const _Safe_local_iterator<>&)): New.
131 * include/debug/safe_local_iterator.tcc
132 (_Safe_local_iterator<>::_M_get_distance_to): New.
133 * include/debug/deque (std::__debug::deque<>): Add
134 ::__gnu_debug::_Safe_iterator<> friend declaration.
135 * include/debug/forward_list (std::__debug::forward_list<>): Likewise.
136 * include/debug/list (std::__debug::list<>): Likewise.
137 * include/debug/map.h (std::__debug::map<>): Likewise.
138 * include/debug/multimap.h (std::__debug::multimap<>): Likewise.
139 * include/debug/set.h (std::__debug::set<>): Likewise.
140 * include/debug/multiset.h (std::__debug::multiset<>): Likewise.
141 * include/debug/string (std::__debug::basic_string<>): Likewise.
142 * include/debug/unordered_map (std::__debug::unordered_map<>): Likewise
143 and add ::__gnu_debug::_Safe_local_iterator<> friend declaration.
144 (std::__debug::unordered_multimap<>): Likewise.
145 * include/debug/unordered_set (std::__debug::unordered_set<>): Likewise.
146 (std::__debug::unordered_multiset<>): Likewise.
147 * include/debug/formatter.h: Adapt.
148 * include/debug/helper_functions.h
149 (__gnu_debug::_Safe_local_iterator<>): Add declaration.
150 (__get_distance<_Ite>(_Ite, _Ite, std::random_access_iterator_tag):
151 Pass parameter by copy.
152 (__get_distance<_Ite>(_Ite, _Ite, std::input_iterator_tag): Likewise.
153 (__get_distance<_Ite>(_Ite, _Ite): Likewise.
154 (__valid_range_aux<_Integral>): Pass _Integral by copy.
155 (__valid_range<_InputIterator>): Pass _InputIterator by copy.
156 (__valid_range<>(const _Safe_iterator<>&,
157 const _Safe_iterator<>&, typename _Distance_traits<>::__type&)):
158 Declare.
159 (__valid_range(const _Safe_local_iterator<>&,
160 const _Safe_local_iterator<>&, typename _Distance_traits<>::__type&)):
161 Declare.
162 (__valid_range<>(const _Safe_iterator<>&, const _Safe_iterator<>&)):
163 Declare.
164 (__valid_range(const _Safe_local_iterator<>&, const _Safe_local_iterator<>&)):
165 Declare.
166 (__can_advance): Adapt.
167 (struct __is_safe_random_iterator<>): Remove.
168 (struct _SIter_base<>): Remove.
169 * include/debug/functions.h: Include <bits/stl_iterator.h>.
170 (__check_dereferenceable): Remove.
171 (__foreign_iterator_aux4, __foreign_iterator_aux3): Adapt.
172 (__foreign_iterator_aux2, __foreign_iterator_aux): Adapt.
173 (__foreign_iterator): Adapt.
174 * include/debug/stl_iterator.h
175 (__is_safe_random_iterator<std::reverse_iterator<>>): Remove.
176 (__base(const std::reverse_iterator<_Safe_iterator<_It, _Sq>)):
177 Constraint for random access iterators.
178 (__niter_base): Adapt.
179 * testsuite/util/testsuite_containers.h:
180 Include <bits/boost_concept_check.h>.
181 (iterator_concept_checks<_It, _Mutable, _Category>): New.
182 (citerator<_Cont>::forward_members::forward_members()): Instantiate
183 latter for container iterator and const_iterator.
184 * testsuite/23_containers/list/68222_neg.cc: New.
185 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: Adapt
186 line number.
187 * testsuite/23_containers/unordered_set/debug/debug_functions.cc:
188 (test01): Remove.
189 * testsuite/23_containers/vector/debug/debug_functions.cc (test01):
190 Remove.
191
192 2018-08-22 Jonathan Wakely <jwakely@redhat.com>
193
194 PR libstdc++/77854
195 * doc/xml/manual/status_cxx1998.xml: Document size_type and
196 difference_type for containers.
197 * doc/html/*: Regenerate.
198
199 2018-08-21 François Dumont <fdumont@gcc.gnu.org>
200
201 P0646R1 Improving the Return Value of Erase-Like Algorithms I
202 * include/debug/forward_list (forward_list::__remove_return_type):
203 Define typedef as size_type or void, according to __cplusplus value.
204 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
205 empty, according to __cplusplus value.
206 (_GLIBCXX20_ONLY): Define macro.
207 (forward_list::remove, forward_list::unique): Use typedef and macro
208 to change return type and add abi-tag for C++2a. Return number of
209 removed elements for C++2a.
210 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
211 typedef to change return type for C++2a. Return number of removed
212 elements for C++2a.
213 * include/debug/list (list::__remove_return_type): Define typedef as
214 size_type or void, according to __cplusplus value.
215 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
216 empty, according to __cplusplus value.
217 (_GLIBCXX20_ONLY): Define macro.
218 (list::remove, list::unique): Use typedef and macro to change return
219 type and add abi-tag for C++2a. Return number of removed elements for
220 C++2a.
221 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use typedef
222 to change return type for C++2a. Return number of removed elements for
223 C++2a.
224
225 2018-08-21 David Edelsohn <dje.gcc@gmail.com>
226
227 * testsuite/18_support/new_nothrow.cc: XFAIL on AIX.
228
229 2018-08-21 Jonathan Wakely <jwakely@redhat.com>
230
231 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: Remove
232 redundant dg-do directive.
233 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
234 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
235 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
236 * testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
237
238 2018-08-20 Jonathan Wakely <jwakely@redhat.com>
239
240 PR libstdc++/86963
241 * include/std/tuple (_Tuple_impl::operator=): Define as deleted.
242 (_Tuple_impl::_M_assign): New functions to perform assignment instead
243 of assignment operators.
244 (_Tuple_impl::_M_swap): Remove exception specification.
245 (_Tuple_impl<_Idx, _Head>): Likewise.
246 (_TC::_NonNestedTuple, _TC::_NotSameTuple): Use __remove_cvref_t.
247 (__tuple_base): Remove.
248 (tuple, tuple<_T1, _T2>): Remove inheritance from __tuple_base.
249 (tuple::operator=, tuple<_T1, _T2>::operator=): Call _M_assign.
250 (tuple::swap, tuple<_T1, _T2>::swap): Define exception specification
251 using __is_nothrow_swappable.
252 (tuple<_T1, _T2>::tuple(_U1&&, _U2&&)): Use __remove_cvref_t.
253
254 * include/std/optional (_Optional_payload): Use variable templates
255 for conditions in default template arguments and exception
256 specifications.
257 (optional): Likewise. Adjust indentation.
258 (optional::__not_self, optional::__not_tag, optional::_Requires): New
259 SFINAE helpers.
260 (optional::optional): Use new helpers in constructor constraints.
261 * include/std/type_traits (__or_v, __and_v): New variable templates.
262 * testsuite/20_util/optional/cons/value_neg.cc: Change dg-error to
263 dg-prune-output. Remove unused header.
264
265 2018-08-18 François Dumont <fdumont@gcc.gnu.org>
266
267 * testsuite/25_algorithms/copy/86658.cc: Use dg-options to define
268 _GLIBCXX_DEBUG.
269
270 2018-08-17 Jonathan Wakely <jwakely@redhat.com>
271
272 PR libstdc++/86963
273 * include/std/tuple (__tuple_base): New class template with deleted
274 copy assignment operator.
275 (tuple, tuple<_T1, _T2>): Derive from __tuple_base<tuple> so that
276 implicit copy/move assignment operator will be deleted/suppressed.
277 (tuple::__assignable, tuple<_T1, _T2>::__assignable): New helper
278 functions for SFINAE constraints on assignment operators.
279 (tuple::__nothrow_assignable, tuple<_T1, _T2>::__nothrow_assignable):
280 New helper functions for exception specifications.
281 (tuple::operator=(const tuple&), tuple::operator=(tuple&&))
282 (tuple<_T1, _T2>::operator=(const tuple&))
283 (tuple<_T1, _T2>::operator=(tuple&&)): Change parameter types to
284 __nonesuch_no_braces when the operator should be defined implicitly.
285 Use __nothrow_assignable for exception specifications.
286 (tuple::operator=(const tuple<_UElements...>&))
287 (tuple::operator=(tuple<_UElements...>&&))
288 (tuple<_T1, _T2>::operator=(const tuple<_U1, _U2>&))
289 (tuple<_T1, _T2>::operator=(tuple<_U1, _U2>&&))
290 (tuple<_T1, _T2>::operator=(const pair<_U1, _U2>&))
291 (tuple<_T1, _T2>::operator=(pair<_U1, _U2>&&)): Constrain using
292 __assignable and use __nothrow_assignable for exception
293 specifications.
294 * python/libstdcxx/v6/printers.py (is_specialization_of): Accept
295 gdb.Type as first argument, instead of a string.
296 (StdTuplePrinter._iterator._is_nonempty_tuple): New method to check
297 tuple for expected structure.
298 (StdTuplePrinter._iterator.__init__): Use _is_nonempty_tuple.
299 * testsuite/20_util/tuple/dr2729.cc: New test.
300 * testsuite/20_util/tuple/element_access/get_neg.cc: Change dg-error
301 to dg-prune-output.
302
303 2018-08-16 Jonathan Wakely <jwakely@redhat.com>
304
305 * include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning
306 about signed/unsigned comparison.
307
308 * include/std/ostream (basic_ostream::sentry::~sentry): Suppress
309 deprecation warnings for using uncaught_exception().
310
311 PR libstdc++/86447
312 * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
313 (logic_error::logic_error(logic_error&&))
314 (logic_error::operator=(logic_error&&))
315 (runtime_error::runtime_error(runtime_error&&))
316 (runtime_error::operator=(runtime_error&&)): Copy strings instead of
317 moving, to avoid allocating empty reps for moved-from strings.
318
319 2018-08-15 Jonathan Wakely <jwakely@redhat.com>
320
321 * include/experimental/regex: Remove begin/end macros for namespace.
322 * include/experimental/string: Likewise.
323 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_deque.cc:
324 New test.
325 * testsuite/experimental/polymorphic_allocator/
326 pmr_typedefs_forward_list.cc: New test.
327 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_list.cc:
328 New test.
329 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_map.cc:
330 New test.
331 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_match.cc:
332 New test.
333 * testsuite/experimental/polymorphic_allocator/
334 pmr_typedefs_multimap.cc: New test.
335 * testsuite/experimental/polymorphic_allocator/
336 pmr_typedefs_multiset.cc: New test.
337 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_set.cc:
338 New test.
339 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
340 New test.
341 * testsuite/experimental/polymorphic_allocator/
342 pmr_typedefs_unordered_map.cc: New test.
343 * testsuite/experimental/polymorphic_allocator/
344 pmr_typedefs_unordered_multimap.cc: New test.
345 * testsuite/experimental/polymorphic_allocator/
346 pmr_typedefs_unordered_multiset.cc: New test.
347 * testsuite/experimental/polymorphic_allocator/
348 pmr_typedefs_unordered_set.cc: New test.
349 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_vector.cc:
350 New test.
351
352 * include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
353 calls to __uses_allocator_construct_impl and __use_alloc.
354 * include/experimental/memory_resource
355 (polymorphic_allocator::_M_construct): Remove.
356 (polymorphic_allocator::construct): Call __uses_allocator_construct.
357 Qualify calls to __use_alloc.
358 * include/std/memory_resource (polymorphic_allocator::construct): Fix
359 type in SFINAE constraint. Use constexpr if instead of tag dispatching
360 to _S_construct overloads.
361 (polymorphic_allocator::construct(pair<T1, T2>*, ...)): Fix order of
362 arguments to _S_construct_p.
363 (polymorphic_allocator::_S_construct): Remove.
364 (polymorphic_allocator::_S_construct_p): Return allocators by value
365 not by reference.
366 * include/std/scoped_allocator (scoped_allocator_adaptor::construct):
367 Qualify calls to __use_alloc.
368 * testsuite/20_util/polymorphic_allocator/construct_pair.cc: New test,
369 copied from testsuite/20_util/scoped_allocator/construct_pair.cc.
370 * testsuite/experimental/polymorphic_allocator/1.cc: New test.
371 * testsuite/experimental/polymorphic_allocator/construct_pair.cc:
372 New test.
373
374 * src/c++17/memory_resource.cc [!_GLIBCXX_HAS_GTHREADS]
375 (atomic_mem_res): Add unsynchronized definition for single-threaded.
376
377 2018-08-14 Jonathan Wakely <jwakely@redhat.com>
378
379 PR libstdc++/86954
380 * include/bits/stl_tempbuf.h (return_temporary_buffer): Use
381 non-placement delete.
382
383 * include/std/chrono (__check_overflow): Simplify definition.
384 (_Checked_integral_constant): Remove.
385
386 PR libstdc++/86846
387 * src/c++17/default_resource.h: New file, defining default_res.
388 * src/c++17/memory_resource.cc [ATOMIC_POINTER_LOCK_FREE != 2]
389 (atomic_mem_res): Define alternative for atomic<memory_resource*>
390 using a mutex instead of atomics.
391
392 PR libstdc++/85343
393 * config/abi/pre/gnu.ver: Export new symbol.
394 * doc/xml/manual/abi.xml: Document new versions.
395 * include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
396 (basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
397 * include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
398 Declare new overload.
399 * src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
400 and static member function.
401 (__throw_ios_failure(const char*, int)): Define.
402 * src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
403 (__throw_ios_failure(const char*, int)): Define.
404
405 2018-08-14 Jeremy Sawicki <jeremy-gcc@sawicki.us>
406
407 * include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&))
408 (_Rope_const_iterator::operator=(const _Rope_const_iterator&))
409 (_Rope_iterator::operator=(const _Rope_iterator&)): Ensure
410 copied/assigned rope iterators don't retain pointers to the iterator
411 they were copied/assigned from.
412 * testsuite/ext/rope/7.cc: New.
413
414 2018-08-13 Jonathan Wakely <jwakely@redhat.com>
415
416 PR libstdc++/45093
417 * include/bits/stl_tree.h (_Rb_tree::_M_destroy_node(_Link_type)):
418 Combine definitions to avoid --detect-odr-violations warning.
419
420 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Use
421 __is_pow2 to check for valid alignment. Avoid branching when rounding
422 size to multiple of alignment.
423
424 * include/Makefile.am: Install <bit> and <version> for freestanding.
425 * include/Makefile.in: Regenerate.
426 * testsuite/17_intro/freestanding.cc: Check for <bit> and <version>.
427
428 Revert
429 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
430
431 PR target/85904
432 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
433 Newlib.
434 * configure: Regenerate.
435
436 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
437
438 PR libstdc++/68210
439 * doc/xml/manual/intro.xml: Document LWG 206 change.
440 * libsupc++/del_op.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
441 * libsupc++/del_opa.cc: Likewise.
442 * libsupc++/del_opant.cc: Likewise.
443 * libsupc++/del_opnt.cc: Likewise. Call operator delete(ptr) instead
444 of free(ptr).
445 * libsupc++/del_ops.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
446 * libsupc++/del_opsa.cc: Likewise.
447 * libsupc++/del_opva.cc: Likewise.
448 * libsupc++/del_opvant.cc: Likewise.
449 * libsupc++/del_opvnt.cc: Likewise. Call operator delete[](ptr)
450 instead of operator delete(ptr).
451 * libsupc++/del_opvs.cc: Replace _GLIBCXX_USE_NOEXCEPT with noexcept.
452 * libsupc++/del_opvsa.cc: Likewise.
453 * libsupc++/new_op.cc: Use __builtin_expect in check for zero size.
454 * libsupc++/new_opa.cc: Use nullptr instead of literal 0.
455 * libsupc++/new_opant.cc: Likewise. Replace _GLIBCXX_USE_NOEXCEPT
456 with noexcept.
457 * libsupc++/new_opnt.cc: Likewise. Call operator new(sz) instead of
458 malloc(sz).
459 * libsupc++/new_opvant.cc: Use nullptr and noexcept.
460 * libsupc++/new_opvnt.cc: Likewise. Call operator new[](sz) instead of
461 operator new(sz, nothrow).
462 * testsuite/18_support/new_nothrow.cc: New test.
463
464 2018-08-10 Martin Liska <mliska@suse.cz>
465
466 * libsupc++/new_op.cc (new): Remove __builtin_expect as malloc
467 predictor can handle that.
468 * libsupc++/new_opa.cc: Likewise.
469 * libsupc++/new_opnt.cc (new): Likewise.
470
471 2018-08-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
472
473 PR target/85904
474 * configure.ac: Define HAVE_ALIGNED_ALLOC if building for
475 Newlib.
476 * configure: Regenerate.
477
478 2018-08-10 Jonathan Wakely <jwakely@redhat.com>
479
480 * include/std/deque (std::pmr::deque): Declare alias.
481 * include/std/forward_list (std::pmr::forward_list): Likewise.
482 * include/std/list (std::pmr::list): Likewise.
483 * include/std/map (std::pmr::map, std::pmr::multimap): Likewise.
484 * include/std/regex (std::pmr::match_results, std::pmr::cmatch)
485 (std::pmr::smatch, std::pmr::wcmatch, std::pmr::wsmatch): Likewise.
486 * include/std/set (std::pmr::set, std::pmr::multiset): Likewise.
487 * include/std/string (std::pmr::basic_string, std::pmr::string)
488 (std::pmr::u16string, std::pmr::u32string, std::pmr::wstring):
489 Likewise.
490 * include/std/unordered_map (std::pmr::unordered_map)
491 (std::pmr::unordered_multimap): Likewise.
492 * include/std/unordered_set (std::pmr::unordered_set)
493 (std::pmr::unordered_multiset): Likewise.
494 * include/std/vector (std::pmr::vector): Likewise.
495 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc: New test.
496 * testsuite/23_containers/deque/types/pmr_typedefs.cc: New test.
497 * testsuite/23_containers/forward_list/pmr_typedefs.cc: New test.
498 * testsuite/23_containers/list/pmr_typedefs.cc: New test.
499 * testsuite/23_containers/map/pmr_typedefs.cc: New test.
500 * testsuite/23_containers/multimap/pmr_typedefs.cc: New test.
501 * testsuite/23_containers/multiset/pmr_typedefs.cc: New test.
502 * testsuite/23_containers/set/pmr_typedefs.cc: New test.
503 * testsuite/23_containers/unordered_map/pmr_typedefs.cc: New test.
504 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc: New
505 test.
506 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc: New
507 test.
508 * testsuite/23_containers/unordered_set/pmr_typedefs.cc: New test.
509 * testsuite/23_containers/vector/pmr_typedefs.cc: New test.
510 * testsuite/28_regex/match_results/pmr_typedefs.cc: New test.
511
512 2018-08-08 François Dumont <fdumont@gcc.gnu.org>
513
514 * include/bits/stl_algo.h
515 (__rotate(_Ite, _Ite, _Ite, forward_iterator_tag))
516 (__rotate(_Ite, _Ite, _Ite, bidirectional_iterator_tag))
517 (__rotate(_Ite, _Ite, _Ite, random_access_iterator_tag)): Move code
518 duplication...
519 (rotate(_Ite, _Ite, _Ite)): ...here.
520 (__stable_partition_adaptive(_FIt, _FIt, _Pred, _Dist, _Pointer, _Dist)):
521 Simplify rotate call.
522 (__rotate_adaptive(_BIt1, _BIt1, _BIt1, _Dist, _Dist, _Bit2, _Dist)):
523 Likewise.
524 (__merge_without_buffer(_BIt, _BIt, _BIt, _Dist, _Dist, _Comp)):
525 Likewise.
526
527 2018-08-08 Jonathan Wakely <jwakely@redhat.com>
528
529 * libsupc++/new_opa.cc (aligned_alloc): Declare inside namespace to
530 avoid clashing with an ::aligned_alloc function that was not detected
531 by configure.
532
533 * doc/xml/manual/using.xml: Fix markup for empty table entry.
534 * doc/html/*: Regenerate.
535
536 * doc/xml/manual/using.xml: Add missing header to table and fix typo.
537 * doc/html/*: Regenerate.
538
539 PR libstdc++/86597
540 * include/bits/fs_dir.h (directory_entry::_M_file_type(error_code&)):
541 Clear error_code when cached type is used.
542 * testsuite/27_io/filesystem/directory_entry/86597.cc: New test.
543
544 2018-08-07 Jonathan Wakely <jwakely@redhat.com>
545
546 PR libstdc++/86874
547 * include/std/variant (_Copy_ctor_base::_M_destructive_move): Define
548 here instead of in _Move_assign_base.
549 (_Copy_ctor_base<true, _Types...>::_M_destructive_move): Define.
550 (_Copy_assign_base::operator=): Use _M_destructive_move when changing
551 the contained value to another alternative.
552 (_Move_assign_base::operator=): Likewise.
553 (_Move_assign_base::_M_destructive_move): Remove.
554 * testsuite/20_util/variant/86874.cc: New test.
555
556 PR libstdc++/86861
557 * libsupc++/new_opa.cc [_GLIBCXX_HAVE_MEMALIGN] (aligned_alloc):
558 Replace macro with inline function.
559 [__sun]: Increase alignment to meet memalign precondition.
560 [!HAVE__ALIGNED_MALLOC && !HAVE_POSIX_MEMALIGN && !HAVE_MEMALIGN]
561 (aligned_alloc): Move check for valid alignment to operator new.
562 Remove redundant check for non-zero size, it's enforced by the caller.
563 (operator new): Move check for valid alignment here. Use
564 __builtin_expect on check for zero size.
565
566 * config/abi/pre/gnu.ver: Export monotonic_buffer_resource members.
567 * include/std/memory_resource (monotonic_buffer_resource::release):
568 Call _M_release_buffers to free buffers.
569 (monotonic_buffer_resource::do_allocate): Call _M_new_buffer to
570 allocate a new buffer from upstream.
571 (monotonic_buffer_resource::_M_new_buffer): Declare.
572 (monotonic_buffer_resource::_M_release_buffers): Declare.
573 (monotonic_buffer_resource::_Chunk): Replace definition with
574 declaration as opaque type.
575 * src/c++17/memory_resource.cc (monotonic_buffer_resource::_Chunk):
576 Define.
577 (monotonic_buffer_resource::_M_new_buffer): Define.
578 (monotonic_buffer_resource::_M_release_buffers): Define.
579
580 2018-08-05 François Dumont <fdumont@gcc.gnu.org>
581
582 * include/bits/stl_iterator.h: Fix comment.
583
584 2018-08-03 Jonathan Wakely <jwakely@redhat.com>
585
586 * src/c++11/system_error.cc
587 (system_error_category::default_error_condition): Add workaround for
588 ENOTEMPTY and EEXIST having the same value on AIX.
589 * testsuite/19_diagnostics/error_category/system_category.cc: Add
590 extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.
591
592 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
593
594 * configure: Regenerate.
595 * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS.
596 * src/c++11/futex.cc: Use __glibcxx_assert instead of
597 _GLIBCXX_DEBUG_ASSERT.
598
599 2018-08-01 Mike Crowe <mac@mcrowe.com>
600
601 * include/std/condition_variable (wait_for): Use steady_clock.
602
603 2018-08-01 Mike Crowe <mac@mcrowe.com>
604
605 * include/std/condition_variable (wait_until): Only report timeout
606 if we really have timed out when measured against the
607 caller-supplied clock.
608 * testsuite/30_threads/condition_variable/members/2.cc: Add test
609 case to confirm above behaviour.
610
611 2018-08-01 Jonathan Wakely <jwakely@redhat.com>
612
613 PR libstdc++/60555
614 * src/c++11/system_error.cc
615 (system_error_category::default_error_condition): New override to
616 check for POSIX errno values.
617 * testsuite/19_diagnostics/error_category/generic_category.cc: New
618 * testsuite/19_diagnostics/error_category/system_category.cc: New
619 test.
620
621 2018-07-31 Jonathan Wakely <jwakely@redhat.com>
622
623 PR libstdc++/86751
624 * include/bits/stl_pair.h (__pair_base): New class with deleted copy
625 assignment operator.
626 (pair): Derive from __pair_base.
627 (pair::operator=): Remove deleted overload.
628 * python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
629 so that new base class isn't shown in GDB.
630 * testsuite/20_util/pair/86751.cc: New test.
631 * testsuite/20_util/pair/ref_assign.cc: New test.
632
633 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
634 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Move definitions here.
635 (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Likewise. Use !__is_identifier
636 instead of __has_builtin.
637 * include/std/type_traits (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
638 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE): Remove definitions from here.
639 * include/std/version [!_GLIBCXX_HAS_GTHREADS]
640 (__cpp_lib_shared_timed_mutex, __cpp_lib_scoped_lock)
641 (__cpp_lib_shared_mutex): Don't define when Gthreads not in use.
642 [!_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP]
643 (__cpp_lib_has_unique_object_representations): Don't define when
644 builtin not available.
645 [!_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE] (__cpp_lib_is_aggregate):
646 Likewise.
647 [!_GLIBCXX_HAVE_BUILTIN_LAUNDER] (__cpp_lib_launder): Likewise.
648 * libsupc++/new (_GLIBCXX_HAVE_BUILTIN_LAUNDER): Remove definition
649 from here.
650
651 * doc/xml/manual/test.xml: Improve documentation on writing tests for
652 newer standards.
653 * doc/xml/manual/using.xml: Document all headers for C++11 and later.
654 * doc/html/*: Regenerate.
655
656 * include/ext/pointer.h [__cplusplus >= 201103L]
657 (_Pointer_adapter::operator bool): Add explicit conversion operator
658 to replace safe bool idiom.
659
660 2018-07-30 Jonathan Wakely <jwakely@redhat.com>
661
662 PR libstdc++/86734
663 * include/bits/stl_iterator.h (reverse_iterator::operator->): Call
664 _S_to_pointer (LWG 1052, LWG 2118).
665 (reverse_iterator::_S_to_pointer): Define overloaded helper functions.
666 * testsuite/24_iterators/reverse_iterator/dr1052.cc: New test.
667 * testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.
668
669 * libsupc++/new_opa.cc (operator new(size_t, align_val_t)): Add
670 workaround for aligned_alloc bug on AIX.
671 * testsuite/18_support/new_aligned.cc: New test.
672
673 2018-07-26 Marek Polacek <polacek@redhat.com>
674
675 * testsuite/30_threads/condition_variable_any/cond.cc: New.
676
677 2018-07-26 Marek Polacek <polacek@redhat.com>
678
679 * src/c++98/locale_init.cc: Fix #ifdef condition.
680
681 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
682
683 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Add
684 dg-require-cstdint directive.
685 * testsuite/20_util/allocator/overaligned.cc: Likewise.
686 * testsuite/20_util/any/cons/aligned.cc: Likewise.
687 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Likewise.
688 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: Likewise.
689 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
690 Likewise.
691 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc: Likewise.
692 * testsuite/23_containers/list/modifiers/insert/25288.cc: Likewise.
693 * testsuite/23_containers/set/allocator/move_assign.cc: Likewise.
694 * testsuite/25_algorithms/make_heap/complexity.cc: Likewise.
695 * testsuite/25_algorithms/pop_heap/complexity.cc: Require cstdint and
696 random_device effective-target.
697 * testsuite/25_algorithms/push_heap/complexity.cc: Likewise.
698 * testsuite/25_algorithms/sample/1.cc: Require cstdint.
699 * testsuite/25_algorithms/sample/2.cc: Likewise.
700 * testsuite/25_algorithms/sort_heap/complexity.cc: Require cstdint
701 and random_device.
702 * testsuite/26_numerics/headers/random/types_std_c++0x.cc: Require
703 cstdint.
704 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
705 Likewise.
706 * testsuite/26_numerics/random/discard_block_engine/requirements/
707 constexpr_data.cc: Likewise.
708 * testsuite/26_numerics/random/discard_block_engine/requirements/
709 constexpr_functions.cc: Likewise.
710 * testsuite/26_numerics/random/independent_bits_engine/requirements/
711 constexpr_functions.cc: Likewise.
712 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
713 constexpr_data.cc: Likewise.
714 * testsuite/26_numerics/random/linear_congruential_engine/requirements/
715 constexpr_functions.cc: Likewise.
716 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
717 constexpr_data.cc: Likewise.
718 * testsuite/26_numerics/random/mersenne_twister_engine/requirements/
719 constexpr_functions.cc: Likewise.
720 * testsuite/26_numerics/random/pr60037-neg.cc: Likewise.
721 * testsuite/26_numerics/random/seed_seq/cons/65631.cc: Likewise.
722 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
723 constexpr_data.cc: Add dg-require-cstdint directive.
724 * testsuite/26_numerics/random/shuffle_order_engine/requirements/
725 constexpr_functions.cc: Likewise.
726 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
727 constexpr_data.cc: Likewise.
728 * testsuite/26_numerics/random/subtract_with_carry_engine/requirements/
729 constexpr_functions.cc: Likewise.
730 * testsuite/26_numerics/random/uniform_real_distribution/operators/
731 64351.cc: Likewise.
732 * testsuite/29_atomics/headers/atomic/types_std_c++0x.cc: Likewise.
733 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
734 * testsuite/experimental/algorithm/sample.cc: Likewise.
735 * testsuite/experimental/algorithm/search.cc: Likewise.
736 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
737 * testsuite/experimental/any/cons/aligned.cc: Likewise.
738 * testsuite/experimental/memory_resource/new_delete_resource.cc:
739 Likewise.
740 * testsuite/experimental/memory_resource/resource_adaptor.cc: Likewise.
741 * testsuite/experimental/random/randint.cc: Likewise.
742 * testsuite/experimental/source_location/1.cc: Likewise.
743 * testsuite/ext/bitmap_allocator/overaligned.cc: Likewise.
744 * testsuite/ext/malloc_allocator/overaligned.cc: Likewise.
745 * testsuite/ext/mt_allocator/overaligned.cc: Likewise.
746 * testsuite/ext/new_allocator/overaligned.cc: Likewise.
747 * testsuite/ext/pb_ds/regression/hash_map_rand.cc: Likewise.
748 * testsuite/ext/pb_ds/regression/hash_set_rand.cc: Likewise.
749 * testsuite/ext/pb_ds/regression/list_update_map_rand.cc: Likewise.
750 * testsuite/ext/pb_ds/regression/list_update_set_rand.cc: Likewise.
751 * testsuite/ext/pb_ds/regression/priority_queue_rand.cc: Likewise.
752 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Likewise.
753 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
754 * testsuite/ext/pb_ds/regression/trie_map_rand.cc: Likewise.
755 * testsuite/ext/pb_ds/regression/trie_set_rand.cc: Likewise.
756 * testsuite/ext/pool_allocator/overaligned.cc: Likewise.
757 * testsuite/ext/throw_allocator/check_allocate_max_size.cc: Likewise.
758 * testsuite/ext/throw_allocator/check_deallocate_null.cc: Likewise.
759 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
760 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
761 * testsuite/ext/throw_allocator/deallocate_global.cc: Likewise.
762 * testsuite/ext/throw_allocator/deallocate_local.cc: Likewise.
763 * testsuite/ext/throw_allocator/explicit_instantiation.cc: Likewise.
764 * testsuite/ext/throw_allocator/variadic_construct.cc: Likewise.
765 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Likewise.
766
767 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
768 * testsuite/30_threads/recursive_mutex/cons/assign_neg.cc: Likewise.
769 * testsuite/30_threads/recursive_mutex/cons/copy_neg.cc: Likewise.
770 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
771 Likewise.
772 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
773 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
774 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
775 Likewise.
776 * testsuite/30_threads/recursive_mutex/requirements/standard_layout.cc:
777 Likewise.
778 * testsuite/30_threads/recursive_mutex/requirements/typedefs.cc:
779 Likewise.
780 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
781 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
782 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
783 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
784 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
785 * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc:
786 Likewise.
787 * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc:
788 Likewise.
789 * testsuite/30_threads/recursive_timed_mutex/dest/
790 destructor_locked.cc: Likewise.
791 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
792 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
793 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
794 Likewise.
795 * testsuite/30_threads/recursive_timed_mutex/native_handle/
796 typesizes.cc: Likewise.
797 * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc:
798 Likewise.
799 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc:
800 Likewise.
801 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc:
802 Likewise.
803 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
804 Likewise.
805 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
806 Likewise.
807 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
808 Likewise.
809 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
810 Likewise.
811 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
812 Likewise.
813 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
814 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
815 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
816 * testsuite/30_threads/scoped_lock/requirements/
817 explicit_instantiation.cc: Likewise.
818 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: Likewise.
819 * testsuite/30_threads/shared_future/cons/assign.cc: Likewise.
820 * testsuite/30_threads/shared_future/cons/constexpr.cc: Likewise.
821 * testsuite/30_threads/shared_future/cons/copy.cc: Likewise.
822 * testsuite/30_threads/shared_future/cons/default.cc: Likewise.
823 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
824 * testsuite/30_threads/shared_future/cons/move_assign.cc: Likewise.
825 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
826 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
827 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
828 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
829 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
830 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
831 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
832 * testsuite/30_threads/shared_future/requirements/
833 explicit_instantiation.cc: Likewise.
834 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
835 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
836 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
837 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
838 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
839 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
840 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
841 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
842 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
843 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
844 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
845 * testsuite/30_threads/shared_lock/requirements/
846 explicit_instantiation.cc: Likewise.
847 * testsuite/30_threads/shared_lock/requirements/typedefs.cc: Likewise.
848 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
849 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc: Likewise.
850 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
851 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
852 Likewise.
853 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
854 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
855 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
856 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
857 * testsuite/30_threads/shared_timed_mutex/cons/assign_neg.cc: Likewise.
858 * testsuite/30_threads/shared_timed_mutex/cons/copy_neg.cc: Likewise.
859 * testsuite/30_threads/shared_timed_mutex/requirements/
860 standard_layout.cc: Likewise.
861 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
862 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
863 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
864 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
865 * testsuite/30_threads/this_thread/1.cc: Likewise.
866 * testsuite/30_threads/this_thread/2.cc: Likewise.
867 * testsuite/30_threads/this_thread/3.cc: Likewise.
868 * testsuite/30_threads/this_thread/4.cc: Likewise.
869 * testsuite/30_threads/this_thread/58038.cc: Likewise.
870 * testsuite/30_threads/thread/70503.cc: Likewise.
871 * testsuite/30_threads/thread/84532.cc: Likewise.
872 * testsuite/30_threads/thread/adl.cc: Likewise.
873 * testsuite/30_threads/thread/cons/1.cc: Likewise.
874 * testsuite/30_threads/thread/cons/2.cc: Likewise.
875 * testsuite/30_threads/thread/cons/3.cc: Likewise.
876 * testsuite/30_threads/thread/cons/4.cc: Likewise.
877 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
878 * testsuite/30_threads/thread/cons/5.cc: Likewise.
879 * testsuite/30_threads/thread/cons/6.cc: Likewise.
880 * testsuite/30_threads/thread/cons/7.cc: Likewise.
881 * testsuite/30_threads/thread/cons/8.cc: Likewise.
882 * testsuite/30_threads/thread/cons/84535.cc: Likewise.
883 * testsuite/30_threads/thread/cons/9.cc: Likewise.
884 * testsuite/30_threads/thread/cons/assign_neg.cc: Likewise.
885 * testsuite/30_threads/thread/cons/copy_neg.cc: Likewise.
886 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
887 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
888 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
889 * testsuite/30_threads/thread/id/operators.cc: Likewise.
890 * testsuite/30_threads/thread/members/1.cc: Likewise.
891 * testsuite/30_threads/thread/members/2.cc: Likewise.
892 * testsuite/30_threads/thread/members/3.cc: Likewise.
893 * testsuite/30_threads/thread/members/4.cc: Likewise.
894 * testsuite/30_threads/thread/members/5.cc: Likewise.
895 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
896 Likewise.
897 * testsuite/30_threads/thread/native_handle/cancel.cc: Likewise.
898 * testsuite/30_threads/thread/swap/1.cc: Likewise.
899 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
900 * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise.
901 * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise.
902 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise.
903 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
904 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
905 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
906 Likewise.
907 * testsuite/30_threads/timed_mutex/requirements/
908 standard_layout.cc: Likewise.
909 * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise.
910 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
911 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
912 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
913 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
914 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
915 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
916 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
917 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
918 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
919 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
920 * testsuite/30_threads/try_lock/1.cc: Likewise.
921 * testsuite/30_threads/try_lock/2.cc: Likewise.
922 * testsuite/30_threads/try_lock/3.cc: Likewise.
923 * testsuite/30_threads/try_lock/4.cc: Likewise.
924 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
925 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
926 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
927 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
928 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
929 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
930 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
931 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
932 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
933 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
934 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
935 * testsuite/30_threads/unique_lock/requirements/
936 explicit_instantiation.cc: Likewise.
937 * testsuite/30_threads/unique_lock/requirements/typedefs.cc: Likewise.
938
939 * testsuite/30_threads/async/42819.cc: Remove dg-require-cstdint
940 directive.
941 * testsuite/30_threads/async/49668.cc: Likewise.
942 * testsuite/30_threads/async/54297.cc: Likewise.
943 * testsuite/30_threads/async/84532.cc: Likewise.
944 * testsuite/30_threads/async/any.cc: Likewise.
945 * testsuite/30_threads/async/async.cc: Likewise.
946 * testsuite/30_threads/async/except.cc: Likewise.
947 * testsuite/30_threads/async/forced_unwind.cc: Likewise.
948 * testsuite/30_threads/async/launch.cc: Likewise.
949 * testsuite/30_threads/async/lwg2021.cc: Likewise.
950 * testsuite/30_threads/async/sync.cc: Likewise.
951 * testsuite/30_threads/call_once/39909.cc: Likewise.
952 * testsuite/30_threads/call_once/49668.cc: Likewise.
953 * testsuite/30_threads/call_once/60497.cc: Likewise.
954 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
955 * testsuite/30_threads/call_once/constexpr.cc: Likewise.
956 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
957 * testsuite/30_threads/call_once/once_flag.cc: Likewise.
958 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
959 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
960 * testsuite/30_threads/condition_variable/cons/assign_neg.cc:
961 Likewise.
962 * testsuite/30_threads/condition_variable/cons/copy_neg.cc: Likewise.
963 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
964 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
965 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
966 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
967 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
968 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
969 Likewise.
970 * testsuite/30_threads/condition_variable/requirements/
971 standard_layout.cc: Likewise.
972 * testsuite/30_threads/condition_variable/requirements/typedefs.cc:
973 * Likewise.
974 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
975 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
976 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
977 * testsuite/30_threads/condition_variable_any/cons/assign_neg.cc:
978 Likewise.
979 * testsuite/30_threads/condition_variable_any/cons/copy_neg.cc:
980 Likewise.
981 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
982 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
983 * testsuite/30_threads/future/cons/assign_neg.cc: Likewise.
984 * testsuite/30_threads/future/cons/constexpr.cc: Likewise.
985 * testsuite/30_threads/future/cons/copy_neg.cc: Likewise.
986 * testsuite/30_threads/future/cons/default.cc: Likewise.
987 * testsuite/30_threads/future/cons/move.cc: Likewise.
988 * testsuite/30_threads/future/cons/move_assign.cc: Likewise.
989 * testsuite/30_threads/future/members/45133.cc: Likewise.
990 * testsuite/30_threads/future/members/get.cc: Likewise.
991 * testsuite/30_threads/future/members/get2.cc: Likewise.
992 * testsuite/30_threads/future/members/share.cc: Likewise.
993 * testsuite/30_threads/future/members/valid.cc: Likewise.
994 * testsuite/30_threads/future/members/wait.cc: Likewise.
995 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
996 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
997 * testsuite/30_threads/future/requirements/explicit_instantiation.cc:
998 Likewise.
999 * testsuite/30_threads/headers/condition_variable/types_std_c++0x.cc:
1000 Likewise.
1001 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
1002 * testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Likewise.
1003 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc: Likewise.
1004 * testsuite/30_threads/headers/thread/types_std_c++0x.cc: Likewise.
1005 * testsuite/30_threads/lock/1.cc: Likewise.
1006 * testsuite/30_threads/lock/2.cc: Likewise.
1007 * testsuite/30_threads/lock/3.cc: Likewise.
1008 * testsuite/30_threads/lock/4.cc: Likewise.
1009 * testsuite/30_threads/lock_guard/cons/1.cc: Likewise.
1010 * testsuite/30_threads/lock_guard/requirements/
1011 explicit_instantiation.cc: Likewise.
1012 * testsuite/30_threads/lock_guard/requirements/typedefs.cc: Likewise.
1013 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
1014 * testsuite/30_threads/mutex/cons/assign_neg.cc: Likewise.
1015 * testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
1016 * testsuite/30_threads/mutex/cons/copy_neg.cc: Likewise.
1017 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
1018 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
1019 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
1020 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
1021 * testsuite/30_threads/mutex/requirements/standard_layout.cc::
1022 Likewise.
1023 * testsuite/30_threads/mutex/requirements/typedefs.cc: Likewise.
1024 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
1025 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
1026 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
1027 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
1028 * testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.
1029 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
1030 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
1031 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
1032 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
1033 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
1034 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
1035 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
1036 * testsuite/30_threads/packaged_task/cons/alloc2.cc: Likewise.
1037 * testsuite/30_threads/packaged_task/cons/alloc_min.cc: Likewise.
1038 * testsuite/30_threads/packaged_task/cons/assign_neg.cc: Likewise.
1039 * testsuite/30_threads/packaged_task/cons/copy_neg.cc: Likewise.
1040 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
1041 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
1042 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
1043 Likewise.
1044 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
1045 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
1046 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
1047 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
1048 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
1049 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
1050 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
1051 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
1052 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
1053 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
1054 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
1055 * testsuite/30_threads/packaged_task/requirements/
1056 explicit_instantiation.cc: Likewise.
1057 * testsuite/30_threads/packaged_task/uses_allocator.cc: Likewise.
1058 * testsuite/30_threads/promise/60966.cc: Likewise.
1059 * testsuite/30_threads/promise/69106.cc: Likewise.
1060 * testsuite/30_threads/promise/cons/1.cc: Likewise.
1061 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
1062 * testsuite/30_threads/promise/cons/alloc2.cc: Likewise.
1063 * testsuite/30_threads/promise/cons/alloc_min.cc: Likewise.
1064 * testsuite/30_threads/promise/cons/assign_neg.cc: Likewise.
1065 * testsuite/30_threads/promise/cons/copy_neg.cc: Likewise.
1066 * testsuite/30_threads/promise/cons/move.cc: Likewise.
1067 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
1068 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
1069 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
1070 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
1071 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
1072 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
1073 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
1074 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
1075 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
1076 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
1077 * testsuite/30_threads/promise/members/swap.cc: Likewise.
1078 * testsuite/30_threads/promise/requirements/explicit_instantiation.cc:
1079 * Likewise.
1080 * testsuite/30_threads/promise/uses_allocator.cc: Likewise.
1081
1082 * testsuite/18_support/numeric_limits/char16_32_t.cc: Qualify names
1083 from namespace std.
1084 * testsuite/20_util/align/2.cc: Remove dg-require-cstdint directive.
1085 * testsuite/20_util/duration/arithmetic/1.cc: Likewise.
1086 * testsuite/20_util/duration/arithmetic/2.cc: Likewise.
1087 * testsuite/20_util/duration/arithmetic/dr2020.cc: Likewise.
1088 * testsuite/20_util/duration/arithmetic/dr934-1.cc: Likewise.
1089 * testsuite/20_util/duration/arithmetic/dr934-2.cc: Likewise.
1090 * testsuite/20_util/duration/comparison_operators/1.cc: Likewise.
1091 * testsuite/20_util/duration/cons/1.cc: Likewise.
1092 * testsuite/20_util/duration/cons/1_neg.cc: Likewise.
1093 * testsuite/20_util/duration/cons/2.cc: Likewise.
1094 * testsuite/20_util/duration/cons/54025.cc: Likewise.
1095 * testsuite/20_util/duration/cons/dr974_neg.cc: Likewise.
1096 * testsuite/20_util/duration/requirements/explicit_instantiation/
1097 explicit_instantiation.cc: Likewise.
1098 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1099 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1100 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1101 * testsuite/20_util/make_signed/requirements/typedefs-4.cc: Likewise.
1102 * testsuite/20_util/ratio/comparisons/comp1.cc: Likewise.
1103 * testsuite/20_util/ratio/comparisons/comp2.cc: Likewise.
1104 * testsuite/20_util/ratio/comparisons/comp3.cc: Likewise.
1105 * testsuite/20_util/ratio/cons/cons1.cc: Likewise.
1106 * testsuite/20_util/ratio/operations/45866.cc: Likewise.
1107 * testsuite/20_util/ratio/operations/47913.cc: Likewise.
1108 * testsuite/20_util/ratio/operations/53840.cc: Likewise.
1109 * testsuite/20_util/ratio/operations/ops1.cc: Likewise.
1110 * testsuite/20_util/shared_ptr/atomic/3.cc: Likewise.
1111 * testsuite/20_util/system_clock/1.cc: Likewise.
1112 * testsuite/20_util/time_point/1.cc: Likewise.
1113 * testsuite/20_util/time_point/2.cc: Likewise.
1114 * testsuite/20_util/time_point/3.cc: Likewise.
1115 * testsuite/20_util/time_point/requirements/explicit_instantiation/
1116 explicit_instantiation.cc: Likewise.
1117 * testsuite/21_strings/basic_string/requirements/
1118 explicit_instantiation/char16_t/1.cc: Likewise.
1119 * testsuite/21_strings/basic_string/requirements/
1120 explicit_instantiation/char32_t/1.cc: Likewise.
1121 * testsuite/21_strings/basic_string_view/requirements/
1122 explicit_instantiation/char16_t/1.cc: Likewise.
1123 * testsuite/21_strings/basic_string_view/requirements/
1124 explicit_instantiation/char32_t/1.cc: Likewise.
1125 * testsuite/21_strings/char_traits/requirements/
1126 explicit_instantiation/char16_t/1.cc: Likewise.
1127 * testsuite/21_strings/char_traits/requirements/
1128 explicit_instantiation/char32_t/1.cc: Likewise.
1129 * testsuite/21_strings/headers/string/types_std_c++0x.cc: Likewise.
1130 * testsuite/22_locale/codecvt/char16_t.cc: Likewise.
1131 * testsuite/22_locale/codecvt/char32_t.cc: Likewise.
1132 * testsuite/22_locale/codecvt/codecvt_utf16/requirements/1.cc:
1133 Likewise.
1134 * testsuite/22_locale/codecvt/codecvt_utf8/requirements/1.cc:
1135 Likewise.
1136 * testsuite/22_locale/codecvt/codecvt_utf8_utf16/requirements/1.cc:
1137 Likewise.
1138 * testsuite/22_locale/codecvt/utf8.cc: Likewise.
1139 * testsuite/23_containers/vector/bool/72847.cc: Likewise.
1140 * testsuite/23_containers/vector/debug/multithreaded_swap.cc:
1141 Likewise.
1142 * testsuite/experimental/string_view/requirements/
1143 explicit_instantiation/char16_t/1.cc: Likewise.
1144 * testsuite/experimental/string_view/requirements/
1145 explicit_instantiation/char32_t/1.cc: Likewise.
1146 * testsuite/ext/vstring/requirements/explicit_instantiation/char16_t/
1147 1.cc: Likewise.
1148 * testsuite/ext/vstring/requirements/explicit_instantiation/char32_t/
1149 1.cc: Likewise.
1150
1151 * include/ext/throw_allocator.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1152 (random_condition, throw_value_random, throw_allocator_random)
1153 (std::hash<throw_value_random>): Do not define when <tr1/random> is
1154 not usable.
1155 * src/c++11/cow-stdexcept.cc [!_GLIBCXX_USE_C99_STDINT_TR1]: Do not
1156 define transactional memory support when <stdint.h> is not usable.
1157
1158 * include/bits/hashtable_policy.h (__detail::__clp2): Use faster
1159 implementation that doesn't depend on <stdint.h> types.
1160 * include/std/memory (align) [!_GLIBCXX_USE_C99_STDINT_TR1]: Use
1161 std::size_t when std::uintptr_t is not usable.
1162 [!_GLIBCXX_USE_C99_STDINT_TR1] (pointer_safety, declare_reachable)
1163 (undeclare_reachable, declare_no_pointers, undeclare_no_pointers):
1164 Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
1165
1166 * include/bits/basic_string.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1167 (hash<u16string>, hash<u32string>): Remove dependency on
1168 _GLIBCXX_USE_C99_STDINT_TR1.
1169 * include/bits/char_traits.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1170 (char_traits<char16_t>, char_traits<char32_t>): Remove dependency on
1171 _GLIBCXX_USE_C99_STDINT_TR1. Use __UINT_LEAST16_TYPE__ and
1172 __UINT_LEAST32_TYPE__ or make_unsigned when <stdint.h> is not usable.
1173 * include/bits/codecvt.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1174 (codecvt<char16_t, char, mbstate_t>)
1175 (codecvt<char32_t, char, mbstate_t>)
1176 (codecvt_byname<char16_t, char, mbstate_t>)
1177 (codecvt_byname<char32_t, char, mbstate_t>): Remove dependency
1178 on _GLIBCXX_USE_C99_STDINT_TR1.
1179 * include/bits/locale_facets.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1180 (_GLIBCXX_NUM_UNICODE_FACETS): Likewise.
1181 * include/bits/stringfwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1182 (char_traits<char16_t>, char_traits<char32_t>)
1183 (basic_string<char16_t>, basic_string<char32_t>): Remove dependency
1184 on _GLIBCXX_USE_C99_STDINT_TR1.
1185 * include/experimental/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
1186 (u16string_view, u32string_view, hash<u16string_view>)
1187 (hash<u32string_view>, operator""sv(const char16_t, size_t))
1188 (operator""sv(const char32_t, size_t)): Likewise.
1189 * include/ext/vstring.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1190 (hash<__u16vstring>, hash<__u32vstring>): Likewise.
1191 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1192 (__u16vstring, __u16sso_string, __u16rc_string, __u32vstring)
1193 (__u32sso_string, __u32rc_string): Likewise.
1194 * include/std/codecvt [!_GLIBCXX_USE_C99_STDINT_TR1] (codecvt_mode)
1195 (codecvt_utf8, codecvt_utf16, codecvt_utf8_utf16): Likewise.
1196 * include/std/string_view [!_GLIBCXX_USE_C99_STDINT_TR1]
1197 (u16string_view, u32string_view, hash<u16string_view>)
1198 (hash<u32string_view>, operator""sv(const char16_t, size_t))
1199 (operator""sv(const char32_t, size_t)): Likewise.
1200 * src/c++11/codecvt.cc: Likewise.
1201 * src/c++98/locale_init.cc: Likewise.
1202 * src/c++98/localename.cc: Likewise.
1203
1204 * include/bits/atomic_futex.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1205 (__atomic_futex_unsigned_base): Remove dependency on
1206 _GLIBCXX_USE_C99_STDINT_TR1 macro.
1207 * include/bits/unique_lock.h [!_GLIBCXX_USE_C99_STDINT_TR1]
1208 (unique_lock): Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1.
1209 * include/c_global/cstdint [!_GLIBCXX_USE_C99_STDINT_TR1] (intmax_t)
1210 (uintmax_t): Define using predefined macros.
1211 * include/std/chrono [!_GLIBCXX_USE_C99_STDINT_TR1] (duration)
1212 (time_point, system_clock, high_resolution_clock, steady_clock): Remove
1213 dependency on _GLIBCXX_USE_C99_STDINT_TR1 macro.
1214 (nanoseconds, microseconds, milliseconds, seconds, minutes, hours):
1215 [!_GLIBCXX_USE_C99_STDINT_TR1]: Define using __INT64_TYPE__ or
1216 long long when <stdint.h> is not usable.
1217 * include/std/condition_variable [!_GLIBCXX_USE_C99_STDINT_TR1]
1218 (condition_variable, condition_variable_any): Remove dependency on
1219 _GLIBCXX_USE_C99_STDINT_TR1.
1220 * include/std/future [!_GLIBCXX_USE_C99_STDINT_TR1] (future, promise)
1221 (packaged_task, async): Likewise.
1222 * include/std/mutex [!_GLIBCXX_USE_C99_STDINT_TR1] (recursive_mutex)
1223 (timed_mutex, recursive_timed_mutex, try_lock, lock, scoped_lock)
1224 (once_flag, call_once): Likewise.
1225 * include/std/ratio [!_GLIBCXX_USE_C99_STDINT_TR1] (ratio): Likewise.
1226 * include/std/shared_mutex [!_GLIBCXX_USE_C99_STDINT_TR1]
1227 (shared_mutex, shared_timed_mutex, shared_lock): Likewise.
1228 * include/std/thread [!_GLIBCXX_USE_C99_STDINT_TR1] (thread)
1229 (this_thread::get_id, this_thread::yield, this_thread::sleep_for)
1230 (this_thread::sleep_until): Likewise.
1231 * src/c++11/chrono.cc: Remove dependency on
1232 _GLIBCXX_USE_C99_STDINT_TR1 macro.
1233 * src/c++11/condition_variable.cc: Likewise.
1234 * src/c++11/futex.cc: Likewise.
1235 * src/c++11/future.cc: Likewise.
1236 * src/c++11/mutex.cc: Likewise.
1237 * src/c++11/thread.cc: Likewise.
1238 * testsuite/20_util/duration/literals/range_neg.cc: Adjust dg-error.
1239 * testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
1240 * testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
1241 * testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
1242 * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.
1243 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
1244
1245 2018-07-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1246
1247 PR libstdc++/77691
1248 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1249 xfail execution on 32-bit Solaris/x86.
1250
1251 2018-07-26 Marc Glisse <marc.glisse@inria.fr>
1252
1253 * include/bits/stl_vector.h (_Vector_impl_data::_M_copy_data): New.
1254 (_Vector_impl_data::_M_swap_data): Use _M_copy_data.
1255 (vector::_M_move_assign): Reorder the swaps.
1256
1257 2018-07-26 Jonathan Wakely <jwakely@redhat.com>
1258
1259 PR libstdc++/86676
1260 * testsuite/20_util/monotonic_buffer_resource/release.cc: Request
1261 same alignment for post-release allocation.
1262
1263 2018-07-25 Jonathan Wakely <jwakely@redhat.com>
1264
1265 PR libstdc++/86676
1266 * testsuite/20_util/monotonic_buffer_resource/release.cc: Allow for
1267 buffer being misaligned and so returned pointer not being at start.
1268
1269 * include/experimental/memory_resource: Include <cstddef> header.
1270
1271 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++17.
1272 * src/Makefile.am: Add comment.
1273 * src/c++17/Makefile.in: Regenerate.
1274
1275 * include/Makefile.am: Add new <bits/unique_lock.h> header.
1276 * include/Makefile.in: Regenerate.
1277 * include/bits/std_mutex.h [!_GLIBCXX_USE_C99_STDINT_TR1] (mutex)
1278 (lock_guard): Define independent of _GLIBCXX_USE_C99_STDINT_TR1.
1279 (unique_lock): Move definition to ...
1280 * include/bits/unique_lock.h: New header.
1281 [!_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock): Define unconditionally.
1282 [_GLIBCXX_USE_C99_STDINT_TR1] (unique_lock(mutex_type&, time_point))
1283 (unique_lock(mutex_type&, duration), unique_lock::try_lock_until)
1284 (unique_lock::try_lock_for): Define only when <chrono> is usable.
1285 * include/std/condition_variable: Include <bits/unique_lock.h>.
1286 * include/std/mutex: Likewise.
1287
1288 2018-07-24 Jonathan Wakely <jwakely@redhat.com>
1289
1290 * config/abi/pre/gnu.ver: Export new symbols.
1291 * configure: Regenerate.
1292 * include/Makefile.am: Add new <memory_resource> header.
1293 * include/Makefile.in: Regenerate.
1294 * include/precompiled/stdc++.h: Include <memory_resource> for C++17.
1295 * include/std/memory_resource: New header.
1296 (memory_resource, polymorphic_allocator, new_delete_resource)
1297 (null_memory_resource, set_default_resource, get_default_resource)
1298 (pool_options, monotonic_buffer_resource): Define.
1299 * src/Makefile.am: Add c++17 directory.
1300 * src/Makefile.in: Regenerate.
1301 * src/c++11/Makefile.am: Fix comment.
1302 * src/c++17/Makefile.am: Add makefile for new sub-directory.
1303 * src/c++17/Makefile.in: Generate.
1304 * src/c++17/memory_resource.cc: New.
1305 (newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
1306 (default_res, new_delete_resource, null_memory_resource)
1307 (set_default_resource, get_default_resource): Define.
1308 * testsuite/20_util/memory_resource/1.cc: New test.
1309 * testsuite/20_util/memory_resource/2.cc: New test.
1310 * testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
1311 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
1312 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
1313 * testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
1314 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
1315 New test.
1316 * testsuite/20_util/polymorphic_allocator/1.cc: New test.
1317 * testsuite/20_util/polymorphic_allocator/resource.cc: New test.
1318 * testsuite/20_util/polymorphic_allocator/select.cc: New test.
1319 * testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
1320 Define concrete memory resource for testing.
1321 (__gnu_test::default_resource_mgr): Define RAII helper for changing
1322 default resource.
1323
1324 PR libstdc++/86658
1325 * include/bits/stl_algobase.h (__niter_wrap<_Iterator>): Pass unused
1326 parameter by reference, to avoid copying invalid iterators.
1327 * testsuite/25_algorithms/copy/86658.cc: New test.
1328
1329 * include/std/bit (__countl_zero, __countr_zero, __popcount): Use
1330 local variables for number of digits instead of type aliases.
1331 (__log2p1): Remove redundant branch also checked in __countl_zero.
1332
1333 * include/bits/uses_allocator.h (__is_erased_or_convertible): Reorder
1334 conditions. Add comments.
1335 * testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error line.
1336 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
1337 * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
1338
1339 * include/bits/uses_allocator.h (__is_erased_or_convertible): Remove.
1340 (__uses_allocator_helper): Check conditions directly instead of
1341 using __is_erased_or_convertible.
1342
1343 * include/experimental/memory_resource: Adjust comments and
1344 whitespace.
1345 (__resource_adaptor_imp): Add second template parameter for type of
1346 memory resource base class.
1347 (memory_resource): Define default constructor, destructor, copy
1348 constructor and copy assignment operator as defaulted.
1349
1350 PR libstdc++/70966
1351 * include/experimental/memory_resource (__get_default_resource): Use
1352 placement new to create an object with dynamic storage duration.
1353
1354 2018-07-23 Jonathan Wakely <jwakely@redhat.com>
1355
1356 PR libstdc++/70940
1357 * include/experimental/memory_resource
1358 (__resource_adaptor_common::_AlignMgr::_M_unadjust): Add assertion.
1359 (__resource_adaptor_common::__guaranteed_alignment): New helper to
1360 give maximum alignment an allocator guarantees. Specialize for known
1361 allocators using new and malloc.
1362 (__resource_adaptor_imp::do_allocate): Use __guaranteed_alignment.
1363 (__resource_adaptor_imp::do_deallocate): Likewise.
1364 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1365 Check that new and delete are called with expected sizes.
1366
1367 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
1368
1369 PR libstdc++/86595
1370 * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
1371 noexcept.
1372
1373 2018-07-20 Fangrui Song <maskray@google.com>
1374
1375 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
1376 _GLIBCXX_VISIBILITY(default).
1377
1378 2018-07-20 Jonathan Wakely <jwakely@redhat.com>
1379
1380 PR libstdc++/86603
1381 * include/std/version: Move __cpp_lib_list_remove_return_type macro.
1382
1383 2018-07-19 Jonathan Wakely <jwakely@redhat.com>
1384
1385 * include/std/type_traits (__is_member_object_pointer_helper): Use
1386 __not_<is_function<_Tp>>::type instead of integral_constant.
1387 (__is_member_function_pointer_helper): Likewise for
1388 is_function<_Tp>::type.
1389 (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
1390 (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
1391 (is_trivially_constructible): Remove redundant use of
1392 is_constructible.
1393 (__is_trivially_copy_assignable_impl): Remove redundant use of
1394 is_copy_assignable.
1395 (__is_trivially_move_assignable_impl): Remove redundant use of
1396 is_move_assignable.
1397 (is_trivially_destructible): Use __bool_constant.
1398 * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
1399 tests for scalar types.
1400
1401 2018-07-19 Glen Joseph Fernandes <glenjofe@gmail.com>
1402
1403 * include/bits/stl_algobase.h (__copy_move_a): Used
1404 __is_trivially_copyable.
1405 (__copy_move_backward_a): Likewise.
1406 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
1407 New test.
1408
1409 2018-07-17 Jonathan Wakely <jwakely@redhat.com>
1410
1411 PR libstdc++/86450
1412 * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
1413 (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
1414 * configure: Regenerate.
1415 * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
1416 * doc/Makefile.in: Regenerate.
1417 * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
1418 * include/Makefile.in: Regenerate.
1419 * libsupc++/Makefile.in: Regenerate.
1420 * po/Makefile.in: Regenerate.
1421 * python/Makefile.in: Regenerate.
1422 * src/Makefile.in: Regenerate.
1423 * src/c++11/Makefile.in: Regenerate.
1424 * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
1425 from -Wabi=2 that don't affect exported symbols.
1426 * src/c++98/Makefile.in: Regenerate.
1427 * src/filesystem/Makefile.in: Regenerate.
1428 * testsuite/Makefile.in: Regenerate.
1429
1430 * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
1431 (_Async_state_common::_M_join): Simplify use of std::call_once and
1432 corresponding explicit instantiation.
1433 (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
1434 (__bind_simple): Remove definitions and explicit instantiation that
1435 are not required by exported symbols.
1436
1437 2018-07-16 Jonathan Wakely <jwakely@redhat.com>
1438
1439 * scripts/create_testsuite_files: Fix typo in comment.
1440
1441 PR libstdc++/86537
1442 * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
1443 non-standard partial specialization.
1444 * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
1445 (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
1446 * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
1447
1448 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com>
1449
1450 * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
1451 * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
1452 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1453
1454 2018-07-06 François Dumont <fdumont@gcc.gnu.org>
1455
1456 * include/debug/functions.h (__gnu_debug::__check_string): Move...
1457 * include/debug/string (__gnu_debug::__check_string): ... here.
1458 (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
1459 (__glibcxx_check_string_n_constructor): New.
1460 (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
1461 Use latter.
1462 (__glibcxx_check_string_constructor): New.
1463 (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
1464 Use latter.
1465 * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
1466 * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
1467
1468 2018-07-06 Jonathan Wakely <jwakely@redhat.com>
1469
1470 PR libstdc++/84928 use std::move in <numeric> algorithms
1471 * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
1472 conditionally move, according to __cplusplus value.
1473 (accumulate, inner_product, partial_sum, adjacent_difference): Use
1474 _GLIBCXX_MOVE_IF_20.
1475 * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
1476 * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
1477 * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
1478 * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
1479
1480 * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
1481
1482 P0935R0 Eradicating unnecessarily explicit default constructors
1483 * config/abi/pre/gnu.ver: Tighten existing patterns and export new
1484 default constructor symbols.
1485 * include/std/sstream (basic_stringbuf, basic_istringstream)
1486 (basic_ostringstream, basic_stringstream): Remove default arguments
1487 from explicit constructors taking ios_base::openmode and add separate
1488 non-explicit default constructors.
1489 * testsuite/27_io/basic_istringstream/cons/default.cc: New.
1490 * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
1491 * testsuite/27_io/basic_stringstream/cons/default.cc: New.
1492 * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
1493 * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
1494
1495 * include/std/variant (__accepted_index): Use void_t.
1496
1497 2018-07-05 Jonathan Wakely <jwakely@redhat.com>
1498
1499 PR libstdc++/85831
1500 * config/abi/pre/gnu.ver: Export move constructors and move
1501 assignment operators for std::logic_error and std::runtime_error.
1502 * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
1503 _GLIBCXX_USE_NOEXCEPT.
1504 (logic_error, runtime_error): Declare move constructors and move
1505 assignment operators. When not declared already, define copy
1506 constructors and copy assignment operators as explicit-defaulted.
1507 (domain_error, invalid_argument, length_error, out_of_range)
1508 (overflow_error, underflow_error): Define move constructors and move
1509 assignment operators as explicitly-defaulted.
1510 * libsupc++/exception.h (exception): Likewise.
1511 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
1512 move constructors and move assignment operators as defaulted.
1513 * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
1514 assignment operators are defined.
1515
1516 * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
1517 COW strings.
1518 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1519 Likewise.
1520 * testsuite/21_strings/basic_string/requirements/
1521 explicit_instantiation/debug.cc: Likewise.
1522
1523 PR libstdc++/58265
1524 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1525 (basic_string::assign(basic_string&&)): Add conditional noexcept
1526 depending on the allocator's is_always_equal property (LWG 2063).
1527 * testsuite/21_strings/basic_string/modifiers/assign/char/
1528 move_assign.cc: Check for non-throwing exception specification.
1529 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
1530 move_assign.cc: Likewise.
1531
1532 PR libstdc++/58265
1533 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1534 [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
1535 Add GLIBCXX_NOEXCEPT.
1536 (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
1537 to depend on the allocator's is_always_equal property (LWG 2063).
1538 (basic_string::swap(basic_string&)): Likewise.
1539 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
1540 (basic_string::swap(basic_string&)): Likewise.
1541 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
1542 Check is_nothrow_move_assignable.
1543 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
1544 Check is_nothrow_move_assignable.
1545 * testsuite/21_strings/basic_string/cons/char/
1546 noexcept_move_construct.cc: Likewise.
1547 * testsuite/21_strings/basic_string/cons/wchar_t/
1548 noexcept_move_construct.cc: Likewise.
1549
1550 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1551
1552 P0646R1 Improving the Return Value of Erase-Like Algorithms I
1553 * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
1554 Define.
1555 (forward_list::__remove_return_type): Define typedef as size_type or
1556 void, according to __cplusplus value.
1557 (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1558 empty, according to __cplusplus value.
1559 (forward_list::remove, forward_list::unique): Use typedef and macro
1560 to change return type and add abi-tag for C++2a.
1561 (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
1562 typedef to change return type for C++2a.
1563 * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
1564 (forward_list::remove, forward_list::remove_if<Pred>)
1565 (forward_list::unique<BinPred>): Return number of removed elements
1566 for C++2a.
1567 * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
1568 (list::remove, list::unique, list::remove_if<Predicate>)
1569 (list::unique<BinaryPredicate>): Return number of removed elements
1570 for C++2a.
1571 * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
1572 (list::__remove_return_type): Define typedef as size_type or
1573 void, according to __cplusplus value.
1574 (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
1575 empty, according to __cplusplus value.
1576 (list::remove, list::unique): Use typedef and macro to change return
1577 type and add abi-tag for C++2a.
1578 (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
1579 typedef to change return type for C++2a.
1580 * include/std/version (__cpp_lib_list_remove_return_type): Define.
1581 * testsuite/23_containers/forward_list/operations/
1582 remove_cxx20_return.cc: New.
1583 * testsuite/23_containers/forward_list/operations/
1584 unique_cxx20_return.cc: New.
1585
1586 P0458R2 Checking for Existence of an Element in Associative Containers
1587 * include/bits/stl_map.h (map::contains): Add for C++2a.
1588 * include/bits/stl_multimap.h (multimap::contains): Likewise.
1589 * include/bits/stl_multiset.h (multiset::contains): Likewise.
1590 * include/bits/stl_set.h (set::contains): Likewise.
1591 * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
1592 (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
1593 (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
1594 (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
1595 * include/bits/unordered_map.h (unordered_map::contains)
1596 (unordered_multimap::contains): Add for C++2a.
1597 * include/bits/unordered_set.h (unordered_set::contains)
1598 (unordered_multiset::contains): Likewise.
1599 * testsuite/23_containers/map/operations/contains.cc: New.
1600 * testsuite/23_containers/multimap/operations/contains.cc: New.
1601 * testsuite/23_containers/multiset/operations/contains.cc: New.
1602 * testsuite/23_containers/set/operations/contains.cc: New.
1603 * testsuite/23_containers/unordered_map/operations/contains.cc: New.
1604 * testsuite/23_containers/unordered_multimap/operations/contains.cc:
1605 New.
1606 * testsuite/23_containers/unordered_multiset/operations/contains.cc:
1607 New.
1608 * testsuite/23_containers/unordered_set/operations/contains.cc: New.
1609
1610 2018-07-04 François Dumont <fdumont@gcc.gnu.org>
1611
1612 PR libstdc++/86272
1613 * include/debug/string
1614 (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
1615 Use __glibcxx_check_insert_range.
1616 * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
1617 __gnu_debug::string when _GLIBCXX_DEBUG.
1618 * 21_strings/basic_string/init-list.cc: Likewise.
1619 * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
1620 * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
1621 * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
1622 * 21_strings/basic_string/types/1.cc: Likewise.
1623
1624 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1625
1626 * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
1627 target for std::random_device.
1628 * testsuite/26_numerics/random/random_device/cons/default.cc:
1629 Likewise.
1630 * testsuite/experimental/algorithm/sample-2.cc: Likewise.
1631 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
1632 * testsuite/experimental/random/randint.cc: Likewise.
1633 * testsuite/lib/libstdc++.exp
1634 (check_effective_target_random_device): New proc.
1635
1636 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1637 Jakub Jelinek <jakub@redhat.com>
1638
1639 * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
1640
1641 2018-07-04 Jonathan Wakely <jwakely@redhat.com>
1642
1643 PR libstdc++/86398
1644 * include/std/type_traits (is_trivially_constructible): Check
1645 is_constructible before __is_trivially_constructible.
1646 * testsuite/20_util/is_trivially_constructible/value.cc: Add more
1647 tests, including negative cases.
1648 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
1649 zero for dg-error lineno.
1650 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
1651 Likewise.
1652
1653 * include/std/bit (__rotl, __rotr): Avoid branch.
1654 (_If_is_unsigned_integer): Use remove_cv_t.
1655 * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
1656
1657 2018-07-03 Jonathan Wakely <jwakely@redhat.com>
1658
1659 P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
1660 * include/Makefile.am: Add new header.
1661 * include/Makefile.in: Regenerate.
1662 * include/precompiled/stdc++.h: Include new header.
1663 * include/std/bit: New header.
1664 (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
1665 (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
1666 Define for C++14.
1667 [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
1668 (countr_one, popcount): Define for C++2a. Also overload for std::byte.
1669 (ispow2, ceil2, floor2, log2p1): Define for C++2a.
1670 [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
1671 std::byte.
1672 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
1673 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
1674 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
1675 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
1676 * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
1677 * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
1678 * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
1679 * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
1680 * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
1681 * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
1682
1683 * include/bits/alloc_traits.h: Remove redundant preprocessor
1684 condition.
1685
1686 2018-07-03 François Dumont <fdumont@gcc.gnu.org>
1687
1688 * include/bits/stl_algobase.h (__niter_wrap): New.
1689 (__copy_move_a2(_II, _II, _OI)): Use latter.
1690 (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
1691 (fill_n(_OI, _Size, const _Tp&)): Likewise.
1692 (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
1693 * include/debug/stl_iterator.h
1694 (std::__niter_base(const __gnu_cxx::_Safe_iterator<
1695 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
1696 * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
1697 __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
1698
1699 2018-07-02 Jonathan Wakely <jwakely@redhat.com>
1700
1701 P0758R1 Implicit conversion traits
1702 * include/std/type_traits [__cplusplus > 201703]
1703 (__is_convertible_helper::__is_nothrow_type): Define new member.
1704 (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
1705 noexcept.
1706 (__is_convertible_helper<_From, _To, false>::__test_nothrow)
1707 (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
1708 new members.
1709 (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
1710 * testsuite/20_util/is_nothrow_convertible/value.cc: New.
1711 * testsuite/20_util/is_nothrow_convertible/requirements/
1712 explicit_instantiation.cc: New.
1713 * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
1714 New.
1715
1716 P0887R1 The identity metafunction
1717 * include/std/type_traits (type_identity, type_identity_t): Define
1718 for C++2a.
1719 * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
1720 * testsuite/20_util/type_identity/requirements/
1721 explicit_instantiation.cc:New.
1722 * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
1723
1724 * include/bits/regex.h (sub_match::operator string_type): Call str().
1725 (sub_match::compare): Use _M_str() instead of str().
1726 (sub_match::_M_compare): New public function.
1727 (sub_match::__string_view): New helper type.
1728 (sub_match::_M_str): New overloaded functions to avoid creating a
1729 string_type object when not needed.
1730 (operator==, operator!=, operator<, operator>, operator<=, operator>=):
1731 Use sub_match::_M_compare instead of creating string_type objects.
1732 Fix Doxygen comments.
1733 * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
1734 (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
1735 simplify.
1736 (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
1737 __enable_if_t.
1738 * include/std/type_traits (__enable_if_t): Define for C++11.
1739 * testsuite/28_regex/sub_match/compare.cc: New.
1740 * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
1741 trait.
1742 (input_iterator_wrapper): Use remove_cv for value_type argument of
1743 std::iterator base class.
1744
1745 2018-06-29 Jonathan Wakely <jwakely@redhat.com>
1746
1747 * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
1748 Add whitespace to dejagnu directive.
1749 * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
1750
1751 2018-06-27 François Dumont <fdumont@gcc.gnu.org>
1752
1753 * include/bits/stl_vector.h
1754 (struct _Vector_base<>::_Vector_impl_data): New.
1755 (struct _Vector_base<>::_Vector_impl): Inherit from latter.
1756 (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
1757 (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
1758 (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
1759 (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
1760 (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
1761 (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
1762 (_Vector_base()): Default.
1763 (_Vector_base(_Vector_base&&)): Default.
1764 (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
1765 (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
1766 (_Vector_base::_M_create_storage(size_t)): Make protected.
1767 (vector()): Default.
1768 (vector(vector&&)): Default.
1769 (vector(vector&&, const allocator_type&, true_type)): New.
1770 (vector(vector&&, const allocator_type&, false_type)): New.
1771 (vector(vector&&, const allocator_type&)): Use latters.
1772 (vector(_InputIte, _InputIte, const allocator_type&)): Call
1773 _M_range_initialize directly.
1774 * include/debug/vector
1775 (vector(vector&&, const allocator_type&)): Add noexcept qualification.
1776 * testsuite/23_containers/vector/allocator/default_init.cc: New.
1777 * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
1778 static assertions.
1779
1780 2018-06-27 Jonathan Wakely <jwakely@redhat.com>
1781
1782 * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
1783 (__is_byte<byte>): Define specialization for std::byte.
1784
1785 PR libstdc++/86138
1786 * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
1787 Declare explicit instantiations of COW empty reps and I/O functions.
1788
1789 2018-06-26 David Edelsohn <dje.gcc@gmail.com>
1790
1791 * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
1792 directives.
1793 * testsuite/experimental/algorithm/shuffle.cc: Likewise.
1794
1795 2018-06-26 Jonathan Wakely <jwakely@redhat.com>
1796
1797 * include/bits/regex.tcc (regex_iterator::operator==): Add missing
1798 noexcept.
1799
1800 2018-06-25 Jonathan Wakely <jwakely@redhat.com>
1801
1802 PR libstdc++/86112
1803 * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
1804 Replace dict comprehension.
1805
1806 PR libstdc++/81092
1807 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1808
1809 PR libstdc++/86292
1810 * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
1811 Add try-catch block.
1812 * testsuite/23_containers/vector/cons/86292.cc: New.
1813
1814 * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
1815
1816 * include/experimental/algorithm (sample, shuffle): Add new overloads
1817 using per-thread random number engine.
1818 * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
1819 dependencies by using __gnu_test::test_container.
1820 * testsuite/experimental/algorithm/sample-2.cc: New.
1821 * testsuite/experimental/algorithm/shuffle.cc: New.
1822
1823 2018-06-22 Jonathan Wakely <jwakely@redhat.com>
1824
1825 * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
1826 different size_t mangling on 32-bit targets.
1827
1828 PR libstdc++/86280
1829 * include/experimental/memory_resource
1830 (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
1831 enough for result of left shift.
1832
1833 PR libstdc++/86138
1834 * include/bits/basic_string.tcc:
1835 [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
1836 (basic_string<char>::_Rep::_S_empty_rep_storage)
1837 (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
1838 instantiation declarations.
1839 [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
1840 explicit instantiation declarations.
1841 * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
1842 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
1843
1844 2018-06-21 Jonathan Wakely <jwakely@redhat.com>
1845
1846 PR libstdc++/83328
1847 * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
1848 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
1849 * configure: Regenerate.
1850 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
1851 (basic_string::insert(const_iterator, initializer_list<C>)): Add.
1852 [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
1853 (basic_string::insert(iterator, initializer_list<C>)): Suppress
1854 definition.
1855 * include/debug/string (basic_string::insert(iterator, C)): Change
1856 first parameter to const_iterator.
1857 (basic_string::insert(iterator, size_type, C)): Likewise. Change
1858 return type to iterator.
1859 (basic_string::insert(iterator, InputIterator, InputIterator)):
1860 Likewise.
1861 (basic_string::insert(iterator, initializer_list<C>)): Change first
1862 parameter to const_iterator and return type to iterator.
1863 * src/c++11/string-inst.cc: Extend comment.
1864 * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
1865 New.
1866 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
1867 New.
1868 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1869
1870 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1871
1872 PR libstdc++/70940
1873 * include/experimental/memory_resource
1874 (__resource_adaptor_imp::do_deallocate): Add missing return.
1875 * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
1876 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
1877 resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
1878 __gnu_cxx::malloc_allocator.
1879
1880 PR libstdc++/70940
1881 * include/experimental/memory_resource (__resource_adaptor_common):
1882 New base class.
1883 (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
1884 pointer from unaligned, and vice versa.
1885 (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
1886 allocated pointer to meet alignment request.
1887 (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
1888 original pointer for deallocation.
1889 (__resource_adaptor_imp::do_is_equal): Reformat.
1890 (__resource_adaptor_imp::_S_aligned_size): Remove.
1891 (__resource_adaptor_imp::_S_supported): Remove.
1892 (new_delete_resource): Use __gnu_cxx::new_allocator.
1893 * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
1894 extended alignments and use debug_allocator to check for matching
1895 allocate/deallocate pairs.
1896
1897 2018-06-21 François Dumont <fdumont@gcc.gnu.org>
1898
1899 * include/debug/safe_iterator.h
1900 (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
1901 Compare __x base iterator with a value-initialized iterator of the
1902 same type.
1903
1904 2018-06-20 Jonathan Wakely <jwakely@redhat.com>
1905
1906 PR libstdc++/70966
1907 * include/experimental/memory_resource (__resource_adaptor_imp): Add
1908 static assertions to enforce requirements on pointer types.
1909 (__resource_adaptor_imp::get_allocator()): Add noexcept.
1910 (new_delete_resource, null_memory_resource): Return address of an
1911 object with dynamic storage duration.
1912 (__null_memory_resource): Remove.
1913 * testsuite/experimental/memory_resource/70966.cc: New.
1914
1915 * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
1916 missed from recent commit.
1917
1918 2018-06-19 Jonathan Wakely <jwakely@redhat.com>
1919
1920 * include/std/utility: Remove unused <exception> header.
1921
1922 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
1923
1924 LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
1925 * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
1926 (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
1927 a specialization of std::pair.
1928 * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
1929 pair elements are constructed correctly.
1930
1931 LWG 2989 hide path iostream operators from normal lookup
1932 * include/bits/fs_path.h (operator<<, operator>>): Define inline as
1933 friends.
1934 * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
1935
1936 LWG 3050 Fix cv-qualification of convertibility constraints
1937 * include/std/chrono (duration, operator*, operator/, operator%): Use
1938 const-qualified type as source type in is_convertible constraints.
1939 * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
1940 * testsuite/20_util/duration/cons/dr3050.cc: New.
1941 * testsuite/20_util/duration/literals/range.cc: Rename to...
1942 * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
1943 dg-error lineno.
1944
1945 2018-06-18 Maya Rashish <coypu@sdf.org>
1946
1947 * crossconfig.m4: Handle OpenBSD just like NetBSD.
1948 * configure: Rebuilt.
1949
1950 2018-06-18 Jonathan Wakely <jwakely@redhat.com>
1951
1952 P0754R2 <version> header
1953 * include/Makefile.am: Add new header.
1954 * include/Makefile.in: Regenerate.
1955 * include/bits/c++config: Change doxygen comment to suggest <version>
1956 instead of <iosfwd>.
1957 * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
1958 unconditionally. Add C++17 and C++20 headers.
1959 * include/std/version: New header.
1960 * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
1961 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
1962 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
1963 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
1964 * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
1965 * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
1966 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
1967 New.
1968 * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
1969 * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
1970 * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
1971 * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
1972 * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
1973 * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
1974 * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
1975 New.
1976 * testsuite/18_support/headers/version/macros.cc: New.
1977 * testsuite/18_support/headers/version/macros.cc: New.
1978
1979 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
1980 enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
1981 symlink.
1982 * config.h.in: Regenerate.
1983 * configure: Regenerate.
1984 * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
1985
1986 LWG 3035. std::allocator's constructors should be constexpr
1987 * include/bits/allocator.h (allocator): Add constexpr to constructors
1988 for C++2a. Replace dynamic exception specifications with NOTHROW
1989 macro.
1990 (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
1991 NOTHROW.
1992 * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
1993 * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
1994 to constructors for C++2a.
1995 * include/ext/new_allocator.h (new_allocator): Likewise.
1996
1997 2018-06-16 Jonathan Wakely <jwakely@redhat.com>
1998
1999 LWG 3076 basic_string CTAD ambiguity
2000 * doc/xml/manual/intro.xml: Document LWG 3076 change.
2001 * include/bits/basic_string.h
2002 [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
2003 (basic_string(const _CharT*, const _Alloc&)): Turn into a function
2004 template constrained by _RequireAllocator.
2005 (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
2006 * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
2007 Define.
2008 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
2009 deduction
2010 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2011 Likewise.
2012
2013 2018-06-15 Jonathan Wakely <jwakely@redhat.com>
2014
2015 PR libstdc++/86169
2016 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2017 (basic_string::data()): Unshare string.
2018 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
2019 New.
2020
2021 * include/std/string_view (basic_string_view(const CharT*)): Remove
2022 check for null pointer and add nonnull attribute.
2023 (compare(const CharT*), compare(size_type, size_type, const CharT*))
2024 (find(const CharT*, size_type), rfind(const CharT*, size_type))
2025 (find_first_of(const CharT*, size_type))
2026 (find_last_of(const CharT*, size_type))
2027 (find_first_not_of(const CharT*, size_type))
2028 (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
2029 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
2030 * testsuite/21_strings/basic_string_view/operations/compare/char/
2031 nonnull.cc: New.
2032 * testsuite/21_strings/basic_string_view/operations/find/char/
2033 nonnull.cc: New.
2034 * testsuite/21_strings/basic_string_view/operations/rfind/char/
2035 nonnull.cc: New.
2036
2037 PR libstdc++/86168
2038 * include/bits/random.h (random_device(const string&)): Remove
2039 default argument.
2040
2041 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
2042 define for C++17 and above.
2043
2044 LWG 2993 reference_wrapper<T> conversion from T&&
2045 * doc/xml/manual/intro.xml: Document LWG 2993 change.
2046 * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
2047 (reference_wrapper(_Tp&&)): Remove.
2048 (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
2049 template.
2050 (reference_wrapper): Add deduction guide.
2051 * testsuite/20_util/reference_wrapper/deduction.cc: New.
2052 * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
2053
2054 LWG 3039 Unnecessary decay in thread and packaged_task
2055 * include/std/future (__constrain_pkgdtask): Replace with ...
2056 (packaged_task::__not_same): New alias template, using
2057 __remove_cvref_t instead of decay.
2058 * include/std/thread (thread::__not_same): Add comment.
2059
2060 2018-06-14 Jonathan Wakely <jwakely@redhat.com>
2061
2062 LWG 3075 basic_string needs deduction guides from basic_string_view
2063 * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
2064 deduction from string views.
2065 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2066 Likewise.
2067
2068 LWG 3074 make scalar types non-deduced in valarray non-member functions
2069 * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
2070 scalar parameters to be a non-deduced context.
2071 * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
2072 whitespace.
2073 * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
2074 * testsuite/26_numerics/valarray/transcend.cc: New.
2075
2076 * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
2077 Move back to <utility>.
2078 * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
2079 Restore to here.
2080
2081 P0935R0 Eradicating unnecessarily explicit default constructors
2082 * include/backward/strstream (strstreambuf): Add non-explicit default
2083 constructor.
2084 * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
2085 Likewise.
2086 * include/bits/regex.h (match_results): Likewise.
2087 * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
2088 default constructor.
2089 * testsuite/22_locale/conversions/string/1.cc: Likewise.
2090 * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
2091 * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
2092
2093 * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
2094 macro from <utility> and change type to long.
2095 * include/std/utility (__cpp_lib_tuple_element_t): Remove.
2096 * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
2097 macro.
2098
2099 P0935R0 Eradicating unnecessarily explicit default constructors
2100 * include/bits/random.h (uniform_real_distribution::param_type)
2101 (normal_distribution::param_type, lognormal_distribution::param_type)
2102 (gamma_distribution::param_type, chi_squared_distribution::param_type)
2103 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
2104 (student_t_distribution::param_type)
2105 (bernoulli_distribution::param_type)
2106 (binomial_distribution::param_type)
2107 (geometric_distribution::param_type)
2108 (negative_binomial_distribution::param_type)
2109 (poisson_distribution::param_type)
2110 (exponential_distribution::param_type)
2111 (weibull_distribution::param_type)
2112 (extreme_value_distribution::param_type): Add non-explicit default
2113 constructors. Remove default argument for first parameter of explicit
2114 constructors.
2115 * include/bits/uniform_int_dist.h
2116 (uniform_int_distribution::param_type): Likewise.
2117 * include/ext/random
2118 (beta_distribution::param_type, rice_distribution::param_type)
2119 (nakagami_distribution::param_type, pareto_distribution::param_type)
2120 (k_distribution::param_type, arcsine_distribution::param_type)
2121 (hoyt_distribution::param_type, triangular_distribution::param_type)
2122 (von_mises_distribution::param_type)
2123 (hypergeometric_distribution::param_type)
2124 (logistic_distribution::param_type)
2125 (uniform_inside_sphere_distribution::param_type): Likewise.
2126 (uniform_on_sphere_distribution::param_type): Make default constructor
2127 non-explicit.
2128 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
2129 Test param_type for non-explicit default constructor.
2130 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
2131 Likewise.
2132 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
2133 Likewise.
2134 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
2135 Likewise.
2136 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
2137 Likewise.
2138 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
2139 Likewise.
2140 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
2141 Likewise.
2142 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
2143 Likewise.
2144 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
2145 Likewise.
2146 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
2147 Likewise.
2148 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
2149 Likewise.
2150 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
2151 Likewise.
2152 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
2153 Likewise.
2154 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
2155 Likewise.
2156 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
2157 Likewise.
2158 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
2159 Likewise.
2160 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
2161 Likewise.
2162 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
2163 Likewise.
2164 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
2165 Likewise.
2166 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
2167 Likewise.
2168 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
2169 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
2170 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
2171 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
2172 Likewise.
2173 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
2174 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
2175 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
2176 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
2177 Likewise.
2178 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
2179 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
2180 * testsuite/ext/random/triangular_distribution/cons/default.cc:
2181 Likewise.
2182 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
2183 Likewise.
2184 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
2185 Likewise.
2186 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
2187 Likewise.
2188
2189 2018-06-14 Daniel Trebbien <dtrebbien@gmail.com>
2190 Jonathan Wakely <jwakely@redhat.com>
2191
2192 PR libstdc++/83982
2193 * include/bits/vector.tcc (vector::_M_default_append(size_type)):
2194 Default-construct new elements before moving existing ones.
2195 * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
2196 New.
2197
2198 2018-06-13 Jonathan Wakely <jwakely@redhat.com>
2199
2200 PR libstdc++/86127
2201 * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
2202 unused typedef.
2203 (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
2204 Use node allocator to create and destroy elements.
2205 (forward_list::_Tp_alloc_type): Remove unused typedef.
2206 (forward_list::_Alloc_traits): Use allocator_traits instead of
2207 __gnu_cxx::__alloc_traits.
2208
2209 2018-06-13 François Dumont <fdumont@gcc.gnu.org>
2210
2211 * include/debug/helper_functions.h
2212 (__gnu_debug::_Safe_iterator<>): Add declaration.
2213 (__can_advance(_Ite, _Size)): New.
2214 (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
2215 * include/debug/functions.h
2216 (__gnu_debug::_Safe_iterator<>): Remove declaration.
2217 * include/debug/stl_iterator.h
2218 (__can_advance(const _Safe_iterator<>&)): New definition.
2219 * include/debug/stl_iterator.h
2220 (__can_advance(const std::reverse_iterator<>&, _Size)): New.
2221 (__can_advance(const std::move_iterator<>&, _Size)): New.
2222 * include/debug/macros.h (__glibcxx_check_can_increment): New.
2223 * include/debug/debug.h (__glibcxx_requires_can_increment): New.
2224 * include/bits/stl_algobase.h (fill_n): Use latter.
2225 * testsuite/25_algorithms/fill_n/2.cc: New.
2226 * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
2227 * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
2228 * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
2229 * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
2230
2231 * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
2232 (__glibcxx_requires_can_decrement_range): New.
2233
2234 2018-06-12 François Dumont <fdumont@gcc.gnu.org>
2235
2236 * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
2237 (__glibcxx_check_can_decrement_range): New.
2238 * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
2239 __glibcxx_requires_can_increment_range.
2240 (std::move(_II, _II, _OI)): Likewise.
2241 (std::copy_backward(_BI, _BI, _BI2)): Use
2242 __glibcxx_requires_can_decrement_range.
2243 (std::move_backward(_BI, _BI, _BI2)): Likewise.
2244 * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
2245 * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
2246 * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
2247 * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
2248 * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
2249 * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
2250
2251 2018-06-12 Jonathan Wakely <jwakely@redhat.com>
2252
2253 P0935R0 Eradicating unnecessarily explicit default constructors
2254 * include/bits/random.h (linear_congruential_engine)
2255 (mersenne_twister_engine, subtract_with_carry_engine, random_device)
2256 (uniform_real_distribution, normal_distribution)
2257 (lognormal_distribution, gamma_distribution, chi_squared_distribution)
2258 (cauchy_distribution, fisher_f_distribution, student_t_distribution)
2259 (bernoulli_distribution, binomial_distribution,geometric_distribution)
2260 (negative_binomial_distribution, exponential_distribution)
2261 (weibull_distribution, extreme_value_distribution): Add non-explicit
2262 default constructors. Remove default argument for first parameter of
2263 explicit constructors.
2264 (piecewise_constant_distribution, piecewise_linear_distribution):
2265 Make default constructor non-explicit.
2266 * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
2267 non-explicit default constructors. Remove default argument for first
2268 parameter of explicit constructor.
2269 * include/ext/random
2270 (simd_fast_mersenne_twister_engine, beta_distribution)
2271 (rice_distribution, nakagami_distribution, pareto_distribution)
2272 (k_distribution, arcsine_distribution, hoyt_distribution)
2273 (triangular_distribution, von_mises_distribution)
2274 (hypergeometric_distribution, logistic_distribution)
2275 (uniform_inside_sphere_distribution): Likewise.
2276 (uniform_on_sphere_distribution): Make default constructor
2277 non-explicit.
2278 * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
2279 Test for non-explicit default constructor. Fix references to standard.
2280 * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
2281 Likewise.
2282 * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
2283 Likewise.
2284 * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
2285 Likewise.
2286 * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
2287 Likewise.
2288 * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
2289 Likewise.
2290 * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
2291 Likewise.
2292 * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
2293 Likewise.
2294 * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
2295 Likewise.
2296 * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
2297 Likewise.
2298 * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
2299 Likewise.
2300 * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
2301 Likewise.
2302 * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
2303 Likewise.
2304 * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
2305 Likewise.
2306 * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
2307 Likewise.
2308 * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
2309 Likewise.
2310 * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
2311 Likewise.
2312 * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
2313 Likewise.
2314 * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
2315 Likewise.
2316 * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
2317 Likewise.
2318 * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
2319 * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
2320 * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
2321 * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
2322 Likewise.
2323 * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
2324 * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
2325 * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
2326 * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
2327 Likewise.
2328 * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
2329 * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
2330 * testsuite/ext/random/triangular_distribution/cons/default.cc:
2331 Likewise.
2332 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
2333 Likewise.
2334 * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
2335 Likewise.
2336 * testsuite/ext/random/von_mises_distribution/cons/default.cc:
2337 Likewise.
2338 * testsuite/util/testsuite_common_types.h
2339 (implicitly_default_constructible): New helper.
2340
2341 2018-06-08 Jonathan Wakely <jwakely@redhat.com>
2342
2343 * include/bits/ios_base.h (ios::Init::Init(const Init&))
2344 (ios::Init::operator=): Define as defaulted.
2345 * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
2346 Likewise.
2347 * include/bits/stream_iterator.h (istream_iterator::operator=)
2348 (ostream_iterator::operator=): Likewise.
2349 * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
2350 Likewise.
2351 * include/std/bitset (bitset::reference::reference(const reference&)):
2352 Likewise.
2353 * include/std/complex (complex<float>::complex(const complex&))
2354 (complex<double>::complex(const complex&))
2355 (complex<long double>::complex(const complex&)): Likewise.
2356
2357 2018-06-07 Jonathan Wakely <jwakely@redhat.com>
2358
2359 * include/bits/regex.h (sub_match): Add noexcept to default
2360 constructor and length observer.
2361 (match_results): Add noexcept to default constructor and observers
2362 with no preconditions. Define destructor as defaulted.
2363 (operator==, operator!=, swap): Add noexcept.
2364 (regex_iterator): Add default member initializers and define default
2365 constructor and destructor as defaulted. Add noexcept to equality
2366 and dereference operators.
2367
2368 2018-06-07 François Dumont <fdumont@gcc.gnu.org>
2369
2370 * src/c++11/debug.cc
2371 (_Safe_iterator_base::_M_detach()): Reset state only if needed.
2372 (_Safe_iterator_base::_M_detach_single()): Likewise.
2373 (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
2374 (_Safe_local_iterator_base::_M_detach_single()): Likewise.
2375
2376 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
2377
2378 * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
2379 move of const value.
2380
2381 2018-06-06 Jakub Jelinek <jakub@redhat.com>
2382
2383 PR c++/86068
2384 * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
2385 rather than __cpp_transactional_memory >= 201505L.
2386
2387 2018-06-06 Jonathan Wakely <jwakely@redhat.com>
2388
2389 PR libstdc++/86008
2390 * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
2391 Define new partial specialization.
2392 * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
2393 new overload.
2394 (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
2395 value not reference for iteration.
2396 * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
2397 comment.
2398 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
2399 * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
2400 comment.
2401
2402 2018-06-05 Jonathan Wakely <jwakely@redhat.com>
2403
2404 * include/std/type_traits: Fix comment typos.
2405
2406 * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
2407 mingw* targets.
2408 * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
2409 * testsuite/experimental/filesystem/operations/read_symlink.cc:
2410 Likewise.
2411
2412 2018-06-05 François Dumont <fdumont@gcc.gnu.org>
2413
2414 * include/bits/stl_tempbuf.h
2415 (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
2416 (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
2417 * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
2418 * include/bits/stl_algo.h (__stable_partition): Adapt.
2419 (__inplace_merge): Adapt.
2420 (__stable_sort): Adapt.
2421
2422 2018-06-04 Jonathan Wakely <jwakely@redhat.com>
2423
2424 PR libstdc++/85930
2425 * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
2426 unconditionally. Remove redundant declaration.
2427 [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
2428 alignment-specifier.
2429
2430 * include/bits/postypes.h (fpos): Define special members as defaulted.
2431
2432 PR libstdc++/85930
2433 * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
2434 the static variable correctly.
2435
2436 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
2437
2438 PR libstdc++/78870 support std::filesystem on Windows
2439 * config.h.in: Regenerate.
2440 * configure: Regenerate.
2441 * configure.ac: Check for link, readlink and symlink.
2442 * include/bits/fs_path.h (path::operator/=(const path&)): Move
2443 definition out of class body.
2444 (path::is_absolute(), path::_M_append(path)): Likewise.
2445 (operator<<(basic_ostream, const path&)): Use std::quoted directly.
2446 (operator>>(basic_istream, path&)): Likewise.
2447 (u8path): Reorder definitions and fix Windows implementation.
2448 (path::is_absolute()): Define inline and fix for Windows.
2449 [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
2450 Define POSIX version inline.
2451 (path::_M_append(path)): Define inline.
2452 * include/experimental/bits/fs_path.h (path::is_absolute()): Move
2453 definition out of class body.
2454 (operator<<(basic_ostream, const path&)): Fix type of delimiter and
2455 escape characters.
2456 (operator>>(basic_istream, path&)): Likewise.
2457 (path::is_absolute()): Define inline and fix for Windows.
2458 * src/filesystem/dir-common.h (__gnu_posix): New namespace.
2459 (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
2460 (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
2461 Define as adaptors for Windows functions/types or as
2462 using-declarations for POSIX functions/types.
2463 (_Dir_base, get_file_type): Qualify names to use declarations from
2464 __gnu_posix namespace.
2465 (_Dir_base::is_dor_or_dotdot): New helper functions.
2466 * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
2467 names to use declarations from __gnu_posix namespace.
2468 * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
2469 (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
2470 (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
2471 (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
2472 (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
2473 (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
2474 Define as adaptors for Windows functions/types or as
2475 using-declarations for POSIX functions/types.
2476 (stat_type, do_copy_file): Qualify names to use declarations from
2477 __gnu_posix namespace.
2478 (do_space): Declare new function.
2479 (make_file_type): Only use S_ISLNK if defined.
2480 * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
2481 path::value_type not char.
2482 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
2483 names to use declarations from __gnu_posix namespace.
2484 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
2485 add implementation for Windows.
2486 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
2487 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
2488 [!_PC_PATH_MAX]: Don't use pathconf.
2489 [PATH_MAX]: Use if defined.
2490 (filesystem::current_path(const path&, error_code&))
2491 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
2492 (filesystem::last_write_time, filesystem::permissions): Use names
2493 from __gnu_posix.
2494 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
2495 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
2496 implementation for Windows.
2497 (filesystem::rename, filesystem::resize_file): Use names from
2498 __gnu_posix.
2499 (filesystem::space): Use do_space.
2500 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
2501 (filesystem::status, filesystem::symlink_status): Use names from
2502 __gnu_posix.
2503 (filesystem::temp_directory_path): Add implementation for Windows.
2504 * src/filesystem/path.cc (dot): Define constant.
2505 (path::replace_extension): Use dot.
2506 (path::_M_find_extension): Likewise. Use path::string_type not
2507 std::string.
2508 (path::_M_split_cmpts): Use dot.
2509 (filesystem_error::_M_get_what): Use u8string() not native().
2510 * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
2511 Qualify names to use declarations from __gnu_posix namespace.
2512 * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
2513 correct error_code.
2514 (filesystem::absolute(const path&, error_code&)): Add implementation
2515 for Windows.
2516 (char_ptr, filesystem::canonical): Use path::value_type not char.
2517 (do_copy_file): Use names from __gnu_posix.
2518 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
2519 sendfile.
2520 (filesystem::copy, create_dir, filesystem::create_directory): Qualify
2521 names to use declarations from __gnu_posix namespace.
2522 (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
2523 add implementation for Windows.
2524 (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
2525 (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
2526 [!_PC_PATH_MAX]: Don't use pathconf.
2527 [PATH_MAX]: Use if defined.
2528 (filesystem::current_path(const path&, error_code&))
2529 (filesystem::equivalent, do_stat, filesystem::hard_link_count)
2530 (filesystem::last_write_time, filesystem::permissions): Use names
2531 from __gnu_posix.
2532 (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
2533 (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
2534 implementation for Windows.
2535 (filesystem::rename, filesystem::resize_file): Use names from
2536 __gnu_posix.
2537 (do_space): Define.
2538 (filesystem::space): Use do_space.
2539 (filesystem::status, filesystem::symlink_status): Use names from
2540 __gnu_posix.
2541 (filesystem::temp_directory_path): Add implementation for Windows.
2542 * src/filesystem/std-path.cc
2543 [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
2544 Define for Windows.
2545 (dot): Define constant.
2546 (path::replace_extension, is_dot): Use dot.
2547 (path::lexically_normal): Check _M_type instead of calling
2548 non-existent function.
2549 (path::_M_find_extension): Use dot. Use path::string_type not
2550 std::string.
2551 (path::_M_split_cmpts): Use dot.
2552 (filesystem_error::_M_get_what): Use u8string() not native().
2553 * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
2554 use symlinks.
2555 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2556 Likewise.
2557 * testsuite/27_io/filesystem/operations/absolute.cc: Use
2558 __gnu_test::root_path() instead of "/" and add Windows-specific tests.
2559 * testsuite/27_io/filesystem/operations/canonical.cc: Use
2560 path::string() to get narrow string, not path::native().
2561 * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
2562 with std::filesystem::path not std::basic_string.
2563 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
2564 * testsuite/27_io/filesystem/operations/exists.cc: Use
2565 __gnu_test::root_path() instead of "/".
2566 * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
2567 fstreams with std::filesystem::path not std::basic_string.
2568 * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
2569 path::string() to get narrow string.
2570 * testsuite/27_io/filesystem/operations/space.cc: Check results for
2571 errors, expect sensible values otherwise.
2572 * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
2573 helpers for adjusting the environment on Windows.
2574 * testsuite/27_io/filesystem/path/append/path.cc: Test
2575 Windows-specific behaviour.
2576 * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
2577 of path::string_type objects.
2578 * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
2579 string to wide string on Windows.
2580 * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
2581 for backslash as root-directory.
2582 * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
2583 path::string() to get narrow string.
2584 * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
2585 paths.
2586 * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
2587 not std::string.
2588 * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
2589 different definintion of absolute paths on Windows.
2590 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2591 Do not use symlinks.
2592 * testsuite/experimental/filesystem/operations/absolute.cc: Test
2593 Windows behaviour.
2594 * testsuite/experimental/filesystem/operations/copy.cc: Construct
2595 fstreams with NTCTS not std::basic_string.
2596 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
2597 * testsuite/experimental/filesystem/operations/exists.cc: Use
2598 __gnu_test::root_path() instead of "/".
2599 * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
2600 fstreams with NTCTS not std::basic_string.
2601 * testsuite/experimental/filesystem/operations/last_write_time.cc:
2602 Use path::string() to get narrow string.
2603 * testsuite/experimental/filesystem/operations/space.cc: Use
2604 __gnu_test::root_path() instead of "/".
2605 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
2606 Add helpers for adjusting the environment on Windows.
2607 * testsuite/experimental/filesystem/path/append/path.cc: Use
2608 path::string() to get narrow strings for comparisons.
2609 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
2610 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2611 Likewise.
2612 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2613 * testsuite/experimental/filesystem/path/native/string.cc: Use
2614 string_type not std::string.
2615 * testsuite/experimental/filesystem/path/query/is_absolute.cc:
2616 Adjust for different definintion of absolute paths on Windows.
2617 * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
2618 function.
2619 (__gnu_test::scoped_file): Construct fstreams with NTCTS not
2620 std::basic_string.
2621
2622 2018-05-31 Jonathan Wakely <jwakely@redhat.com>
2623
2624 PR libstdc++/85951
2625 * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
2626 uint_least16_t and uint_least32_t.
2627 (__make_unsigned<wchar_t>): Define unconditionally.
2628 (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
2629 typedefs.
2630 (__make_unsigned_selector_base): New type to provide helper templates.
2631 (__make_unsigned_selector<_Tp, false, true>): Reimplement using
2632 __make_unsigned_selector_base helpers.
2633 (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
2634 (__make_signed_selector<_Tp, true, false>): Remove intermediate
2635 typedefs.
2636 (__make_signed<wchar_t>, __make_signed<char16_t>)
2637 (__make_signed<char32_t>)): Define unconditionally.
2638 * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
2639 wchar_t, char16_t and char32_t are transformed correctly.
2640 * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
2641 dg-error lineno.
2642 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
2643 wchar_t, char16_t and char32_t are transformed correctly.
2644 * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
2645 dg-error lineno.
2646
2647 2018-05-29 Jonathan Wakely <jwakely@redhat.com>
2648
2649 * include/std/variant (__erased_dtor): Qualify call to __get.
2650
2651 2018-05-27 François Dumont <fdumont@gcc.gnu.org>
2652
2653 * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
2654 (_Rb_tree(const allocator_type&)): Use latter.
2655 * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
2656 (map(initializer_list<value_type>, const allocator_type&)): Likewise.
2657 (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
2658 * include/bits/stl_multimap.h
2659 (multimap(const allocator_type&)): Likewise.
2660 (multimap(initializer_list<value_type>, const allocator_type&)):
2661 Likewise.
2662 (multimap(_InputIterator, _InputIterator, const allocator_type&)):
2663 Likewise.
2664 * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
2665 (set(initializer_list<value_type>, const allocator_type&)): Likewise.
2666 (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
2667 * include/bits/stl_multiset.h
2668 (multiset(const allocator_type&)): Likewise.
2669 (multiset(initializer_list<value_type>, const allocator_type&)):
2670 Likewise.
2671 (multiset(_InputIterator, _InputIterator, const allocator_type&)):
2672 Likewise.
2673
2674 2018-05-25 François Dumont <fdumont@gcc.gnu.org>
2675
2676 PR libstdc++/85768
2677 * src/c++11/debug.cc: Remove backtrace usage.
2678
2679 2018-05-24 Maya Rashish <coypu@sdf.org>
2680
2681 PR target/85904
2682 * crossconfig.m4: Test for aligned_alloc on netbsd.
2683 * configure: Regenerate.
2684
2685 2018-05-24 Jonathan Wakely <jwakely@redhat.com>
2686
2687 PR libstdc++/69769
2688 PR libstdc++/85886
2689 * include/bits/atomic_base.h (__atomic_base::value_type)
2690 (__atomic_base::difference_type): Add new typedefs.
2691 * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
2692 (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
2693 (atomic<T*>::operator++, atomic<T*>::operator--)
2694 (atomic<T*>::operator+=, atomic<T*>::operator-=)
2695 (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
2696 to enforce C++17 requirement on pointer arithmetic.
2697 (__atomic_val_t, __atomic_diff_t): New alias templates.
2698 (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
2699 (atomic_compare_exchange_weak_explicit)
2700 (atomic_compare_exchange_strong_explicit, atomic_store)
2701 (atomic_exchange, atomic_compare_exchange_weak)
2702 (atomic_compare_exchange_strong): Use __atomic_val_t to make
2703 scalar parameters be non-deduced contexts.
2704 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
2705 (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
2706 atomic instead of __atomic_base, and use __atomic_diff_t for scalar
2707 parameters.
2708 (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
2709 (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
2710 (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
2711 (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
2712 (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
2713 address types.
2714 * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
2715 * testsuite/29_atomics/atomic/69769.cc: New test.
2716 * testsuite/29_atomics/atomic/nonmembers.cc: New test.
2717 * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
2718 Disable test for C++17 and later.
2719 * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
2720 * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
2721 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
2722 test.
2723
2724 2018-05-23 Jonathan Wakely <jwakely@redhat.com>
2725
2726 * include/bits/fs_path.h (path::__is_encoded_char): Change from class
2727 template to alias template.
2728 (path::__value_type_is_char): Use remove_const_t.
2729 (path:_S_string_from_iter): New helper function.
2730 (path::_S_convert(InputIter, __null_terminated))
2731 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
2732 Use _S_string_from_iter.
2733 (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
2734 rep for COW strings.
2735 * include/experimental/bits/fs_path.h (path::__is_encoded_char):
2736 Change from class template to alias template.
2737 (path::__value_type_is_char): Use remove_const.
2738 (path:_S_string_from_iter): New helper function.
2739 (path::_S_convert(InputIter, __null_terminated))
2740 (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
2741 Use _S_string_from_iter.
2742 * testsuite/27_io/filesystem/path/append/source.cc: Test appending
2743 wide strings.
2744 * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
2745 string equality, not path equivalence.
2746 * testsuite/27_io/filesystem/path/construct/format.cc: Check
2747 construction from std::string and std::wstring and input iterators.
2748 * testsuite/27_io/filesystem/path/construct/locale.cc: Check
2749 construction from iterators.
2750 * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
2751 exact string equality, not path equivalence.
2752 * testsuite/experimental/filesystem/path/construct/locale.cc: Check
2753 construction from iterators.
2754
2755 * include/bits/fs_path.h (path::_M_type): Change default member
2756 initializer to _Filename.
2757 (path::begin): Create past-the-end iterator for empty path.
2758 * src/filesystem/std-path.cc (path::remove_filename()): Remove
2759 debugging check.
2760 (path::has_relative_path()): Return false for empty filenames.
2761 (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
2762 Fix offset of empty final component.
2763 * testsuite/27_io/filesystem/path/itr/components.cc: New.
2764 * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
2765
2766 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
2767
2768 Add support for opening file streams from wide character strings.
2769 * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
2770 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
2771 Define new overload.
2772 * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
2773 (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
2774 Declare new overload.
2775 * configure.ac: Check for _wfopen.
2776 * crossconfig.m4: Likewise.
2777 * configure: Regenerate.
2778 * config.h.in: Regenerate.
2779 * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
2780 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
2781 Define new overload.
2782 * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
2783 (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
2784 Declare new overload.
2785 [_GLIBCXX_HAVE__WFOPEN]
2786 (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2787 (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
2788 (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2789 (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
2790 (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
2791 (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
2792 new overloads.
2793 * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
2794 * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
2795 * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
2796 * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
2797 * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
2798 * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
2799 * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
2800
2801 2018-05-21 François Dumont <fdumont@gcc.gnu.org>
2802
2803 PR libstdc++/85845
2804 * include/bits/stl_tree.h
2805 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
2806 qualification.
2807
2808 2018-05-21 Jonathan Wakely <jwakely@redhat.com>
2809
2810 * src/filesystem/std-ops.cc (absolute): Report an error for empty
2811 paths.
2812 (weakly_canonical(const path&)): Do not call canonical on empty path.
2813 (weakly_canonical(const path&, error_code&)): Likewise.
2814 * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
2815
2816 PR libstdc++/85818
2817 * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
2818 dg-require-filesystem-ts.
2819
2820 PR libstdc++/85843
2821 * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
2822 initialize base class to avoid warnings.
2823
2824 2018-05-19 Jonathan Wakely <jwakely@redhat.com>
2825
2826 * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
2827 [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
2828 little_endian element in bitmask.
2829 * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
2830 * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
2831
2832 2018-05-18 François Dumont <fdumont@gcc.gnu.org>
2833
2834 * include/bits/stl_tree.h
2835 (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
2836 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
2837 (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
2838 (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
2839 * include/debug/map.h
2840 (map(map&&, const_allocator_type&)): Add noexcept qualitication.
2841 * include/debug/multimap.h
2842 (multimap(multimap&&, const_allocator_type&)): Likewise.
2843 * include/debug/set.h
2844 (set(set&&, const_allocator_type&)): Likewise.
2845 * include/debug/multiset.h
2846 (multiset(multiset&&, const_allocator_type&)): Likewise.
2847 * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
2848 Add checks.
2849 * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
2850 Add checks.
2851 * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
2852 Add checks.
2853 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
2854 Add checks.
2855 * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
2856 Add checks.
2857 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
2858 Add checks.
2859 * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
2860 Add checks.
2861 * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
2862 Add checks.
2863
2864 2018-05-18 Jason Merrill <jason@redhat.com>
2865
2866 * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
2867 for conversion to const_iterator. Add defaulted copy ops.
2868 * libsupc++/new (bad_alloc): Add defaulted copy ops.
2869 * libsupc++/exception.h (exception): Add defaulted copy ops.
2870 * include/std/system_error (system_error): Add defaulted copy ops.
2871 * include/std/stdexcept (domain_error, invalid_argument)
2872 (length_error, out_of_range, range_error, overflow_error)
2873 (underflow_error): Add defaulted copy ops.
2874 * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
2875 copy assignment.
2876 * include/bits/allocator.h (allocator): Add defaulted copy assignment.
2877 * include/ext/throw_allocator.h (condition_base): Add defaulted
2878 default and copy ctor and copy assignment.
2879
2880 2018-05-18 Jonathan Wakely <jwakely@redhat.com>
2881
2882 PR libstdc++/85098
2883 * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
2884 (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
2885 (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
2886 (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
2887 definitions.
2888 * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
2889 whitespace.
2890 * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
2891 braces around body of do-while.
2892 * testsuite/28_regex/basic_regex/85098.cc: New
2893
2894 2018-05-17 Jonathan Wakely <jwakely@redhat.com>
2895
2896 PR libstdc++/85818
2897 * src/filesystem/path.cc (path::preferred_separator): Add used
2898 attribute.
2899 * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
2900
2901 PR libstdc++/85812
2902 * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
2903 * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
2904 Refactor to separate non-throwing and throwing implementations.
2905 [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
2906 if constructing the object throws.
2907
2908 2018-05-15 Jonathan Wakely <jwakely@redhat.com>
2909
2910 PR libstdc++/85749
2911 * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
2912 (linear_congruential_engine, mersenne_twister_engine)
2913 (subtract_with_carry_engine, discard_block_engine)
2914 (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
2915 constrain function templates taking seed sequences.
2916 * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
2917 (mersenne_twister_engine::seed(_Sseq&))
2918 (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
2919 match declarations.
2920 * include/ext/random (simd_fast_mersenne_twister_engine): Use
2921 __is_seed_seq to constrain function templates taking seed sequences.
2922 * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
2923 Change return type to match declaration.
2924 * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
2925 New.
2926 * testsuite/26_numerics/random/independent_bits_engine/cons/
2927 seed_seq2.cc: New.
2928 * testsuite/26_numerics/random/linear_congruential_engine/cons/
2929 seed_seq2.cc: New.
2930 * testsuite/26_numerics/random/mersenne_twister_engine/cons/
2931 seed_seq2.cc: New.
2932 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2933 * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
2934 New.
2935 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
2936 seed_seq2.cc: New.
2937 * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
2938 seed_seq2.cc: New.
2939
2940 PR libstdc++/83891
2941 * include/bits/fs_path.h (path::is_absolute()): Use same definition
2942 for all operating systems.
2943 * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
2944 * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
2945 * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
2946 * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
2947
2948 * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
2949 unused <vector> header.
2950 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
2951 * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
2952 * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
2953 * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
2954 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
2955 Likewise.
2956 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
2957 Likewise.
2958 * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
2959 * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
2960 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
2961 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
2962 * testsuite/experimental/filesystem/path/decompose/extension.cc:
2963 Likewise.
2964 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2965 * testsuite/experimental/filesystem/path/query/has_extension.cc:
2966 Likewise.
2967 * testsuite/experimental/filesystem/path/query/has_filename.cc:
2968 Likewise.
2969 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2970 Likewise.
2971 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2972 Likewise.
2973 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2974 Likewise.
2975 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2976 Likewise.
2977 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2978 Likewise.
2979 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2980 * testsuite/experimental/filesystem/path/query/is_relative.cc:
2981 Likewise.
2982
2983 PR libstdc++/84159
2984 * include/bits/fs_path.h (path::operator/=, path::append): Construct
2985 temporary path before calling _M_append.
2986 (path::_M_append): Change parameter to path and implement C++17
2987 semantics.
2988 * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
2989 and more examples from the standard.
2990 * testsuite/27_io/filesystem/path/append/source.cc: New.
2991 * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
2992 * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
2993
2994 * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
2995 __invoke to prevent ADL.
2996
2997 2018-05-14 Jonathan Wakely <jwakely@redhat.com>
2998
2999 PR libstdc++/81256
3000 * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
3001 exceptions from _M_terminate_output().
3002 * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
3003 exceptions from close().
3004 * testsuite/27_io/basic_filebuf/close/81256.cc: New.
3005
3006 * include/bits/valarray_array.h (__valarray_get_memory): Remove.
3007 (__valarray_get_storage): Call operator new directly. Remove ignored
3008 top-level restrict qualifier and add malloc attribute instead.
3009 (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
3010
3011 PR libstdc++/67554
3012 * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
3013 (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
3014
3015 PR libstdc++/82966
3016 * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
3017 instead of type.
3018 * testsuite/23_containers/set/modifiers/node_swap.cc: New.
3019
3020 2018-05-13 Ville Voutilainen <ville.voutilainen@gmail.com>
3021
3022 PR libstdc++/80165
3023 * testsuite/20_util/variant/80165.cc: New.
3024
3025 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
3026
3027 * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
3028 * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
3029 of C++11 containers with Debug Mode support.
3030 * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
3031 * doc/html/*: Regenerate.
3032
3033 2018-05-10 Jason Merrill <jason@redhat.com>
3034
3035 * include/bits/regex_compiler.h (_S_cache_size): Change from
3036 function to variable.
3037
3038 2018-05-10 Edward Smith-Rowland <3dw4rd@verizon.net>
3039
3040 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
3041 * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
3042 argument defaulted to +1. Doxy comments on same.
3043 * testsuite/special_functions/02_assoc_legendre/
3044 check_value.cc: Regen.
3045 * testsuite/tr1/5_numerical_facilities/special_functions/
3046 02_assoc_legendre/check_value.cc: Regen.
3047
3048 2018-05-10 Jonathan Wakely <jwakely@redhat.com>
3049
3050 PR libstdc++/85729
3051 * include/bits/c++config.h (__replacement_assert): Add linkage
3052 specification.
3053 * include/bits/std_abs.h: Add comment to closing brace of block.
3054 * include/c_global/cstddef: Add linkage specification.
3055 * include/c_global/cstring: Likewise.
3056 * include/c_global/cwchar: Likewise.
3057
3058 2018-05-09 François Dumont <fdumont@gcc.gnu.org>
3059
3060 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
3061 Rename in...
3062 (_Safe_iterator<>::_S_constant()): ...that.
3063 * include/debug/safe_local_iterator.h
3064 (_Safe_local_iterator<>::_M_constant()): Rename in...
3065 (_Safe_local_iterator<>::_S_constant()): ...that.
3066 * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
3067 (_Iterator_state::__rbegin): New.
3068 (_Iterator_state::__rmiddle): New.
3069 (_Iterator_state::__rend): New.
3070 (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
3071 _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
3072 iterator type.
3073 (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
3074 _Is_iterator)): Likewise.
3075 (_Parameter::_S_reverse_state(_Iterator_state)): New.
3076 (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
3077 _Is_iterator)): New.
3078 (_Parameter(std::reverse_iterator<> const&, const char*,
3079 _Is_iterator)): New.
3080 (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
3081 const char*, _Is_iterator)): New.
3082 (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
3083 New.
3084 (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
3085 _Is_iterator)): New.
3086 * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
3087 * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
3088 * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
3089
3090 2018-05-09 Jonathan Wakely <jwakely@redhat.com>
3091
3092 * include/bits/std_function.h (_Base_manager::_M_get_pointer):
3093 Use constexpr if in C++17 mode.
3094 (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
3095 Copy from const object.
3096 * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
3097
3098 2018-05-08 François Dumont <fdumont@gcc.gnu.org>
3099
3100 * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
3101 [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
3102 backtrace.
3103
3104 * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
3105 * include/debug/functions.h (__check_valid_range): Use latter.
3106 * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
3107 use latter.
3108 * include/debug/deque
3109 (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
3110 * include/debug/forward_list
3111 (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
3112 Likewise.
3113 * include/debug/list
3114 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3115 * include/debug/list
3116 (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3117 * include/debug/map.h
3118 (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3119 (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
3120 Likewise.
3121 * include/debug/multimap.h
3122 (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3123 (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
3124 const _Alloc&)): Likewise.
3125 * include/debug/set.h
3126 (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3127 (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
3128 Likewise.
3129 * include/debug/multiset.h
3130 (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
3131 (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
3132 const _Alloc&)): Likewise.
3133 * include/debug/string
3134 (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
3135 Likewise.
3136 * include/debug/unordered_map
3137 (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
3138 Likewise.
3139 (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
3140 const _Alloc&)): Likewise.
3141 * include/debug/unordered_set
3142 (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
3143 Likewise.
3144 (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
3145 const _Alloc&)): Likewise.
3146 * include/debug/vector
3147 (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
3148
3149 * include/debug/formatter.h (_Error_formatter::_M_function): New.
3150 (_Error_formatter(const char*, unsigned int)): Adapt.
3151 (_Error_formatter::_M_at): Rename in...
3152 (_Error_formatter::_S_at): ...that and adapt.
3153 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
3154 (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
3155 * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
3156 when available.
3157
3158 2018-05-08 Jonathan Wakely <jwakely@redhat.com>
3159
3160 * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
3161 Use normal std::vector even in Debug Mode.
3162
3163 PR libstdc++/85672
3164 * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
3165 to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
3166 * include/Makefile.in: Regenerate.
3167 * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
3168 within conditional block.
3169
3170 2018-05-07 Jonathan Wakely <jwakely@redhat.com>
3171
3172 * doc/xml/manual/using.xml (table.cmd_options): Document that the
3173 C++17 Filesystem implementation also needs -lstdc++fs.
3174
3175 PR libstdc++/85671
3176 * include/bits/fs_path.h (operator/): Permit copy elision.
3177 * include/experimental/bits/fs_path.h (operator/): Likewise.
3178
3179 2018-05-07 Edward Smith-Rowland <3dw4rd@verizon.net>
3180
3181 Moar PR libstdc++/80506
3182 * include/bits/random.tcc (gamma_distribution::__generate_impl()):
3183 Fix magic number used in loop condition.
3184
3185 2018-05-04 Jonathan Wakely <jwakely@redhat.com>
3186
3187 PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
3188 * include/std/optional (_Optional_payload): Add noexcept to default
3189 constructor. Re-indent.
3190 (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
3191 constructor for copying disengaged payloads.
3192 (_Optional_payload<_Tp, true, false, true>): Likewise.
3193 (_Optional_payload<_Tp, true, true, false>): Likewise.
3194 (_Optional_payload<_Tp, true, false, false>): Likewise.
3195 * testsuite/20_util/optional/cons/85642.cc: New.
3196 * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
3197
3198 2018-05-03 Jonathan Wakely <jwakely@redhat.com>
3199
3200 PR libstdc++/82644
3201 * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
3202 inline definitions instead of using-declarations.
3203 [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
3204 * testsuite/tr1/5_numerical_facilities/special_functions/
3205 07_conf_hyperg/compile_cxx17.cc: New.
3206 * testsuite/tr1/5_numerical_facilities/special_functions/
3207 17_hyperg/compile_cxx17.cc: New.
3208
3209 PR libstdc++/84769
3210 * include/std/variant (visit): Qualify std::get call.
3211
3212 PR libstdc++/85632 use uintmax_t for arithmetic
3213 * src/filesystem/ops.cc (experimental::filesystem::space): Perform
3214 arithmetic in result type.
3215 * src/filesystem/std-ops.cc (filesystem::space): Likewise.
3216 * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
3217 is greater than free space.
3218 * testsuite/experimental/filesystem/operations/space.cc: New.
3219
3220 * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
3221 * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
3222 New.
3223 * testsuite/20_util/remove_cvref/value.cc: New.
3224 * testsuite/20_util/remove_cvref/value_ext.cc: New.
3225
3226 PR libstdc++/84087 LWG DR 2268 basic_string default arguments
3227 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
3228 (append(const basic_string&, size_type, size_type)
3229 (assign(const basic_string&, size_type, size_type)
3230 (insert(size_type, const basic_string&, size_type, size_type)
3231 (replace(size_type,size_type,const basic_string&,size_type,size_type)
3232 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
3233 Add default arguments (LWG 2268).
3234 [_GLIBCXX_USE_CXX11_ABI=0]
3235 (append(const basic_string&, size_type, size_type)
3236 (assign(const basic_string&, size_type, size_type)
3237 (insert(size_type, const basic_string&, size_type, size_type)
3238 (replace(size_type,size_type,const basic_string&,size_type,size_type)
3239 (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
3240 Likewise.
3241 * testsuite/21_strings/basic_string/dr2268.cc: New test.
3242
3243 PR libstdc++/84535
3244 * include/std/thread (thread::__not_same): New SFINAE helper.
3245 (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
3246 first argument is not a std::thread. Add static assertion to check
3247 INVOKE expression is valid.
3248 (thread::thread(thread&), thread::thread(const thread&&)): Remove.
3249 (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
3250 __invoke_result for return types and remove exception specifications.
3251 * testsuite/30_threads/thread/cons/84535.cc: New.
3252
3253 * include/std/future (__async_result_of): Use __invoke_result instead
3254 of result_of.
3255
3256 * include/std/any (any_cast): Use __remove_cvref_t.
3257 * include/std/tuple (__make_tuple): Likewise.
3258 * include/std/type_traits (__remove_cvref_t): Define.
3259 (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
3260 [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
3261 * include/std/variant (__erased_hash): Use __remove_cvref_t.
3262
3263 2018-05-02 François Dumont <fdumont@gcc.gnu.org>
3264
3265 * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
3266 ensure overloaded comma not used.
3267 * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
3268 * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
3269 * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
3270 * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
3271 * testsuite/23_containers/list/modifiers/assign/1.cc: New.
3272 * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
3273 * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
3274
3275 2018-05-02 Jonathan Wakely <jwakely@redhat.com>
3276
3277 PR libstdc++/68197
3278 * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
3279 indices to unsigned.
3280 * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
3281 as failure. Refactor error handling.
3282 * testsuite/27_io/ios_base/storage/68197.cc: New.
3283
3284 PR libstdc++/57997
3285 PR libstdc++/83860
3286 * include/bits/gslice_array.h (gslice_array): Define default
3287 constructor as deleted, as per C++11 standard.
3288 * include/bits/mask_array.h (mask_array): Likewise.
3289 * include/bits/slice_array.h (slice_array): Likewise.
3290 * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
3291 to namespace __detail.
3292 (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
3293 members.
3294 * include/bits/valarray_before.h (_ValArrayRef): New helper for type
3295 of data members in closure objects.
3296 (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
3297 (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
3298 __detail.
3299 (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
3300 (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
3301 (_SBase::_M_expr): Use _ValArrayRef for type of data members.
3302 * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
3303 (_ValFunClos, _RefFunClos): Move to namespace __detail and add
3304 using-declarations to namespace std.
3305 * testsuite/26_numerics/valarray/83860.cc: New.
3306
3307 * testsuite/backward/strstream_move.cc: Remove duplicate function
3308 call.
3309
3310 PR libstdc++/69608
3311 * include/backward/strstream (strstreambuf): Define move constructor
3312 and move assignment operator.
3313 (istrstream, ostrstream, strstream): Likewise.
3314 * testsuite/backward/strstream_move.cc: New.
3315
3316 2018-05-01 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
3317
3318 PR libstdc++/84654
3319 * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
3320 * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
3321 * configure: Regenerate.
3322 * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
3323 based on ENABLE_FLOAT128.
3324 * include/Makefile.in: Regenerate.
3325 * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
3326 [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
3327 _GLIBCXX_USE_FLOAT128.
3328
3329 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
3330
3331 * configure: Regenerated.
3332
3333 2018-04-19 Jakub Jelinek <jakub@redhat.com>
3334
3335 * configure: Regenerated.
3336
3337 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
3338 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR libstdc++/85442
3341 * src/c++11/Makefile.am: Don't generate debuginfo again for
3342 cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
3343 * src/c++11/Makefile.in: Regenerate.
3344
3345 2018-04-18 Jonathan Wakely <jwakely@redhat.com>
3346
3347 PR libstdc++/84442
3348 * testsuite/30_threads/thread/cons/terminate.cc
3349 [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
3350
3351 2018-04-18 David Malcolm <dmalcolm@redhat.com>
3352
3353 PR jit/85384
3354 * configure: Regenerate.
3355
3356 2018-04-16 Jonathan Wakely <jwakely@redhat.com>
3357
3358 * testsuite/experimental/filesystem/file_status/1.cc: Add
3359 -DUSE_FILESYSTEM_TS to dg-options.
3360 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3361 Likewise.
3362 * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
3363 * testsuite/experimental/filesystem/iterators/
3364 recursive_directory_iterator.cc: Likewise.
3365 * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
3366 * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
3367 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3368 * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
3369 * testsuite/experimental/filesystem/operations/create_directories.cc:
3370 Likewise.
3371 * testsuite/experimental/filesystem/operations/create_directory.cc:
3372 Likewise.
3373 * testsuite/experimental/filesystem/operations/create_symlink.cc:
3374 Likewise.
3375 * testsuite/experimental/filesystem/operations/current_path.cc:
3376 Likewise.
3377 * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
3378 * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
3379 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
3380 * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
3381 * testsuite/experimental/filesystem/operations/last_write_time.cc:
3382 Likewise.
3383 * testsuite/experimental/filesystem/operations/permissions.cc:
3384 Likewise.
3385 * testsuite/experimental/filesystem/operations/read_symlink.cc:
3386 Likewise.
3387 * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
3388 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
3389 * testsuite/experimental/filesystem/operations/status.cc: Likewise.
3390 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3391 Likewise.
3392 * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
3393 * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
3394 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
3395 * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
3396 * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
3397 * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
3398 * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
3399 * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
3400 * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
3401 * testsuite/experimental/filesystem/path/construct/default.cc:
3402 Likewise.
3403 * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
3404 * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
3405 * testsuite/experimental/filesystem/path/construct/string_view.cc:
3406 Likewise.
3407 * testsuite/experimental/filesystem/path/decompose/extension.cc:
3408 Likewise.
3409 * testsuite/experimental/filesystem/path/decompose/filename.cc:
3410 Likewise.
3411 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
3412 Likewise.
3413 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
3414 Likewise.
3415 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
3416 Likewise.
3417 * testsuite/experimental/filesystem/path/decompose/root_name.cc:
3418 Likewise.
3419 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
3420 Likewise.
3421 * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
3422 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
3423 Likewise.
3424 * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
3425 * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
3426 * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
3427 Likewise.
3428 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
3429 Likewise.
3430 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
3431 Likewise.
3432 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
3433 Likewise.
3434 * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
3435 * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
3436 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
3437 Likewise.
3438 * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
3439 * testsuite/experimental/filesystem/path/query/has_extension.cc:
3440 Likewise.
3441 * testsuite/experimental/filesystem/path/query/has_filename.cc:
3442 Likewise.
3443 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
3444 Likewise.
3445 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
3446 Likewise.
3447 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
3448 Likewise.
3449 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
3450 Likewise.
3451 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
3452 Likewise.
3453 * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
3454 * testsuite/experimental/filesystem/path/query/is_relative.cc:
3455 Likewise.
3456
3457 2018-04-13 Jonathan Wakely <jwakely@redhat.com>
3458
3459 * src/c++11/Makefile.am: Fix sed command.
3460 * src/c++11/Makefile.in: Regenerate.
3461
3462 * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
3463 handle mangled names starting with double underscores on darwin.
3464 * src/c++11/Makefile.in: Regenerate.
3465
3466 2018-04-12 Jonathan Wakely <jwakely@redhat.com>
3467
3468 * src/c++11/Makefile.am: Fix comment.
3469 * src/c++11/Makefile.in: Regenerate.
3470 * src/c++11/cxx11-ios_failure.cc: Fix comment.
3471 * src/c++98/ios_failure.cc: Likewise.
3472
3473 * src/c++11/ios.cc: Remove redundant macro definition.
3474
3475 2018-04-11 Jonathan Wakely <jwakely@redhat.com>
3476
3477 * doc/xml/manual/abi.xml: Document header locations in recent
3478 releases.
3479 * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
3480 * doc/xml/manual/spine.xml: Update copyright years.
3481 * doc/xml/manual/strings.xml: Adjust tolower example to avoid
3482 undefined behaviour.
3483 * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
3484 * doc/html/*: Regenerate.
3485
3486 2018-04-10 Jonathan Wakely <jwakely@redhat.com>
3487
3488 * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
3489 * doc/xml/manual/backwards_compatibility.xml: Likewise.
3490 * doc/xml/manual/containers.xml: Likewise.
3491 * doc/xml/manual/debug_mode.xml: Likewise.
3492 * doc/xml/manual/extensions.xml: Likewise.
3493 * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
3494 * doc/xml/manual/using.xml: Likewise.
3495 * doc/xml/manual/utilities.xml: Likewise.
3496
3497 PR libstdc++/85222
3498 * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
3499 cxx11-ios_failure.cc to rewrite type info for __ios_failure.
3500 * src/c++11/Makefile.in: Regenerate.
3501 * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
3502 New types.
3503 [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
3504 * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
3505 * src/c++98/ios_failure.cc (__construct_ios_failure)
3506 (__destroy_ios_failure, is_ios_failure_handler): New functions.
3507 [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
3508 * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
3509 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
3510 handler types, to always catch std::ios_base::failure.
3511 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
3512 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
3513 exceptions_failbit.cc: Likewise.
3514 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
3515 exceptions_failbit.cc: Likewise.
3516 * testsuite/27_io/basic_istream/extractors_other/char/
3517 exceptions_null.cc: Likewise.
3518 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
3519 exceptions_null.cc: Likewise.
3520 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
3521 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
3522 * testsuite/27_io/basic_ostream/inserters_other/char/
3523 exceptions_null.cc: Likewise.
3524 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
3525 exceptions_null.cc: Likewise.
3526 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
3527
3528 2018-04-05 Jonathan Wakely <jwakely@redhat.com>
3529
3530 * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
3531 __get calls to avoid ADL and avoid ambiguity due to Clang bug.
3532
3533 2018-04-03 Jonathan Wakely <jwakely@redhat.com>
3534
3535 PR libstdc++/85183
3536 * include/std/variant (_Move_assign_base::operator=): Fix incorrect
3537 value categories.
3538 * testsuite/20_util/variant/85183.cc: New.
3539
3540 2018-03-26 Jonathan Wakely <jwakely@redhat.com>
3541
3542 * include/std/variant (__get): Qualify calls to avoid ADL.
3543 (__select_index): Adjust whitespace.
3544 (variant): Add using-declaration to workaround Clang bug.
3545
3546 2018-03-22 Jonathan Wakely <jwakely@redhat.com>
3547
3548 PR libstdc++/85040
3549 * include/bits/stl_function.h (greater::__not_overloaded)
3550 (less::__not_overloaded, greater_equal::__not_overloaded)
3551 (less_equal::__not_overloaded): Fix ambiguous specializations.
3552 * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
3553 tests for type with overloaded operators.
3554
3555 2018-03-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3556
3557 PR libstdc++/77691
3558 * testsuite/experimental/memory_resource/resource_adaptor.cc:
3559 xfail execution on 32-bit Solaris/x86.
3560
3561 2018-03-21 Jonathan Wakely <jwakely@redhat.com>
3562
3563 * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
3564 VERIFY instead of assert.
3565 * testsuite/20_util/hash/84998.cc: New test.
3566 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
3567 copy of test adjusted for Debug Mode.
3568 * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
3569 test in Debug Mode.
3570
3571 2018-03-20 François Dumont <fdumont@gcc.gnu.org>
3572
3573 PR libstdc++/84998
3574 * include/bits/stl_bvector.h: Fix std::hash friend declaration.
3575 * include/std/bitset: Likewise.
3576 * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
3577 declaration.
3578 * include/bits/stl_multimap.h (std::multimap<>): Likewise.
3579 * include/bits/stl_multiset.h (std::multiset<>): Likewise.
3580 * include/bits/stl_set.h (std::set<>): Likewise.
3581 * include/bits/unordered_map.h (std::unordered_map<>): Fix
3582 _Hash_merge_helper friend declaration.
3583 (std::unordered_multimap<>): Likewise.
3584 * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
3585 (std::unordered_multiset<>): Likewise.
3586
3587 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
3588
3589 * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
3590 trailing slash for domain level link.
3591 * doc/xml/faq.xml: Ditto.
3592 * doc/xml/manual/appendix_free.xml (software): Ditto.
3593 * doc/xml/manual/intro.xml: Ditto.
3594 * doc/xml/manual/spine.xml: Ditto.
3595 * doc/xml/spine.xml: Ditto.
3596
3597 2018-03-19 Gerald Pfeifer <gerald@pfeifer.com>
3598
3599 * doc/xml/manual/documentation_hacking.xml: Adjust link to
3600 docbook.org.
3601
3602 2018-03-17 Jonathan Wakely <jwakely@redhat.com>
3603
3604 * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
3605 to compile as C++98.
3606
3607 2018-03-14 Jonathan Wakely <jwakely@redhat.com>
3608
3609 PR libstdc++/78420
3610 * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
3611 (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
3612 to ensure total order for pointers.
3613 (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
3614 Add operator() overloads for pointer arguments and make generic
3615 overloads dispatch to new _S_cmp functions when comparisons would
3616 use built-in operators for pointers.
3617 * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
3618
3619 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
3620
3621 PR libstdc++/84773
3622 PR libstdc++/83662
3623 * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
3624 * configure: Regenerate.
3625 * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
3626 (aligned_alloc): Add using-declaration.
3627 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
3628
3629 2018-03-09 François Dumont <fdumont@gcc.gnu.org>
3630
3631 * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
3632 Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
3633 registration.
3634
3635 2018-03-09 Jonathan Wakely <jwakely@redhat.com>
3636
3637 PR libstdc++/84769
3638 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
3639 Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
3640
3641 src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
3642 src/filesystem/std-ops.cc (create_dir): Likewise.
3643
3644 2018-03-08 François Dumont <fdumont@gcc.gnu.org>
3645
3646 * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
3647 (StdListIteratorPrinter): Inherit from latter.
3648 (StdFwdListIteratorPrinter): New, inherit from latter.
3649 (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
3650 when iterator has no associated container.
3651 (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
3652 __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
3653 registrations.
3654 * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
3655 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
3656
3657 2018-03-06 Ville Voutilainen <ville.voutilainen@gmail.com>
3658
3659 PR libstdc++/84601
3660 * include/std/optional (_Optional_payload): Split into multiple
3661 specializations that can handle different cases of trivial or
3662 non-trivial assignment operators.
3663 * testsuite/20_util/optional/84601.cc: New.
3664 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
3665
3666 2018-03-02 Jonathan Wakely <jwakely@redhat.com>
3667
3668 PR libstdc++/84671
3669 * include/bits/parse_numbers.h (_Number_help): Add partial
3670 specialization to handle digit separators. Adjust partial
3671 specialization for recursion temrination to require _Pow == 1ULL.
3672 * testsuite/20_util/duration/literals/84671.cc: New
3673
3674 2018-02-27 Ville Voutilainen <ville.voutilainen@gmail.com>
3675
3676 Implement the missing bits of LWG 2769
3677 * include/std/any (any_cast(const any&)): Add static_assert.
3678 (any_cast(any&)): Likewise.
3679 (any_cast(any&&)): Likewise, and remove the handling
3680 for copyable-but-not-movable type.
3681 * testsuite/20_util/any/misc/any_cast.cc: Adjust.
3682 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
3683 add new tests.
3684
3685 2018-02-23 Jonathan Wakely <jwakely@redhat.com>
3686
3687 PR libstdc++/84532
3688 * include/std/thread (thread::__make_invoker): Construct tuple
3689 directly instead of using make_tuple.
3690 * testsuite/30_threads/async/84532.cc: New.
3691 * testsuite/30_threads/thread/84532.cc: New.
3692
3693 2018-02-20 François Dumont <fdumont@gcc.gnu.org>
3694
3695 * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
3696 (template<> __aligned_buffer): Define as __aligned_membuf alias.
3697
3698 2018-02-19 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
3699
3700 PR target/84148
3701 * configure: Regenerate.
3702
3703 2018-02-15 Jonathan Wakely <jwakely@redhat.com>
3704
3705 PR libstdc++/81797
3706 * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
3707 * configure: Regenerate.
3708 * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
3709 defined.
3710 * include/Makefile.in: Regenerate.
3711
3712 2018-01-29 Jonathan Wakely <jwakely@redhat.com>
3713
3714 PR libstdc++/83833
3715 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
3716 Add -ffloat-store to options for m68k and ia32.
3717
3718 * doc/xml/faq.xml: Update copyright years.
3719 * doc/html/*: Regenerate.
3720
3721 PR libstdc++/83658
3722 * include/std/any (any::__do_emplace): Only set _M_manager after
3723 constructing the contained object.
3724 * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
3725 * testsuite/20_util/any/modifiers/83658.cc: New test.
3726
3727 2018-01-25 Jonathan Wakely <jwakely@redhat.com>
3728
3729 PR libstdc++/81076
3730 * include/c_global/cstddef (__byte_operand): Define primary template.
3731 * testsuite/18_support/byte/81076.cc: New test.
3732
3733 2018-01-19 Christophe Lyon <christophe.lyon@linaro.org>
3734
3735 * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
3736 dg-options and dg-add-options order.
3737 * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
3738 * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
3739 Likewise.
3740 * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
3741 * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
3742 Likewise.
3743 * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
3744 Likewise.
3745 * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
3746 * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
3747 Likewise.
3748 * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
3749 Likewise.
3750 * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
3751 Likewise.
3752 * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
3753 Likewise.
3754 * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
3755 Likewise.
3756 * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
3757 Likewise.
3758 * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
3759 Likewise.
3760 * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
3761 Likewise.
3762 * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
3763 * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
3764 * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
3765 * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
3766 * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
3767 * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
3768 * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
3769 * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
3770 * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
3771 Likewise.
3772 * testsuite/special_functions/19_sph_bessel/check_nan.cc:
3773 Likewise.
3774 * testsuite/special_functions/20_sph_legendre/check_nan.cc:
3775 Likewise.
3776 * testsuite/special_functions/21_sph_neumann/check_nan.cc:
3777 Likewise.
3778
3779 2018-01-18 Uros Bizjak <ubizjak@gmail.com>
3780
3781 * configure.ac (AC_CHECK_HEADERS): Add linux/types.h. Conditionally
3782 include linux/types.h when checking linux/random.h header.
3783 * config.h.in: Regenerate.
3784 * configure: Ditto.
3785 * src/c++11/random.cc: Conditionally include linux/types.h.
3786
3787 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
3788
3789 * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
3790
3791 2018-01-16 Jonathan Wakely <jwakely@redhat.com>
3792
3793 PR libstdc++/83834
3794 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
3795 pattern with exact match for std::cerr.
3796
3797 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
3798
3799 PR libstdc++/83833
3800 * include/bits/random.h (chi_squared_distribution::param): Update
3801 gamma distribution parameter.
3802 * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
3803 test.
3804
3805 PR libstdc++/83830
3806 * include/std/type_traits (has_unique_object_representations_v): Add
3807 variable template.
3808 * testsuite/20_util/has_unique_object_representations/value.cc: Check
3809 variable template.
3810
3811 2018-01-15 Ville Voutilainen <ville.voutilainen@gmail.com>
3812
3813 Make optional conditionally
3814 trivially_{copy,move}_{constructible,assignable}
3815 * include/std/optional (_Optional_payload): Fix the comment in
3816 the class head and turn into a primary and one specialization.
3817 (_Optional_payload::_M_engaged): Strike the NSDMI.
3818 (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
3819 New.
3820 (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
3821 Likewise.
3822 (_Optional_payload<_Tp, false>::_M_get): Likewise.
3823 (_Optional_payload<_Tp, false>::_M_reset): Likewise.
3824 (_Optional_base_impl): Likewise.
3825 (_Optional_base): Turn into a primary and three specializations.
3826 (optional(nullopt)): Change the base init.
3827 * testsuite/20_util/optional/assignment/8.cc: New.
3828 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
3829 * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
3830
3831 2018-01-15 Jonathan Wakely <jwakely@redhat.com>
3832
3833 PR libstdc++/80276
3834 * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
3835 (get_template_arg_list): New.
3836 (StdVariantPrinter._template_args): Remove, use get_template_arg_list
3837 instead.
3838 (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
3839 of strings and regular expressions.
3840 (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
3841 (FilteringTypePrinter): Add docstring. Match using startswith. Use
3842 strip_inline_namespaces instead of strip_versioned_namespace.
3843 (add_one_type_printer): Prepend namespace to match argument.
3844 (register_type_printers): Add type printers for char16_t and char32_t
3845 string types and for types using cxx11 ABI. Update calls to
3846 add_one_template_type_printer to provide default argument dicts.
3847 * testsuite/libstdc++-prettyprinters/80276.cc: New test.
3848 * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
3849 basic_string<unsigned char> and basic_string<signed char>.
3850 * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
3851 to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
3852
3853 2018-01-14 Andreas Schwab <schwab@linux-m68k.org>
3854
3855 PR libstdc++/81092
3856 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
3857
3858 2018-01-13 Tim Shen <timshen@google.com>
3859
3860 PR libstdc++/83601
3861 * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
3862 * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
3863 * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
3864
3865 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3866
3867 PR libstdc++/64054
3868 * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
3869 Remove dg-xfail-run-if.
3870
3871 2018-01-10 François Dumont <fdumont@gcc.gnu.org>
3872
3873 * include/bits/forward_list.h
3874 (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
3875 (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
3876 (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
3877 (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
3878 (_Fwd_list_impl()): Add noexcept qualification.
3879 (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
3880 (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
3881 (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
3882 (_Fwd_list_base()): Default.
3883 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
3884 (_Fwd_list_base(_Fwd_list_base&&)): Default.
3885 (forward_list<>()): Default.
3886 (forward_list<>(forward_list&&)): Default.
3887 (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
3888 (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
3889 (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
3890 * include/bits/forward_list.tcc
3891 (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
3892 _M_impl._M_head move assignment.
3893 (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
3894 * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
3895
3896 2018-01-09 Jonathan Wakely <jwakely@redhat.com>
3897
3898 PR libstdc++/80276
3899 * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
3900 (UniquePointerPrinter): Print correct template argument, not type of
3901 the pointer.
3902 (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
3903 a type.
3904 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
3905 array type.
3906 * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
3907 weak_ptr of array types.
3908
3909 2018-01-09 François Dumont <fdumont@gcc.gnu.org>
3910
3911 PR libstdc++/83709
3912 * include/bits/hashtable_policy.h
3913 (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
3914 __first != __last.
3915 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
3916 (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
3917 Add false_type parameter.
3918 (_Insert_base::insert): Adapt.
3919 * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
3920 Adapt.
3921 (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
3922 Add __n_elt parameter, defaulted to 1.
3923 (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
3924 policy _M_need_rehash.
3925 (_Hashtable::_M_merge_unique): Pass target number of elements to add to
3926 produce only 1 rehash if necessary.
3927 * testsuite/23_containers/unordered_map/insert/83709.cc: New.
3928 * testsuite/23_containers/unordered_set/insert/83709.cc: New.
3929
3930 2018-01-09 Juraj Oršulić <juraj.orsulic@fer.hr>
3931 Jonathan Wakely <jwakely@redhat.com>
3932
3933 PR libstdc++/59253 (partial)
3934 * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
3935 type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
3936 (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
3937 children.
3938 * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
3939 of unique_ptr printer.
3940 * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
3941 output of shared_ptr printer.
3942
3943 2018-01-05 Jonathan Wakely <jwakely@redhat.com>
3944
3945 PR libstdc++/83626
3946 * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
3947 unnecessary symlink_status call.
3948 (remove_all(const path&, error_code&)): Use filesystem::remove.
3949 * src/filesystem/std-ops.cc: Likewise.
3950
3951 PR libstdc++/83279
3952 * src/filesystem/std-ops.cc (do_copy_file): Use non-null offset with
3953 sendfile.
3954
3955 PR libstdc++/83626
3956 * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
3957 report an error for ENOENT.
3958 (remove_all(const path&)): Fix type of result variable.
3959 (remove_all(const path&, error_code&)): Use non-throwing increment
3960 for directory iterator. Call POSIX remove directly to avoid redundant
3961 calls to symlink_status. Do not report errors for ENOENT.
3962 * src/filesystem/std-ops.cc: Likewise.
3963 * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
3964 overload.
3965 * testsuite/experimental/filesystem/operations/remove_all.cc:
3966 Likewise.
3967
3968 2018-01-04 Jonathan Wakely <jwakely@redhat.com>
3969
3970 PR libstdc++/83626
3971 * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
3972 redundant call to ec.clear().
3973 (remove_all(const path&, error_code&))): Do not return an error for
3974 non-existent paths.
3975 * src/filesystem/std-ops.cc: Likewise.
3976 * testsuite/27_io/filesystem/operations/remove.cc: New test.
3977 * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
3978 results for non-existent paths.
3979 * testsuite/experimental/filesystem/operations/remove.cc: New test.
3980 * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
3981 expected results for non-existent paths.
3982
3983 * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
3984 check status_known once.
3985 * include/experimental/bits/fs_ops.h: Likewise.
3986
3987 PR libstdc++/83607
3988 * include/std/functional (__is_byte_like): New trait.
3989 (__is_std_equal_to): Remove.
3990 (__boyer_moore_base_t): Use __is_byte_like instead of
3991 __is_std_equal_to.
3992 * include/experimental/functional (__is_std_equal_to): Remove.
3993 (__boyer_moore_base_t): Use __is_byte_like instead of
3994 __is_std_equal_to.
3995 * testsuite/20_util/function_objects/83607.cc: New test.
3996
3997 2018-01-03 Ville Voutilainen <ville.voutilainen@gmail.com>
3998
3999 Protect optional's deduction guide with the feature macro
4000 * include/std/optional: Use the feature macro.
4001
4002 2018-01-03 Jakub Jelinek <jakub@redhat.com>
4003
4004 Update copyright years.
4005 \f
4006 Copyright (C) 2018 Free Software Foundation, Inc.
4007
4008 Copying and distribution of this file, with or without modification,
4009 are permitted in any medium without royalty provided the copyright
4010 notice and this notice are preserved.