2018-06-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob47c6b1fe52d1ee51c09ae5be14ed8ac4f79ce007
1 2018-06-07  François Dumont  <fdumont@gcc.gnu.org>
3         * src/c++11/debug.cc
4         (_Safe_iterator_base::_M_detach()): Reset state only if needed.
5         (_Safe_iterator_base::_M_detach_single()): Likewise.
6         (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
7         (_Safe_local_iterator_base::_M_detach_single()): Likewise.
9 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
11         * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
12         move of const value.
14 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
16         PR c++/86068
17         * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
18         rather than __cpp_transactional_memory >= 201505L.
20 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
22         PR libstdc++/86008
23         * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
24         Define new partial specialization.
25         * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
26         new overload.
27         (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
28         value not reference for iteration.
29         * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
30         comment.
31         * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
32         * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
33         comment.
35 2018-06-05  Jonathan Wakely  <jwakely@redhat.com>
37         * include/std/type_traits: Fix comment typos.
39         * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
40         mingw* targets.
41         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
42         * testsuite/experimental/filesystem/operations/read_symlink.cc:
43         Likewise.
45 2018-06-05  François Dumont  <fdumont@gcc.gnu.org>
47         * include/bits/stl_tempbuf.h
48         (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
49         (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
50         * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
51         * include/bits/stl_algo.h (__stable_partition): Adapt.
52         (__inplace_merge): Adapt.
53         (__stable_sort): Adapt.
55 2018-06-04  Jonathan Wakely  <jwakely@redhat.com>
57         PR libstdc++/85930
58         * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
59         unconditionally. Remove redundant declaration.
60         [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
61         alignment-specifier.
63         * include/bits/postypes.h (fpos): Define special members as defaulted.
65         PR libstdc++/85930
66         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
67         the static variable correctly.
69 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
71         PR libstdc++/78870 support std::filesystem on Windows
72         * config.h.in: Regenerate.
73         * configure: Regenerate.
74         * configure.ac: Check for link, readlink and symlink.
75         * include/bits/fs_path.h (path::operator/=(const path&)): Move
76         definition out of class body.
77         (path::is_absolute(), path::_M_append(path)): Likewise.
78         (operator<<(basic_ostream, const path&)): Use std::quoted directly.
79         (operator>>(basic_istream, path&)): Likewise.
80         (u8path): Reorder definitions and fix Windows implementation.
81         (path::is_absolute()): Define inline and fix for Windows.
82         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
83         Define POSIX version inline.
84         (path::_M_append(path)): Define inline.
85         * include/experimental/bits/fs_path.h (path::is_absolute()): Move
86         definition out of class body.
87         (operator<<(basic_ostream, const path&)): Fix type of delimiter and
88         escape characters.
89         (operator>>(basic_istream, path&)): Likewise.
90         (path::is_absolute()): Define inline and fix for Windows.
91         * src/filesystem/dir-common.h (__gnu_posix): New namespace.
92         (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
93         (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
94         Define as adaptors for Windows functions/types or as
95         using-declarations for POSIX functions/types.
96         (_Dir_base, get_file_type): Qualify names to use declarations from
97         __gnu_posix namespace.
98         (_Dir_base::is_dor_or_dotdot): New helper functions.
99         * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
100         names to use declarations from __gnu_posix namespace.
101         * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
102         (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
103         (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
104         (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
105         (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
106         (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
107         Define as adaptors for Windows functions/types or as
108         using-declarations for POSIX functions/types.
109         (stat_type, do_copy_file): Qualify names to use declarations from
110         __gnu_posix namespace.
111         (do_space): Declare new function.
112         (make_file_type): Only use S_ISLNK if defined.
113         * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
114         path::value_type not char.
115         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
116         names to use declarations from __gnu_posix namespace.
117         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
118         add implementation for Windows.
119         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
120         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
121         [!_PC_PATH_MAX]: Don't use pathconf.
122         [PATH_MAX]: Use if defined.
123         (filesystem::current_path(const path&, error_code&))
124         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
125         (filesystem::last_write_time, filesystem::permissions): Use names
126         from __gnu_posix.
127         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
128         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
129         implementation for Windows.
130         (filesystem::rename, filesystem::resize_file): Use names from
131         __gnu_posix.
132         (filesystem::space): Use do_space.
133         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
134         (filesystem::status, filesystem::symlink_status): Use names from
135         __gnu_posix.
136         (filesystem::temp_directory_path): Add implementation for Windows.
137         * src/filesystem/path.cc (dot): Define constant.
138         (path::replace_extension): Use dot.
139         (path::_M_find_extension): Likewise. Use path::string_type not
140         std::string.
141         (path::_M_split_cmpts): Use dot.
142         (filesystem_error::_M_get_what): Use u8string() not native().
143         * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
144         Qualify names to use declarations from __gnu_posix namespace.
145         * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
146         correct error_code.
147         (filesystem::absolute(const path&, error_code&)): Add implementation
148         for Windows.
149         (char_ptr, filesystem::canonical): Use path::value_type not char.
150         (do_copy_file): Use names from __gnu_posix.
151         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
152         sendfile.
153         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
154         names to use declarations from __gnu_posix namespace.
155         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
156         add implementation for Windows.
157         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
158         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
159         [!_PC_PATH_MAX]: Don't use pathconf.
160         [PATH_MAX]: Use if defined.
161         (filesystem::current_path(const path&, error_code&))
162         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
163         (filesystem::last_write_time, filesystem::permissions): Use names
164         from __gnu_posix.
165         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
166         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
167         implementation for Windows.
168         (filesystem::rename, filesystem::resize_file): Use names from
169         __gnu_posix.
170         (do_space): Define.
171         (filesystem::space): Use do_space.
172         (filesystem::status, filesystem::symlink_status): Use names from
173         __gnu_posix.
174         (filesystem::temp_directory_path): Add implementation for Windows.
175         * src/filesystem/std-path.cc
176         [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
177         Define for Windows.
178         (dot): Define constant.
179         (path::replace_extension, is_dot): Use dot.
180         (path::lexically_normal): Check _M_type instead of calling
181         non-existent function.
182         (path::_M_find_extension): Use dot. Use path::string_type not
183         std::string.
184         (path::_M_split_cmpts): Use dot.
185         (filesystem_error::_M_get_what): Use u8string() not native().
186         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
187         use symlinks.
188         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
189         Likewise.
190         * testsuite/27_io/filesystem/operations/absolute.cc: Use
191         __gnu_test::root_path() instead of "/" and add Windows-specific tests.
192         * testsuite/27_io/filesystem/operations/canonical.cc: Use
193         path::string() to get narrow string, not path::native().
194         * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
195         with std::filesystem::path not std::basic_string.
196         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
197         * testsuite/27_io/filesystem/operations/exists.cc: Use
198         __gnu_test::root_path() instead of "/".
199         * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
200         fstreams with std::filesystem::path not std::basic_string.
201         * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
202         path::string() to get narrow string.
203         * testsuite/27_io/filesystem/operations/space.cc: Check results for
204         errors, expect sensible values otherwise.
205         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
206         helpers for adjusting the environment on Windows.
207         * testsuite/27_io/filesystem/path/append/path.cc: Test
208         Windows-specific behaviour.
209         * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
210         of path::string_type objects.
211         * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
212         string to wide string on Windows.
213         * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
214         for backslash as root-directory.
215         * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
216         path::string() to get narrow string.
217         * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
218         paths.
219         * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
220         not std::string.
221         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
222         different definintion of absolute paths on Windows.
223         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
224         Do not use symlinks.
225         * testsuite/experimental/filesystem/operations/absolute.cc: Test
226         Windows behaviour.
227         * testsuite/experimental/filesystem/operations/copy.cc: Construct
228         fstreams with NTCTS not std::basic_string.
229         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
230         * testsuite/experimental/filesystem/operations/exists.cc: Use
231         __gnu_test::root_path() instead of "/".
232         * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
233         fstreams with NTCTS not std::basic_string.
234         * testsuite/experimental/filesystem/operations/last_write_time.cc:
235         Use path::string() to get narrow string.
236         * testsuite/experimental/filesystem/operations/space.cc: Use
237         __gnu_test::root_path() instead of "/".
238         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
239         Add helpers for adjusting the environment on Windows.
240         * testsuite/experimental/filesystem/path/append/path.cc: Use
241         path::string() to get narrow strings for comparisons.
242         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
243         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
244         Likewise.
245         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
246         * testsuite/experimental/filesystem/path/native/string.cc: Use
247         string_type not std::string.
248         * testsuite/experimental/filesystem/path/query/is_absolute.cc:
249         Adjust for different definintion of absolute paths on Windows.
250         * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
251         function.
252         (__gnu_test::scoped_file): Construct fstreams with NTCTS not
253         std::basic_string.
255 2018-05-31  Jonathan Wakely  <jwakely@redhat.com>
257         PR libstdc++/85951
258         * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
259         uint_least16_t and uint_least32_t.
260         (__make_unsigned<wchar_t>): Define unconditionally.
261         (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
262         typedefs.
263         (__make_unsigned_selector_base): New type to provide helper templates.
264         (__make_unsigned_selector<_Tp, false, true>): Reimplement using
265         __make_unsigned_selector_base helpers.
266         (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
267         (__make_signed_selector<_Tp, true, false>): Remove intermediate
268         typedefs.
269         (__make_signed<wchar_t>, __make_signed<char16_t>)
270         (__make_signed<char32_t>)): Define unconditionally.
271         * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
272         wchar_t, char16_t and char32_t are transformed correctly.
273         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
274         dg-error lineno.
275         * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
276         wchar_t, char16_t and char32_t are transformed correctly.
277         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
278         dg-error lineno.
280 2018-05-29  Jonathan Wakely  <jwakely@redhat.com>
282         * include/std/variant (__erased_dtor): Qualify call to __get.
284 2018-05-27  François Dumont  <fdumont@gcc.gnu.org>
286         * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
287         (_Rb_tree(const allocator_type&)): Use latter.
288         * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
289         (map(initializer_list<value_type>, const allocator_type&)): Likewise.
290         (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
291         * include/bits/stl_multimap.h
292         (multimap(const allocator_type&)): Likewise.
293         (multimap(initializer_list<value_type>, const allocator_type&)):
294         Likewise.
295         (multimap(_InputIterator, _InputIterator, const allocator_type&)):
296         Likewise.
297         * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
298         (set(initializer_list<value_type>, const allocator_type&)): Likewise.
299         (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
300         * include/bits/stl_multiset.h
301         (multiset(const allocator_type&)): Likewise.
302         (multiset(initializer_list<value_type>, const allocator_type&)):
303         Likewise.
304         (multiset(_InputIterator, _InputIterator, const allocator_type&)):
305         Likewise.
307 2018-05-25  François Dumont  <fdumont@gcc.gnu.org>
309         PR libstdc++/85768
310         * src/c++11/debug.cc: Remove backtrace usage.
312 2018-05-24  Maya Rashish  <coypu@sdf.org>
314         PR target/85904
315         * crossconfig.m4: Test for aligned_alloc on netbsd.
316         * configure: Regenerate.
318 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
320         PR libstdc++/69769
321         PR libstdc++/85886
322         * include/bits/atomic_base.h (__atomic_base::value_type)
323         (__atomic_base::difference_type): Add new typedefs.
324         * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
325         (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
326         (atomic<T*>::operator++, atomic<T*>::operator--)
327         (atomic<T*>::operator+=, atomic<T*>::operator-=)
328         (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
329         to enforce C++17 requirement on pointer arithmetic.
330         (__atomic_val_t, __atomic_diff_t): New alias templates.
331         (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
332         (atomic_compare_exchange_weak_explicit)
333         (atomic_compare_exchange_strong_explicit, atomic_store)
334         (atomic_exchange, atomic_compare_exchange_weak)
335         (atomic_compare_exchange_strong): Use __atomic_val_t to make
336         scalar parameters be non-deduced contexts.
337         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
338         (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
339         atomic instead of __atomic_base, and use __atomic_diff_t for scalar
340         parameters.
341         (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
342         (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
343         (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
344         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
345         (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
346         address types.
347         * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
348         * testsuite/29_atomics/atomic/69769.cc: New test.
349         * testsuite/29_atomics/atomic/nonmembers.cc: New test.
350         * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
351         Disable test for C++17 and later.
352         * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
353         * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
354         * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
355         test.
357 2018-05-23  Jonathan Wakely  <jwakely@redhat.com>
359         * include/bits/fs_path.h (path::__is_encoded_char): Change from class
360         template to alias template.
361         (path::__value_type_is_char): Use remove_const_t.
362         (path:_S_string_from_iter): New helper function.
363         (path::_S_convert(InputIter, __null_terminated))
364         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
365         Use _S_string_from_iter.
366         (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
367         rep for COW strings.
368         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
369         Change from class template to alias template.
370         (path::__value_type_is_char): Use remove_const.
371         (path:_S_string_from_iter): New helper function.
372         (path::_S_convert(InputIter, __null_terminated))
373         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
374         Use _S_string_from_iter.
375         * testsuite/27_io/filesystem/path/append/source.cc: Test appending
376         wide strings.
377         * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
378         string equality, not path equivalence.
379         * testsuite/27_io/filesystem/path/construct/format.cc: Check
380         construction from std::string and std::wstring and input iterators.
381         * testsuite/27_io/filesystem/path/construct/locale.cc: Check
382         construction from iterators.
383         * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
384         exact string equality, not path equivalence.
385         * testsuite/experimental/filesystem/path/construct/locale.cc: Check
386         construction from iterators.
388         * include/bits/fs_path.h (path::_M_type): Change default member
389         initializer to _Filename.
390         (path::begin): Create past-the-end iterator for empty path.
391         * src/filesystem/std-path.cc (path::remove_filename()): Remove
392         debugging check.
393         (path::has_relative_path()): Return false for empty filenames.
394         (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
395         Fix offset of empty final component.
396         * testsuite/27_io/filesystem/path/itr/components.cc: New.
397         * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
399 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
401         Add support for opening file streams from wide character strings.
402         * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
403         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
404         Define new overload.
405         * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
406         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
407         Declare new overload.
408         * configure.ac: Check for _wfopen.
409         * crossconfig.m4: Likewise.
410         * configure: Regenerate.
411         * config.h.in: Regenerate.
412         * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
413         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
414         Define new overload.
415         * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
416         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
417         Declare new overload.
418         [_GLIBCXX_HAVE__WFOPEN]
419         (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
420         (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
421         (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
422         (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
423         (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
424         (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
425         new overloads.
426         * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
427         * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
428         * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
429         * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
430         * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
431         * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
432         * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
434 2018-05-21  François Dumont  <fdumont@gcc.gnu.org>
436         PR libstdc++/85845
437         * include/bits/stl_tree.h
438         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
439         qualification.
441 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
443         * src/filesystem/std-ops.cc (absolute): Report an error for empty
444         paths.
445         (weakly_canonical(const path&)): Do not call canonical on empty path.
446         (weakly_canonical(const path&, error_code&)): Likewise.
447         * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
449         PR libstdc++/85818
450         * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
451         dg-require-filesystem-ts.
453         PR libstdc++/85843
454         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
455         initialize base class to avoid warnings.
457 2018-05-19  Jonathan Wakely  <jwakely@redhat.com>
459         * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
460         [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
461         little_endian element in bitmask.
462         * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
463         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
465 2018-05-18  François Dumont  <fdumont@gcc.gnu.org>
467         * include/bits/stl_tree.h
468         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
469         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
470         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
471         (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
472         * include/debug/map.h
473         (map(map&&, const_allocator_type&)): Add noexcept qualitication.
474         * include/debug/multimap.h
475         (multimap(multimap&&, const_allocator_type&)): Likewise.
476         * include/debug/set.h
477         (set(set&&, const_allocator_type&)): Likewise.
478         * include/debug/multiset.h
479         (multiset(multiset&&, const_allocator_type&)): Likewise.
480         * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
481         Add checks.
482         * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
483         Add checks.
484         * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
485         Add checks.
486         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
487         Add checks.
488         * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
489         Add checks.
490         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
491         Add checks.
492         * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
493         Add checks.
494         * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
495         Add checks.
497 2018-05-18  Jason Merrill  <jason@redhat.com>
499         * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
500         for conversion to const_iterator.  Add defaulted copy ops.
501         * libsupc++/new (bad_alloc): Add defaulted copy ops.
502         * libsupc++/exception.h (exception): Add defaulted copy ops.
503         * include/std/system_error (system_error): Add defaulted copy ops.
504         * include/std/stdexcept (domain_error, invalid_argument)
505         (length_error, out_of_range, range_error, overflow_error)
506         (underflow_error): Add defaulted copy ops.
507         * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
508         copy assignment.
509         * include/bits/allocator.h (allocator): Add defaulted copy assignment.
510         * include/ext/throw_allocator.h (condition_base): Add defaulted
511         default and copy ctor and copy assignment.
513 2018-05-18  Jonathan Wakely  <jwakely@redhat.com>
515         PR libstdc++/85098
516         * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
517         (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
518         (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
519         (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
520         definitions.
521         * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
522         whitespace.
523         * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
524         braces around body of do-while.
525         * testsuite/28_regex/basic_regex/85098.cc: New
527 2018-05-17  Jonathan Wakely  <jwakely@redhat.com>
529         PR libstdc++/85818
530         * src/filesystem/path.cc (path::preferred_separator): Add used
531         attribute.
532         * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
534         PR libstdc++/85812
535         * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
536         * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
537         Refactor to separate non-throwing and throwing implementations.
538         [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
539         if constructing the object throws.
541 2018-05-15  Jonathan Wakely  <jwakely@redhat.com>
543         PR libstdc++/85749
544         * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
545         (linear_congruential_engine, mersenne_twister_engine)
546         (subtract_with_carry_engine, discard_block_engine)
547         (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
548         constrain function templates taking seed sequences.
549         * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
550         (mersenne_twister_engine::seed(_Sseq&))
551         (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
552         match declarations.
553         * include/ext/random (simd_fast_mersenne_twister_engine): Use
554         __is_seed_seq to constrain function templates taking seed sequences.
555         * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
556         Change return type to match declaration.
557         * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
558         New.
559         * testsuite/26_numerics/random/independent_bits_engine/cons/
560         seed_seq2.cc: New.
561         * testsuite/26_numerics/random/linear_congruential_engine/cons/
562         seed_seq2.cc: New.
563         * testsuite/26_numerics/random/mersenne_twister_engine/cons/
564         seed_seq2.cc: New.
565         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
566         * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
567         New.
568         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
569         seed_seq2.cc: New.
570         * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
571         seed_seq2.cc: New.
573         PR libstdc++/83891
574         * include/bits/fs_path.h (path::is_absolute()): Use same definition
575         for all operating systems.
576         * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
577         * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
578         * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
579         * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
581         * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
582         unused <vector> header.
583         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
584         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
585         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
586         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
587         * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
588         Likewise.
589         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
590         Likewise.
591         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
592         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
593         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
594         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
595         * testsuite/experimental/filesystem/path/decompose/extension.cc:
596         Likewise.
597         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
598         * testsuite/experimental/filesystem/path/query/has_extension.cc:
599         Likewise.
600         * testsuite/experimental/filesystem/path/query/has_filename.cc:
601         Likewise.
602         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
603         Likewise.
604         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
605         Likewise.
606         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
607         Likewise.
608         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
609         Likewise.
610         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
611         Likewise.
612         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
613         * testsuite/experimental/filesystem/path/query/is_relative.cc:
614         Likewise.
616         PR libstdc++/84159
617         * include/bits/fs_path.h (path::operator/=, path::append): Construct
618         temporary path before calling _M_append.
619         (path::_M_append): Change parameter to path and implement C++17
620         semantics.
621         * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
622         and more examples from the standard.
623         * testsuite/27_io/filesystem/path/append/source.cc: New.
624         * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
625         * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
627         * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
628         __invoke to prevent ADL.
630 2018-05-14  Jonathan Wakely  <jwakely@redhat.com>
632         PR libstdc++/81256
633         * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
634         exceptions from _M_terminate_output().
635         * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
636         exceptions from close().
637         * testsuite/27_io/basic_filebuf/close/81256.cc: New.
639         * include/bits/valarray_array.h (__valarray_get_memory): Remove.
640         (__valarray_get_storage): Call operator new directly. Remove ignored
641         top-level restrict qualifier and add malloc attribute instead.
642         (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
644         PR libstdc++/67554
645         * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
646         (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
648         PR libstdc++/82966
649         * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
650         instead of type.
651         * testsuite/23_containers/set/modifiers/node_swap.cc: New.
653 2018-05-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
655         PR libstdc++/80165
656         * testsuite/20_util/variant/80165.cc: New.
658 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
660         * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
661         * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
662         of C++11 containers with Debug Mode support.
663         * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
664         * doc/html/*: Regenerate.
666 2018-05-10  Jason Merrill  <jason@redhat.com>
668         * include/bits/regex_compiler.h (_S_cache_size): Change from
669         function to variable.
671 2018-05-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
673         PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
674         * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
675         argument defaulted to +1.  Doxy comments on same.
676         * testsuite/special_functions/02_assoc_legendre/
677         check_value.cc: Regen.
678         * testsuite/tr1/5_numerical_facilities/special_functions/
679         02_assoc_legendre/check_value.cc: Regen.
681 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
683         PR libstdc++/85729
684         * include/bits/c++config.h (__replacement_assert): Add linkage
685         specification.
686         * include/bits/std_abs.h: Add comment to closing brace of block.
687         * include/c_global/cstddef: Add linkage specification.
688         * include/c_global/cstring: Likewise.
689         * include/c_global/cwchar: Likewise.
691 2018-05-09  François Dumont  <fdumont@gcc.gnu.org>
693         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
694         Rename in...
695         (_Safe_iterator<>::_S_constant()): ...that.
696         * include/debug/safe_local_iterator.h
697         (_Safe_local_iterator<>::_M_constant()): Rename in...
698         (_Safe_local_iterator<>::_S_constant()): ...that.
699         * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
700         (_Iterator_state::__rbegin): New.
701         (_Iterator_state::__rmiddle): New.
702         (_Iterator_state::__rend): New.
703         (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
704         _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
705         iterator type.
706         (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
707         _Is_iterator)): Likewise.
708         (_Parameter::_S_reverse_state(_Iterator_state)): New.
709         (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
710         _Is_iterator)): New.
711         (_Parameter(std::reverse_iterator<> const&, const char*,
712         _Is_iterator)): New.
713         (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
714         const char*, _Is_iterator)): New.
715         (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
716         New.
717         (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
718         _Is_iterator)): New.
719         * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
720         * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
721         * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
723 2018-05-09  Jonathan Wakely  <jwakely@redhat.com>
725         * include/bits/std_function.h (_Base_manager::_M_get_pointer):
726         Use constexpr if in C++17 mode.
727         (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
728         Copy from const object.
729         * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
731 2018-05-08  François Dumont  <fdumont@gcc.gnu.org>
733         * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
734         [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
735         backtrace.
737         * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
738         * include/debug/functions.h (__check_valid_range): Use latter.
739         * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
740         use latter.
741         * include/debug/deque
742         (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
743         * include/debug/forward_list
744         (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
745         Likewise.
746         * include/debug/list
747         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
748         * include/debug/list
749         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
750         * include/debug/map.h
751         (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
752         (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
753         Likewise.
754         * include/debug/multimap.h
755         (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
756         (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
757         const _Alloc&)): Likewise.
758         * include/debug/set.h
759         (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
760         (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
761         Likewise.
762         * include/debug/multiset.h
763         (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
764         (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
765         const _Alloc&)): Likewise.
766         * include/debug/string
767         (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
768         Likewise.
769         * include/debug/unordered_map
770         (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
771         Likewise.
772         (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
773         const _Alloc&)): Likewise.
774         * include/debug/unordered_set
775         (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
776         Likewise.
777         (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
778         const _Alloc&)): Likewise.
779         * include/debug/vector
780         (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
782         * include/debug/formatter.h (_Error_formatter::_M_function): New.
783         (_Error_formatter(const char*, unsigned int)): Adapt.
784         (_Error_formatter::_M_at): Rename in...
785         (_Error_formatter::_S_at): ...that and adapt.
786         * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
787         (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
788         * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
789         when available.
791 2018-05-08  Jonathan Wakely  <jwakely@redhat.com>
793         * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
794         Use normal std::vector even in Debug Mode.
796         PR libstdc++/85672
797         * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
798         to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
799         * include/Makefile.in: Regenerate.
800         * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
801         within conditional block.
803 2018-05-07  Jonathan Wakely  <jwakely@redhat.com>
805         * doc/xml/manual/using.xml (table.cmd_options): Document that the
806         C++17 Filesystem implementation also needs -lstdc++fs.
808         PR libstdc++/85671
809         * include/bits/fs_path.h (operator/): Permit copy elision.
810         * include/experimental/bits/fs_path.h (operator/): Likewise.
812 2018-05-07  Edward Smith-Rowland  <3dw4rd@verizon.net>
814         Moar PR libstdc++/80506
815         * include/bits/random.tcc (gamma_distribution::__generate_impl()):
816         Fix magic number used in loop condition.
818 2018-05-04  Jonathan Wakely  <jwakely@redhat.com>
820         PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
821         * include/std/optional (_Optional_payload): Add noexcept to default
822         constructor. Re-indent.
823         (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
824         constructor for copying disengaged payloads.
825         (_Optional_payload<_Tp, true, false, true>): Likewise.
826         (_Optional_payload<_Tp, true, true, false>): Likewise.
827         (_Optional_payload<_Tp, true, false, false>): Likewise.
828         * testsuite/20_util/optional/cons/85642.cc: New.
829         * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
831 2018-05-03  Jonathan Wakely  <jwakely@redhat.com>
833         PR libstdc++/82644
834         * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
835         inline definitions instead of using-declarations.
836         [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
837         * testsuite/tr1/5_numerical_facilities/special_functions/
838         07_conf_hyperg/compile_cxx17.cc: New.
839         * testsuite/tr1/5_numerical_facilities/special_functions/
840         17_hyperg/compile_cxx17.cc: New.
842         PR libstdc++/84769
843         * include/std/variant (visit): Qualify std::get call.
845         PR libstdc++/85632 use uintmax_t for arithmetic
846         * src/filesystem/ops.cc (experimental::filesystem::space): Perform
847         arithmetic in result type.
848         * src/filesystem/std-ops.cc (filesystem::space): Likewise.
849         * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
850         is greater than free space.
851         * testsuite/experimental/filesystem/operations/space.cc: New.
853         * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
854         * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
855         New.
856         * testsuite/20_util/remove_cvref/value.cc: New.
857         * testsuite/20_util/remove_cvref/value_ext.cc: New.
859         PR libstdc++/84087 LWG DR 2268 basic_string default arguments
860         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
861         (append(const basic_string&, size_type, size_type)
862         (assign(const basic_string&, size_type, size_type)
863         (insert(size_type, const basic_string&, size_type, size_type)
864         (replace(size_type,size_type,const basic_string&,size_type,size_type)
865         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
866         Add default arguments (LWG 2268).
867         [_GLIBCXX_USE_CXX11_ABI=0]
868         (append(const basic_string&, size_type, size_type)
869         (assign(const basic_string&, size_type, size_type)
870         (insert(size_type, const basic_string&, size_type, size_type)
871         (replace(size_type,size_type,const basic_string&,size_type,size_type)
872         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
873         Likewise.
874         * testsuite/21_strings/basic_string/dr2268.cc: New test.
876         PR libstdc++/84535
877         * include/std/thread (thread::__not_same): New SFINAE helper.
878         (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
879         first argument is not a std::thread. Add static assertion to check
880         INVOKE expression is valid.
881         (thread::thread(thread&), thread::thread(const thread&&)): Remove.
882         (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
883         __invoke_result for return types and remove exception specifications.
884         * testsuite/30_threads/thread/cons/84535.cc: New.
886         * include/std/future (__async_result_of): Use __invoke_result instead
887         of result_of.
889         * include/std/any (any_cast): Use __remove_cvref_t.
890         * include/std/tuple (__make_tuple): Likewise.
891         * include/std/type_traits (__remove_cvref_t): Define.
892         (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
893         [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
894         * include/std/variant (__erased_hash): Use __remove_cvref_t.
896 2018-05-02  François Dumont  <fdumont@gcc.gnu.org>
898         * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
899         ensure overloaded comma not used.
900         * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
901         * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
902         * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
903         * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
904         * testsuite/23_containers/list/modifiers/assign/1.cc: New.
905         * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
906         * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
908 2018-05-02  Jonathan Wakely  <jwakely@redhat.com>
910         PR libstdc++/68197
911         * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
912         indices to unsigned.
913         * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
914         as failure. Refactor error handling.
915         * testsuite/27_io/ios_base/storage/68197.cc: New.
917         PR libstdc++/57997
918         PR libstdc++/83860
919         * include/bits/gslice_array.h (gslice_array): Define default
920         constructor as deleted, as per C++11 standard.
921         * include/bits/mask_array.h (mask_array): Likewise.
922         * include/bits/slice_array.h (slice_array): Likewise.
923         * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
924         to namespace __detail.
925         (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
926         members.
927         * include/bits/valarray_before.h (_ValArrayRef): New helper for type
928         of data members in closure objects.
929         (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
930         (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
931         __detail.
932         (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
933         (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
934         (_SBase::_M_expr): Use _ValArrayRef for type of data members.
935         * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
936         (_ValFunClos, _RefFunClos): Move to namespace __detail and add
937         using-declarations to namespace std.
938         * testsuite/26_numerics/valarray/83860.cc: New.
940         * testsuite/backward/strstream_move.cc: Remove duplicate function
941         call.
943         PR libstdc++/69608
944         * include/backward/strstream (strstreambuf): Define move constructor
945         and move assignment operator.
946         (istrstream, ostrstream, strstream): Likewise.
947         * testsuite/backward/strstream_move.cc: New.
949 2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
951         PR libstdc++/84654
952         * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
953         * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
954         * configure: Regenerate.
955         * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
956         based on ENABLE_FLOAT128.
957         * include/Makefile.in: Regenerate.
958         * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
959         [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
960         _GLIBCXX_USE_FLOAT128.
962 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
964         * configure: Regenerated.
966 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
968         * configure: Regenerated.
970 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
971             Jakub Jelinek  <jakub@redhat.com>
973         PR libstdc++/85442
974         * src/c++11/Makefile.am: Don't generate debuginfo again for
975         cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
976         * src/c++11/Makefile.in: Regenerate.
978 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
980         PR libstdc++/84442
981         * testsuite/30_threads/thread/cons/terminate.cc
982         [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
984 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
986         PR jit/85384
987         * configure: Regenerate.
989 2018-04-16  Jonathan Wakely  <jwakely@redhat.com>
991         * testsuite/experimental/filesystem/file_status/1.cc: Add
992         -DUSE_FILESYSTEM_TS to dg-options.
993         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
994         Likewise.
995         * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
996         * testsuite/experimental/filesystem/iterators/
997         recursive_directory_iterator.cc: Likewise.
998         * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
999         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
1000         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1001         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1002         * testsuite/experimental/filesystem/operations/create_directories.cc:
1003         Likewise.
1004         * testsuite/experimental/filesystem/operations/create_directory.cc:
1005         Likewise.
1006         * testsuite/experimental/filesystem/operations/create_symlink.cc:
1007         Likewise.
1008         * testsuite/experimental/filesystem/operations/current_path.cc:
1009         Likewise.
1010         * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
1011         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
1012         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1013         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
1014         * testsuite/experimental/filesystem/operations/last_write_time.cc:
1015         Likewise.
1016         * testsuite/experimental/filesystem/operations/permissions.cc:
1017         Likewise.
1018         * testsuite/experimental/filesystem/operations/read_symlink.cc:
1019         Likewise.
1020         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
1021         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1022         * testsuite/experimental/filesystem/operations/status.cc: Likewise.
1023         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1024         Likewise.
1025         * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
1026         * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
1027         * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
1028         * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
1029         * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
1030         * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
1031         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1032         * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
1033         * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
1034         * testsuite/experimental/filesystem/path/construct/default.cc:
1035         Likewise.
1036         * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
1037         * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
1038         * testsuite/experimental/filesystem/path/construct/string_view.cc:
1039         Likewise.
1040         * testsuite/experimental/filesystem/path/decompose/extension.cc:
1041         Likewise.
1042         * testsuite/experimental/filesystem/path/decompose/filename.cc:
1043         Likewise.
1044         * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
1045         Likewise.
1046         * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
1047         Likewise.
1048         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1049         Likewise.
1050         * testsuite/experimental/filesystem/path/decompose/root_name.cc:
1051         Likewise.
1052         * testsuite/experimental/filesystem/path/decompose/root_path.cc:
1053         Likewise.
1054         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1055         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1056         Likewise.
1057         * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
1058         * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
1059         * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
1060         Likewise.
1061         * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
1062         Likewise.
1063         * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
1064         Likewise.
1065         * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
1066         Likewise.
1067         * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
1068         * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
1069         * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
1070         Likewise.
1071         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1072         * testsuite/experimental/filesystem/path/query/has_extension.cc:
1073         Likewise.
1074         * testsuite/experimental/filesystem/path/query/has_filename.cc:
1075         Likewise.
1076         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1077         Likewise.
1078         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1079         Likewise.
1080         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1081         Likewise.
1082         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1083         Likewise.
1084         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1085         Likewise.
1086         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1087         * testsuite/experimental/filesystem/path/query/is_relative.cc:
1088         Likewise.
1090 2018-04-13  Jonathan Wakely  <jwakely@redhat.com>
1092         * src/c++11/Makefile.am: Fix sed command.
1093         * src/c++11/Makefile.in: Regenerate.
1095         * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
1096         handle mangled names starting with double underscores on darwin.
1097         * src/c++11/Makefile.in: Regenerate.
1099 2018-04-12  Jonathan Wakely  <jwakely@redhat.com>
1101         * src/c++11/Makefile.am: Fix comment.
1102         * src/c++11/Makefile.in: Regenerate.
1103         * src/c++11/cxx11-ios_failure.cc: Fix comment.
1104         * src/c++98/ios_failure.cc: Likewise.
1106         * src/c++11/ios.cc: Remove redundant macro definition.
1108 2018-04-11  Jonathan Wakely  <jwakely@redhat.com>
1110         * doc/xml/manual/abi.xml: Document header locations in recent
1111         releases.
1112         * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
1113         * doc/xml/manual/spine.xml: Update copyright years.
1114         * doc/xml/manual/strings.xml: Adjust tolower example to avoid
1115         undefined behaviour.
1116         * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
1117         * doc/html/*: Regenerate.
1119 2018-04-10  Jonathan Wakely  <jwakely@redhat.com>
1121         * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
1122         * doc/xml/manual/backwards_compatibility.xml: Likewise.
1123         * doc/xml/manual/containers.xml: Likewise.
1124         * doc/xml/manual/debug_mode.xml: Likewise.
1125         * doc/xml/manual/extensions.xml: Likewise.
1126         * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
1127         * doc/xml/manual/using.xml: Likewise.
1128         * doc/xml/manual/utilities.xml: Likewise.
1130         PR libstdc++/85222
1131         * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
1132         cxx11-ios_failure.cc to rewrite type info for __ios_failure.
1133         * src/c++11/Makefile.in: Regenerate.
1134         * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
1135         New types.
1136         [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1137         * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
1138         * src/c++98/ios_failure.cc (__construct_ios_failure)
1139         (__destroy_ios_failure, is_ios_failure_handler): New functions.
1140         [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
1141         * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
1142         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
1143         handler types, to always catch std::ios_base::failure.
1144         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1145         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1146         exceptions_failbit.cc: Likewise.
1147         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1148         exceptions_failbit.cc: Likewise.
1149         * testsuite/27_io/basic_istream/extractors_other/char/
1150         exceptions_null.cc: Likewise.
1151         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1152         exceptions_null.cc: Likewise.
1153         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1154         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1155         * testsuite/27_io/basic_ostream/inserters_other/char/
1156         exceptions_null.cc: Likewise.
1157         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1158         exceptions_null.cc: Likewise.
1159         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1161 2018-04-05  Jonathan Wakely  <jwakely@redhat.com>
1163         * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
1164         __get calls to avoid ADL and avoid ambiguity due to Clang bug.
1166 2018-04-03  Jonathan Wakely  <jwakely@redhat.com>
1168         PR libstdc++/85183
1169         * include/std/variant (_Move_assign_base::operator=): Fix incorrect
1170         value categories.
1171         * testsuite/20_util/variant/85183.cc: New.
1173 2018-03-26  Jonathan Wakely  <jwakely@redhat.com>
1175         * include/std/variant (__get): Qualify calls to avoid ADL.
1176         (__select_index): Adjust whitespace.
1177         (variant): Add using-declaration to workaround Clang bug.
1179 2018-03-22  Jonathan Wakely  <jwakely@redhat.com>
1181         PR libstdc++/85040
1182         * include/bits/stl_function.h (greater::__not_overloaded)
1183         (less::__not_overloaded, greater_equal::__not_overloaded)
1184         (less_equal::__not_overloaded): Fix ambiguous specializations.
1185         * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
1186         tests for type with overloaded operators.
1188 2018-03-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1190         PR libstdc++/77691
1191         * testsuite/experimental/memory_resource/resource_adaptor.cc:
1192         xfail execution on 32-bit Solaris/x86.
1194 2018-03-21  Jonathan Wakely  <jwakely@redhat.com>
1196         * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
1197         VERIFY instead of assert.
1198         * testsuite/20_util/hash/84998.cc: New test.
1199         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
1200         copy of test adjusted for Debug Mode.
1201         * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
1202         test in Debug Mode.
1204 2018-03-20  François Dumont  <fdumont@gcc.gnu.org>
1206         PR libstdc++/84998
1207         * include/bits/stl_bvector.h: Fix std::hash friend declaration.
1208         * include/std/bitset: Likewise.
1209         * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
1210         declaration.
1211         * include/bits/stl_multimap.h (std::multimap<>): Likewise.
1212         * include/bits/stl_multiset.h (std::multiset<>): Likewise.
1213         * include/bits/stl_set.h (std::set<>): Likewise.
1214         * include/bits/unordered_map.h (std::unordered_map<>): Fix
1215         _Hash_merge_helper friend declaration.
1216         (std::unordered_multimap<>): Likewise.
1217         * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
1218         (std::unordered_multiset<>): Likewise.
1220 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
1222         * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
1223         trailing slash for domain level link.
1224         * doc/xml/faq.xml: Ditto.
1225         * doc/xml/manual/appendix_free.xml (software): Ditto.
1226         * doc/xml/manual/intro.xml: Ditto.
1227         * doc/xml/manual/spine.xml: Ditto.
1228         * doc/xml/spine.xml: Ditto.
1230 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
1232         * doc/xml/manual/documentation_hacking.xml: Adjust link to
1233         docbook.org.
1235 2018-03-17  Jonathan Wakely  <jwakely@redhat.com>
1237         * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
1238         to compile as C++98.
1240 2018-03-14  Jonathan Wakely  <jwakely@redhat.com>
1242         PR libstdc++/78420
1243         * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
1244         (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
1245         to ensure total order for pointers.
1246         (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
1247         Add operator() overloads for pointer arguments and make generic
1248         overloads dispatch to new _S_cmp functions when comparisons would
1249         use built-in operators for pointers.
1250         * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
1252 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
1254         PR libstdc++/84773
1255         PR libstdc++/83662
1256         * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
1257         * configure: Regenerate.
1258         * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
1259         (aligned_alloc): Add using-declaration.
1260         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
1262 2018-03-09  François Dumont  <fdumont@gcc.gnu.org>
1264         * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
1265         Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
1266         registration.
1268 2018-03-09  Jonathan Wakely  <jwakely@redhat.com>
1270         PR libstdc++/84769
1271         * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
1272         Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
1274         src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
1275         src/filesystem/std-ops.cc (create_dir): Likewise.
1277 2018-03-08  François Dumont  <fdumont@gcc.gnu.org>
1279         * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
1280         (StdListIteratorPrinter): Inherit from latter.
1281         (StdFwdListIteratorPrinter): New, inherit from latter.
1282         (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
1283         when iterator has no associated container.
1284         (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
1285         __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
1286         registrations.
1287         * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
1288         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
1290 2018-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
1292         PR libstdc++/84601
1293         * include/std/optional (_Optional_payload): Split into multiple
1294         specializations that can handle different cases of trivial or
1295         non-trivial assignment operators.
1296         * testsuite/20_util/optional/84601.cc: New.
1297         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1299 2018-03-02  Jonathan Wakely  <jwakely@redhat.com>
1301         PR libstdc++/84671
1302         * include/bits/parse_numbers.h (_Number_help): Add partial
1303         specialization to handle digit separators. Adjust partial
1304         specialization for recursion temrination to require _Pow == 1ULL.
1305         * testsuite/20_util/duration/literals/84671.cc: New
1307 2018-02-27  Ville Voutilainen  <ville.voutilainen@gmail.com>
1309         Implement the missing bits of LWG 2769
1310         * include/std/any (any_cast(const any&)): Add static_assert.
1311         (any_cast(any&)): Likewise.
1312         (any_cast(any&&)): Likewise, and remove the handling
1313         for copyable-but-not-movable type.
1314         * testsuite/20_util/any/misc/any_cast.cc: Adjust.
1315         * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
1316         add new tests.
1318 2018-02-23  Jonathan Wakely  <jwakely@redhat.com>
1320         PR libstdc++/84532
1321         * include/std/thread (thread::__make_invoker): Construct tuple
1322         directly instead of using make_tuple.
1323         * testsuite/30_threads/async/84532.cc: New.
1324         * testsuite/30_threads/thread/84532.cc: New.
1326 2018-02-20  François Dumont  <fdumont@gcc.gnu.org>
1328         * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
1329         (template<> __aligned_buffer): Define as __aligned_membuf alias.
1331 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
1333         PR target/84148
1334         * configure: Regenerate.
1336 2018-02-15  Jonathan Wakely  <jwakely@redhat.com>
1338         PR libstdc++/81797
1339         * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
1340         * configure: Regenerate.
1341         * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
1342         defined.
1343         * include/Makefile.in: Regenerate.
1345 2018-01-29  Jonathan Wakely  <jwakely@redhat.com>
1347         PR libstdc++/83833
1348         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
1349         Add -ffloat-store to options for m68k and ia32.
1351         * doc/xml/faq.xml: Update copyright years.
1352         * doc/html/*: Regenerate.
1354         PR libstdc++/83658
1355         * include/std/any (any::__do_emplace): Only set _M_manager after
1356         constructing the contained object.
1357         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
1358         * testsuite/20_util/any/modifiers/83658.cc: New test.
1360 2018-01-25  Jonathan Wakely  <jwakely@redhat.com>
1362         PR libstdc++/81076
1363         * include/c_global/cstddef (__byte_operand): Define primary template.
1364         * testsuite/18_support/byte/81076.cc: New test.
1366 2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>
1368         * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
1369         dg-options and dg-add-options order.
1370         * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
1371         * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
1372         Likewise.
1373         * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
1374         * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
1375         Likewise.
1376         * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
1377         Likewise.
1378         * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
1379         * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
1380         Likewise.
1381         * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
1382         Likewise.
1383         * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
1384         Likewise.
1385         * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
1386         Likewise.
1387         * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
1388         Likewise.
1389         * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
1390         Likewise.
1391         * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
1392         Likewise.
1393         * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
1394         Likewise.
1395         * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
1396         * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
1397         * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
1398         * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
1399         * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
1400         * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
1401         * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
1402         * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
1403         * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
1404         Likewise.
1405         * testsuite/special_functions/19_sph_bessel/check_nan.cc:
1406         Likewise.
1407         * testsuite/special_functions/20_sph_legendre/check_nan.cc:
1408         Likewise.
1409         * testsuite/special_functions/21_sph_neumann/check_nan.cc:
1410         Likewise.
1412 2018-01-18  Uros Bizjak  <ubizjak@gmail.com>
1414         * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
1415         include linux/types.h when checking linux/random.h header.
1416         * config.h.in: Regenerate.
1417         * configure: Ditto.
1418         * src/c++11/random.cc: Conditionally include linux/types.h.
1420 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
1422         * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
1424 2018-01-16  Jonathan Wakely  <jwakely@redhat.com>
1426         PR libstdc++/83834
1427         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
1428         pattern with exact match for std::cerr.
1430 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
1432         PR libstdc++/83833
1433         * include/bits/random.h (chi_squared_distribution::param): Update
1434         gamma distribution parameter.
1435         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
1436         test.
1438         PR libstdc++/83830
1439         * include/std/type_traits (has_unique_object_representations_v): Add
1440         variable template.
1441         * testsuite/20_util/has_unique_object_representations/value.cc: Check
1442         variable template.
1444 2018-01-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
1446         Make optional conditionally
1447         trivially_{copy,move}_{constructible,assignable}
1448         * include/std/optional (_Optional_payload): Fix the comment in
1449         the class head and turn into a primary and one specialization.
1450         (_Optional_payload::_M_engaged): Strike the NSDMI.
1451         (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
1452         New.
1453         (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
1454         Likewise.
1455         (_Optional_payload<_Tp, false>::_M_get): Likewise.
1456         (_Optional_payload<_Tp, false>::_M_reset): Likewise.
1457         (_Optional_base_impl): Likewise.
1458         (_Optional_base): Turn into a primary and three specializations.
1459         (optional(nullopt)): Change the base init.
1460         * testsuite/20_util/optional/assignment/8.cc: New.
1461         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
1462         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
1464 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
1466         PR libstdc++/80276
1467         * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
1468         (get_template_arg_list): New.
1469         (StdVariantPrinter._template_args): Remove, use get_template_arg_list
1470         instead.
1471         (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
1472         of strings and regular expressions.
1473         (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
1474         (FilteringTypePrinter): Add docstring. Match using startswith. Use
1475         strip_inline_namespaces instead of strip_versioned_namespace.
1476         (add_one_type_printer): Prepend namespace to match argument.
1477         (register_type_printers): Add type printers for char16_t and char32_t
1478         string types and for types using cxx11 ABI. Update calls to
1479         add_one_template_type_printer to provide default argument dicts.
1480         * testsuite/libstdc++-prettyprinters/80276.cc: New test.
1481         * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
1482         basic_string<unsigned char> and basic_string<signed char>.
1483         * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
1484         to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
1486 2018-01-14  Andreas Schwab  <schwab@linux-m68k.org>
1488         PR libstdc++/81092
1489         * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
1491 2018-01-13  Tim Shen  <timshen@google.com>
1493         PR libstdc++/83601
1494         * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
1495         * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
1496         * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
1498 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1500         PR libstdc++/64054
1501         * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
1502         Remove dg-xfail-run-if.
1504 2018-01-10  François Dumont  <fdumont@gcc.gnu.org>
1506         * include/bits/forward_list.h
1507         (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
1508         (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
1509         (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
1510         (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
1511         (_Fwd_list_impl()): Add noexcept qualification.
1512         (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
1513         (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
1514         (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
1515         (_Fwd_list_base()): Default.
1516         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
1517         (_Fwd_list_base(_Fwd_list_base&&)): Default.
1518         (forward_list<>()): Default.
1519         (forward_list<>(forward_list&&)): Default.
1520         (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
1521         (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
1522         (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
1523         * include/bits/forward_list.tcc
1524         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
1525         _M_impl._M_head move assignment.
1526         (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
1527         * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
1529 2018-01-09  Jonathan Wakely  <jwakely@redhat.com>
1531         PR libstdc++/80276
1532         * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
1533         (UniquePointerPrinter): Print correct template argument, not type of
1534         the pointer.
1535         (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
1536         a type.
1537         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
1538         array type.
1539         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
1540         weak_ptr of array types.
1542 2018-01-09  François Dumont  <fdumont@gcc.gnu.org>
1544         PR libstdc++/83709
1545         * include/bits/hashtable_policy.h
1546         (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
1547         __first != __last.
1548         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
1549         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
1550         Add false_type parameter.
1551         (_Insert_base::insert): Adapt.
1552         * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
1553         Adapt.
1554         (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
1555          Add __n_elt parameter, defaulted to 1.
1556         (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
1557         policy _M_need_rehash.
1558         (_Hashtable::_M_merge_unique): Pass target number of elements to add to
1559         produce only 1 rehash if necessary.
1560         * testsuite/23_containers/unordered_map/insert/83709.cc: New.
1561         * testsuite/23_containers/unordered_set/insert/83709.cc: New.
1563 2018-01-09  Juraj Oršulić  <juraj.orsulic@fer.hr>
1564             Jonathan Wakely  <jwakely@redhat.com>
1566         PR libstdc++/59253 (partial)
1567         * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
1568         type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
1569         (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
1570         children.
1571         * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
1572         of unique_ptr printer.
1573         * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
1574         output of shared_ptr printer.
1576 2018-01-05  Jonathan Wakely  <jwakely@redhat.com>
1578         PR libstdc++/83626
1579         * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
1580         unnecessary symlink_status call.
1581         (remove_all(const path&, error_code&)): Use filesystem::remove.
1582         * src/filesystem/std-ops.cc: Likewise.
1584         PR libstdc++/83279
1585         * src/filesystem/std-ops.cc  (do_copy_file): Use non-null offset with
1586         sendfile.
1588         PR libstdc++/83626
1589         * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
1590         report an error for ENOENT.
1591         (remove_all(const path&)): Fix type of result variable.
1592         (remove_all(const path&, error_code&)): Use non-throwing increment
1593         for directory iterator. Call POSIX remove directly to avoid redundant
1594         calls to symlink_status. Do not report errors for ENOENT.
1595         * src/filesystem/std-ops.cc: Likewise.
1596         * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
1597         overload.
1598         * testsuite/experimental/filesystem/operations/remove_all.cc:
1599         Likewise.
1601 2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
1603         PR libstdc++/83626
1604         * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
1605         redundant call to ec.clear().
1606         (remove_all(const path&, error_code&))): Do not return an error for
1607         non-existent paths.
1608         * src/filesystem/std-ops.cc: Likewise.
1609         * testsuite/27_io/filesystem/operations/remove.cc: New test.
1610         * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
1611         results for non-existent paths.
1612         * testsuite/experimental/filesystem/operations/remove.cc: New test.
1613         * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
1614         expected results for non-existent paths.
1616         * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
1617         check status_known once.
1618         * include/experimental/bits/fs_ops.h: Likewise.
1620         PR libstdc++/83607
1621         * include/std/functional (__is_byte_like): New trait.
1622         (__is_std_equal_to): Remove.
1623         (__boyer_moore_base_t): Use __is_byte_like instead of
1624         __is_std_equal_to.
1625         * include/experimental/functional (__is_std_equal_to): Remove.
1626         (__boyer_moore_base_t): Use __is_byte_like instead of
1627         __is_std_equal_to.
1628         * testsuite/20_util/function_objects/83607.cc: New test.
1630 2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
1632         Protect optional's deduction guide with the feature macro
1633         * include/std/optional: Use the feature macro.
1635 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
1637         Update copyright years.
1639 Copyright (C) 2018 Free Software Foundation, Inc.
1641 Copying and distribution of this file, with or without modification,
1642 are permitted in any medium without royalty provided the copyright
1643 notice and this notice are preserved.