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