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