* doc/gcov.texi (Invoking Gcov): Editorial changes.
[official-gcc.git] / libstdc++-v3 / ChangeLog
blobc9cd62ab03296af2c1b21477829d2be24d97bb5d
1 2018-07-20  Jonathan Wakely  <jwakely@redhat.com>
3         PR libstdc++/86595
4         * include/bits/fs_dir.h (directory_entry::refresh(error_code&)): Add
5         noexcept.
7 2018-07-20  Fangrui Song  <maskray@google.com>
9         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Use
10         _GLIBCXX_VISIBILITY(default).
12 2018-07-20  Jonathan Wakely  <jwakely@redhat.com>
14         PR libstdc++/86603
15         * include/std/version: Move __cpp_lib_list_remove_return_type macro.
17 2018-07-19  Jonathan Wakely  <jwakely@redhat.com>
19         * include/std/type_traits (__is_member_object_pointer_helper): Use
20         __not_<is_function<_Tp>>::type instead of integral_constant.
21         (__is_member_function_pointer_helper): Likewise for
22         is_function<_Tp>::type.
23         (is_compund): Likewise for __not_<is_fundamental<_Tp>>::type.
24         (__do_is_nt_destructible_impl): Use __bool_constant and reindent.
25         (is_trivially_constructible): Remove redundant use of
26         is_constructible.
27         (__is_trivially_copy_assignable_impl): Remove redundant use of
28         is_copy_assignable.
29         (__is_trivially_move_assignable_impl): Remove redundant use of
30         is_move_assignable.
31         (is_trivially_destructible): Use __bool_constant.
32         * testsuite/20_util/is_trivially_assignable/value.cc: Add some more
33         tests for scalar types.
35 2018-07-19  Glen Joseph Fernandes  <glenjofe@gmail.com>
37         * include/bits/stl_algobase.h (__copy_move_a): Used
38         __is_trivially_copyable.
39         (__copy_move_backward_a): Likewise.
40         * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
41         New test.
43 2018-07-17  Jonathan Wakely  <jwakely@redhat.com>
45         PR libstdc++/86450
46         * acinclude.m4 (GLIBCXX_CHECK_COMPILER_FEATURES): Don't define WERROR.
47         (GLIBCXX_EXPORT_FLAGS): Use -Wabi=2 instead of -Wabi.
48         * configure: Regenerate.
49         * configure.ac: Change GLIBCXX_ENABLE_WERROR default to "no".
50         * doc/Makefile.in: Regenerate.
51         * fragment.am: Set WERROR_FLAG to -Werror instead of $(WERROR).
52         * include/Makefile.in: Regenerate.
53         * libsupc++/Makefile.in: Regenerate.
54         * po/Makefile.in: Regenerate.
55         * python/Makefile.in: Regenerate.
56         * src/Makefile.in: Regenerate.
57         * src/c++11/Makefile.in: Regenerate.
58         * src/c++11/debug.cc: Use diagnostic pragmas to suppress warnings
59         from -Wabi=2 that don't affect exported symbols.
60         * src/c++98/Makefile.in: Regenerate.
61         * src/filesystem/Makefile.in: Regenerate.
62         * testsuite/Makefile.in: Regenerate.
64         * src/c++11/compatibility-thread-c++0x.cc [_GLIBCXX_SHARED]
65         (_Async_state_common::_M_join): Simplify use of std::call_once and
66         corresponding explicit instantiation.
67         (_Maybe_wrap_member_pointer, _Bind_simple, _Bind_simple_helper)
68         (__bind_simple): Remove definitions and explicit instantiation that
69         are not required by exported symbols.
71 2018-07-16  Jonathan Wakely  <jwakely@redhat.com>
73         * scripts/create_testsuite_files: Fix typo in comment.
75         PR libstdc++/86537
76         * include/bits/shared_ptr.h (less<shared_ptr<_Tp>>): Remove
77         non-standard partial specialization.
78         * include/bits/shared_ptr_base.h (_Sp_less): Remove class definition.
79         (less<__shared_ptr<_Tp, _Lp>): Remove partial specialization.
80         * testsuite/20_util/shared_ptr/comparison/86537.cc: New test.
82 2018-07-16  Andreas Krebbel  <krebbel@linux.ibm.com>
84         * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update.
85         * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update.
86         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
88 2018-07-06  François Dumont  <fdumont@gcc.gnu.org>
90         * include/debug/functions.h (__gnu_debug::__check_string): Move...
91         * include/debug/string (__gnu_debug::__check_string): ... here.
92         (_GLIBCXX_DEBUG_VERIFY_STR_COND_AT): New.
93         (__glibcxx_check_string_n_constructor): New.
94         (__gnu_debug::basic_string<>(const _CharT*, size_type, const _Alloc&)):
95         Use latter.
96         (__glibcxx_check_string_constructor): New.
97         (__gnu_debug::basic_string<>(const _CharT*, const _Alloc&)):
98         Use latter.
99         * testsuite/21_strings/basic_string/debug/1_neg.cc: New.
100         * testsuite/21_strings/basic_string/debug/2_neg.cc: New.
102 2018-07-06  Jonathan Wakely  <jwakely@redhat.com>
104         PR libstdc++/84928 use std::move in <numeric> algorithms
105         * include/bits/stl_numeric.h (_GLIBCXX_MOVE_IF_20): Define macro to
106         conditionally move, according to __cplusplus value.
107         (accumulate, inner_product, partial_sum, adjacent_difference): Use
108         _GLIBCXX_MOVE_IF_20.
109         * testsuite/26_numerics/accumulate/lwg2055.cc: New test.
110         * testsuite/26_numerics/adjacent_difference/lwg2055.cc: New test.
111         * testsuite/26_numerics/inner_product/lwg2055.cc: New test.
112         * testsuite/26_numerics/partial_sum/lwg2055.cc: New test.
114         * config/abi/pre/gnu.ver: Use wildcards to combine related patterns.
116         P0935R0 Eradicating unnecessarily explicit default constructors
117         * config/abi/pre/gnu.ver: Tighten existing patterns and export new
118         default constructor symbols.
119         * include/std/sstream (basic_stringbuf, basic_istringstream)
120         (basic_ostringstream, basic_stringstream): Remove default arguments
121         from explicit constructors taking ios_base::openmode and add separate
122         non-explicit default constructors.
123         * testsuite/27_io/basic_istringstream/cons/default.cc: New.
124         * testsuite/27_io/basic_ostringstream/cons/default.cc: New.
125         * testsuite/27_io/basic_stringstream/cons/default.cc: New.
126         * testsuite/27_io/basic_stringbuf/cons/char/default.cc: New.
127         * testsuite/27_io/basic_stringbuf/cons/wchar_t/default.cc: New.
129         * include/std/variant (__accepted_index): Use void_t.
131 2018-07-05  Jonathan Wakely  <jwakely@redhat.com>
133         PR libstdc++/85831
134         * config/abi/pre/gnu.ver: Export move constructors and move
135         assignment operators for std::logic_error and std::runtime_error.
136         * include/std/stdexcept: Use _GLIBCXX_NOTHROW instead of
137         _GLIBCXX_USE_NOEXCEPT.
138         (logic_error, runtime_error): Declare move constructors and move
139         assignment operators. When not declared already, define copy
140         constructors and copy assignment operators as explicit-defaulted.
141         (domain_error, invalid_argument, length_error, out_of_range)
142         (overflow_error, underflow_error): Define move constructors and move
143         assignment operators as explicitly-defaulted.
144         * libsupc++/exception.h (exception): Likewise.
145         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Define
146         move constructors and move assignment operators as defaulted.
147         * testsuite/19_diagnostics/stdexcept.cc: Check that constructors and
148         assignment operators are defined.
150         * testsuite/21_strings/basic_string/cons/char/deduction.cc: XFAIL for
151         COW strings.
152         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
153         Likewise.
154         * testsuite/21_strings/basic_string/requirements/
155         explicit_instantiation/debug.cc: Likewise.
157         PR libstdc++/58265
158         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
159         (basic_string::assign(basic_string&&)): Add conditional noexcept
160         depending on the allocator's is_always_equal property (LWG 2063).
161         * testsuite/21_strings/basic_string/modifiers/assign/char/
162         move_assign.cc: Check for non-throwing exception specification.
163         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
164         move_assign.cc: Likewise.
166         PR libstdc++/58265
167         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
168         [_GLIBCXX_FULLY_DYNAMIC_STRING==0] (basic_string::basic_string()):
169         Add GLIBCXX_NOEXCEPT.
170         (basic_string::operator=(basic_string&&)): Add _GLIBCXX_NOEXCEPT_IF
171         to depend on the allocator's is_always_equal property (LWG 2063).
172         (basic_string::swap(basic_string&)): Likewise.
173         * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
174         (basic_string::swap(basic_string&)): Likewise.
175         * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
176         Check is_nothrow_move_assignable.
177         * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
178         Check is_nothrow_move_assignable.
179         * testsuite/21_strings/basic_string/cons/char/
180         noexcept_move_construct.cc: Likewise.
181         * testsuite/21_strings/basic_string/cons/wchar_t/
182         noexcept_move_construct.cc: Likewise.
184 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
186         P0646R1 Improving the Return Value of Erase-Like Algorithms I
187         * include/bits/forward_list.h (__cpp_lib_list_remove_return_type):
188         Define.
189         (forward_list::__remove_return_type): Define typedef as size_type or
190         void, according to __cplusplus value.
191         (_GLIBCXX_FWDLIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
192         empty, according to __cplusplus value.
193         (forward_list::remove, forward_list::unique): Use typedef and macro
194         to change return type and add abi-tag for C++2a.
195         (forward_list::remove_if<Pred>, forward_list::unique<BinPred>): Use
196         typedef to change return type for C++2a.
197         * include/bits/forward_list.tcc (_GLIBCXX20_ONLY): Define macro.
198         (forward_list::remove, forward_list::remove_if<Pred>)
199         (forward_list::unique<BinPred>): Return number of removed elements
200         for C++2a.
201         * include/bits/list.tcc (_GLIBCXX20_ONLY): Define macro.
202         (list::remove, list::unique, list::remove_if<Predicate>)
203         (list::unique<BinaryPredicate>): Return number of removed elements
204         for C++2a.
205         * include/bits/stl_list.h (__cpp_lib_list_remove_return_type): Define.
206         (list::__remove_return_type): Define typedef as size_type or
207         void, according to __cplusplus value.
208         (_GLIBCXX_LIST_REMOVE_RETURN_TYPE_TAG): Define macro as abi-tag or
209         empty, according to __cplusplus value.
210         (list::remove, list::unique): Use typedef and macro to change return
211         type and add abi-tag for C++2a.
212         (list::remove_if<Predicate>, list::unique<BinaryPredicate>): Use
213         typedef to change return type for C++2a.
214         * include/std/version (__cpp_lib_list_remove_return_type): Define.
215         * testsuite/23_containers/forward_list/operations/
216         remove_cxx20_return.cc: New.
217         * testsuite/23_containers/forward_list/operations/
218         unique_cxx20_return.cc: New.
220         P0458R2 Checking for Existence of an Element in Associative Containers
221         * include/bits/stl_map.h (map::contains): Add for C++2a.
222         * include/bits/stl_multimap.h (multimap::contains): Likewise.
223         * include/bits/stl_multiset.h (multiset::contains): Likewise.
224         * include/bits/stl_set.h (set::contains): Likewise.
225         * include/bits/stl_tree.h (__has_is_transparent_t): Define alias.
226         (_Rb_tree::_M_find_tr, _Rb_tree::_M_count_tr)
227         (_Rb_tree::_M_lower_bound_tr, _Rb_tree::_M_upper_bound_tr)
228         (_Rb_tree::_M_equal_range_tr): Use __has_is_transparent_t.
229         * include/bits/unordered_map.h (unordered_map::contains)
230         (unordered_multimap::contains): Add for C++2a.
231         * include/bits/unordered_set.h (unordered_set::contains)
232         (unordered_multiset::contains): Likewise.
233         * testsuite/23_containers/map/operations/contains.cc: New.
234         * testsuite/23_containers/multimap/operations/contains.cc: New.
235         * testsuite/23_containers/multiset/operations/contains.cc: New.
236         * testsuite/23_containers/set/operations/contains.cc: New.
237         * testsuite/23_containers/unordered_map/operations/contains.cc: New.
238         * testsuite/23_containers/unordered_multimap/operations/contains.cc:
239         New.
240         * testsuite/23_containers/unordered_multiset/operations/contains.cc:
241         New.
242         * testsuite/23_containers/unordered_set/operations/contains.cc: New.
244 2018-07-04  François Dumont  <fdumont@gcc.gnu.org>
246         PR libstdc++/86272
247         * include/debug/string
248         (__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
249         Use __glibcxx_check_insert_range.
250         * 21_strings/basic_string/cons/char/1.cc: Adapt test to use
251         __gnu_debug::string when _GLIBCXX_DEBUG.
252         * 21_strings/basic_string/init-list.cc: Likewise.
253         * 21_strings/basic_string/modifiers/insert/char/1.cc: Likewise.
254         * 21_strings/basic_string/modifiers/insert/char/2.cc: Likewise.
255         * 21_strings/basic_string/modifiers/insert/char/83328.cc: Likewise.
256         * 21_strings/basic_string/types/1.cc: Likewise.
258 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
260         * testsuite/25_algorithms/make_heap/complexity.cc: Require effective
261         target for std::random_device.
262         * testsuite/26_numerics/random/random_device/cons/default.cc:
263         Likewise.
264         * testsuite/experimental/algorithm/sample-2.cc: Likewise.
265         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
266         * testsuite/experimental/random/randint.cc: Likewise.
267         * testsuite/lib/libstdc++.exp
268         (check_effective_target_random_device): New proc.
270 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
271             Jakub Jelinek  <jakub@redhat.com>
273         * include/std/bit (__rotl, __rotr): Fix for non-power of two sizes.
275 2018-07-04  Jonathan Wakely  <jwakely@redhat.com>
277         PR libstdc++/86398
278         * include/std/type_traits (is_trivially_constructible): Check
279         is_constructible before __is_trivially_constructible.
280         * testsuite/20_util/is_trivially_constructible/value.cc: Add more
281         tests, including negative cases.
282         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Use
283         zero for dg-error lineno.
284         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
285         Likewise.
287         * include/std/bit (__rotl, __rotr): Avoid branch.
288         (_If_is_unsigned_integer): Use remove_cv_t.
289         * testsuite/26_numerics/bit/bitops.count/popcount.cc: New.
291 2018-07-03  Jonathan Wakely  <jwakely@redhat.com>
293         P0556R3 Integral power-of-2 operations, P0553R2 Bit operations
294         * include/Makefile.am: Add new header.
295         * include/Makefile.in: Regenerate.
296         * include/precompiled/stdc++.h: Include new header.
297         * include/std/bit: New header.
298         (__rotl, __rotr, __countl_zero, __countl_one, __countr_zero)
299         (__countr_one, __popcount, __ispow2, __ceil2, __floor2, __log2p1):
300         Define for C++14.
301         [!__STRICT_ANSI__] (rotl, rotr, countl_zero, countl_one, countr_zero)
302         (countr_one, popcount): Define for C++2a. Also overload for std::byte.
303         (ispow2, ceil2, floor2, log2p1): Define for C++2a.
304         [!__STRICT_ANSI__] (ispow2, ceil2, floor2, log2p1): Overload for
305         std::byte.
306         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: New.
307         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: New.
308         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: New.
309         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: New.
310         * testsuite/26_numerics/bit/bitops.rot/rotl.cc: New.
311         * testsuite/26_numerics/bit/bitops.rot/rotr.cc: New.
312         * testsuite/26_numerics/bit/bitops.count/countl_one.cc: New.
313         * testsuite/26_numerics/bit/bitops.count/countl_zero.cc: New.
314         * testsuite/26_numerics/bit/bitops.count/countr_one.cc: New.
315         * testsuite/26_numerics/bit/bitops.count/countr_zero.cc: New.
317         * include/bits/alloc_traits.h: Remove redundant preprocessor
318         condition.
320 2018-07-03  François Dumont  <fdumont@gcc.gnu.org>
322         * include/bits/stl_algobase.h (__niter_wrap): New.
323         (__copy_move_a2(_II, _II, _OI)): Use latter.
324         (__copy_move_backward_a2(_BI1, _BI1, _BI2)): Likewise.
325         (fill_n(_OI, _Size, const _Tp&)): Likewise.
326         (equal(_II1, _II1, _II2)): Use __glibcxx_requires_can_increment.
327         * include/debug/stl_iterator.h
328         (std::__niter_base(const __gnu_cxx::_Safe_iterator<
329         __gnu_cxx::__normal_iterator<>, _Sequence>&)): New declaration.
330         * include/debug/vector (__niter_base(const __gnu_cxx::_Safe_iterator<
331         __gnu_cxx::__normal_iterator<>, _Sequence>&)): New.
333 2018-07-02  Jonathan Wakely  <jwakely@redhat.com>
335         P0758R1 Implicit conversion traits
336         * include/std/type_traits [__cplusplus > 201703]
337         (__is_convertible_helper::__is_nothrow_type): Define new member.
338         (__is_convertible_helper<_From, _To, false>::__test_aux1): Add
339         noexcept.
340         (__is_convertible_helper<_From, _To, false>::__test_nothrow)
341         (__is_convertible_helper<_From, _To, false>::__is_nothrow_type): Add
342         new members.
343         (is_nothrow_convertible, is_nothrow_convertible_v): Define for C++2a.
344         * testsuite/20_util/is_nothrow_convertible/value.cc: New.
345         * testsuite/20_util/is_nothrow_convertible/requirements/
346         explicit_instantiation.cc: New.
347         * testsuite/20_util/is_nothrow_convertible/requirements/typedefs.cc:
348         New.
350         P0887R1 The identity metafunction
351         * include/std/type_traits (type_identity, type_identity_t): Define
352         for C++2a.
353         * testsuite/20_util/type_identity/requirements/alias_decl.cc: New.
354         * testsuite/20_util/type_identity/requirements/
355         explicit_instantiation.cc:New.
356         * testsuite/20_util/type_identity/requirements/typedefs.cc: New.
358         * include/bits/regex.h (sub_match::operator string_type): Call str().
359         (sub_match::compare): Use _M_str() instead of str().
360         (sub_match::_M_compare): New public function.
361         (sub_match::__string_view): New helper type.
362         (sub_match::_M_str): New overloaded functions to avoid creating a
363         string_type object when not needed.
364         (operator==, operator!=, operator<, operator>, operator<=, operator>=):
365         Use sub_match::_M_compare instead of creating string_type objects.
366         Fix Doxygen comments.
367         * include/bits/regex_compiler.h (__has_contiguous_iter): Remove.
368         (__is_contiguous_normal_iter): Rename to __is_contiguous_iter and
369         simplify.
370         (__enable_if_contiguous_iter, __disable_if_contiguous_iter): Use
371         __enable_if_t.
372         * include/std/type_traits (__enable_if_t): Define for C++11.
373         * testsuite/28_regex/sub_match/compare.cc: New.
374         * testsuite/util/testsuite_iterators.h (remove_cv): Add transformation
375         trait.
376         (input_iterator_wrapper): Use remove_cv for value_type argument of
377         std::iterator base class.
379 2018-06-29  Jonathan Wakely  <jwakely@redhat.com>
381         * testsuite/20_util/add_rvalue_reference/requirements/alias_decl.cc:
382         Add whitespace to dejagnu directive.
383         * testsuite/23_containers/array/element_access/at_neg.cc: Likewise.
385 2018-06-27  François Dumont  <fdumont@gcc.gnu.org>
387         * include/bits/stl_vector.h
388         (struct _Vector_base<>::_Vector_impl_data): New.
389         (struct _Vector_base<>::_Vector_impl): Inherit from latter.
390         (_Vector_base<>::_Vector_impl::_M_swap_data): Move...
391         (_Vector_base<>::_Vector_impl_data::_M_swap_data): ...here.
392         (_Vector_base<>::_Vector_impl()): Add noexcept qualification.
393         (_Vector_base<>::_Vector_impl(_Vector_impl&&)): New.
394         (_Vector_base<>::_Vector_impl(_Tp_alloc_type&&, _Vector_impl&&)): New.
395         (_Vector_base(const allocator_type&, _Vector_base&&)): New, use latter.
396         (_Vector_base()): Default.
397         (_Vector_base(_Vector_base&&)): Default.
398         (_Vector_base(size_t)) [_GLIBCXX_INLINE_VERSION]: Delete.
399         (_Vector_base(_Tp_alloc_type&&)) [_GLIBCXX_INLINE_VERSION]: Delete.
400         (_Vector_base::_M_create_storage(size_t)): Make protected.
401         (vector()): Default.
402         (vector(vector&&)): Default.
403         (vector(vector&&, const allocator_type&, true_type)): New.
404         (vector(vector&&, const allocator_type&, false_type)): New.
405         (vector(vector&&, const allocator_type&)): Use latters.
406         (vector(_InputIte, _InputIte, const allocator_type&)): Call
407         _M_range_initialize directly.
408         * include/debug/vector
409         (vector(vector&&, const allocator_type&)): Add noexcept qualification.
410         * testsuite/23_containers/vector/allocator/default_init.cc: New.
411         * testsuite/23_containers/vector/cons/noexcept_move_construct.cc: Add
412         static assertions.
414 2018-06-27  Jonathan Wakely  <jwakely@redhat.com>
416         * include/bits/cpp_type_traits.h [__cplusplus >= 201703]
417         (__is_byte<byte>): Define specialization for std::byte.
419         PR libstdc++/86138
420         * include/bits/basic_string.tcc: [_GLIBCXX_EXTERN_TEMPLATE < 0]
421         Declare explicit instantiations of COW empty reps and I/O functions.
423 2018-06-26  David Edelsohn  <dje.gcc@gmail.com>
425         * testsuite/experimental/algorithm/sample-2.cc: Add TLS DejaGNU
426         directives.
427         * testsuite/experimental/algorithm/shuffle.cc: Likewise.
429 2018-06-26  Jonathan Wakely  <jwakely@redhat.com>
431         * include/bits/regex.tcc (regex_iterator::operator==): Add missing
432         noexcept.
434 2018-06-25  Jonathan Wakely  <jwakely@redhat.com>
436         PR libstdc++/86112
437         * python/libstdcxx/v6/printers.py (add_one_template_type_printer):
438         Replace dict comprehension.
440         PR libstdc++/81092
441         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
443         PR libstdc++/86292
444         * include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
445         Add try-catch block.
446         * testsuite/23_containers/vector/cons/86292.cc: New.
448         * doc/xml/manual/status_cxx2017.xml: Document N4531 status.
450         * include/experimental/algorithm (sample, shuffle): Add new overloads
451         using per-thread random number engine.
452         * testsuite/experimental/algorithm/sample.cc: Simpify and reduce
453         dependencies by using __gnu_test::test_container.
454         * testsuite/experimental/algorithm/sample-2.cc: New.
455         * testsuite/experimental/algorithm/shuffle.cc: New.
457 2018-06-22  Jonathan Wakely  <jwakely@redhat.com>
459         * config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
460         different size_t mangling on 32-bit targets.
462         PR libstdc++/86280
463         * include/experimental/memory_resource
464         (__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
465         enough for result of left shift.
467         PR libstdc++/86138
468         * include/bits/basic_string.tcc:
469         [__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
470         (basic_string<char>::_Rep::_S_empty_rep_storage)
471         (basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
472         instantiation declarations.
473         [__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
474         explicit instantiation declarations.
475         * testsuite/21_strings/basic_string/cons/char/86138.cc: New.
476         * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.
478 2018-06-21  Jonathan Wakely  <jwakely@redhat.com>
480         PR libstdc++/83328
481         * acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
482         * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
483         * configure: Regenerate.
484         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
485         (basic_string::insert(const_iterator, initializer_list<C>)): Add.
486         [_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
487         (basic_string::insert(iterator, initializer_list<C>)): Suppress
488         definition.
489         * include/debug/string (basic_string::insert(iterator, C)): Change
490         first parameter to const_iterator.
491         (basic_string::insert(iterator, size_type, C)): Likewise. Change
492         return type to iterator.
493         (basic_string::insert(iterator, InputIterator, InputIterator)):
494         Likewise.
495         (basic_string::insert(iterator, initializer_list<C>)): Change first
496         parameter to const_iterator and return type to iterator.
497         * src/c++11/string-inst.cc: Extend comment.
498         * testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
499         New.
500         * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
501         New.
502         * testsuite/util/testsuite_abi.cc: Add new symbol version.
504         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
506         PR libstdc++/70940
507         * include/experimental/memory_resource
508         (__resource_adaptor_imp::do_deallocate): Add missing return.
509         * testsuite/experimental/memory_resource/new_delete_resource.cc: New.
510         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
511         resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
512         __gnu_cxx::malloc_allocator.
514         PR libstdc++/70940
515         * include/experimental/memory_resource (__resource_adaptor_common):
516         New base class.
517         (__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
518         pointer from unaligned, and vice versa.
519         (__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
520         allocated pointer to meet alignment request.
521         (__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
522         original pointer for deallocation.
523         (__resource_adaptor_imp::do_is_equal): Reformat.
524         (__resource_adaptor_imp::_S_aligned_size): Remove.
525         (__resource_adaptor_imp::_S_supported): Remove.
526         (new_delete_resource): Use __gnu_cxx::new_allocator.
527         * testsuite/experimental/memory_resource/resource_adaptor.cc: Test
528         extended alignments and use debug_allocator to check for matching
529         allocate/deallocate pairs.
531 2018-06-21  François Dumont  <fdumont@gcc.gnu.org>
533         * include/debug/safe_iterator.h
534         (_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
535         Compare __x base iterator with a value-initialized iterator of the
536         same type.
538 2018-06-20  Jonathan Wakely  <jwakely@redhat.com>
540         PR libstdc++/70966
541         * include/experimental/memory_resource (__resource_adaptor_imp): Add
542         static assertions to enforce requirements on pointer types.
543         (__resource_adaptor_imp::get_allocator()): Add noexcept.
544         (new_delete_resource, null_memory_resource): Return address of an
545         object with dynamic storage duration.
546         (__null_memory_resource): Remove.
547         * testsuite/experimental/memory_resource/70966.cc: New.
549         * testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
550         missed from recent commit.
552 2018-06-19  Jonathan Wakely  <jwakely@redhat.com>
554         * include/std/utility: Remove unused <exception> header.
556 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
558         LWG 2975 ensure construct(pair<T,U>*, ...) used to construct pairs
559         * include/std/scoped_allocator (__not_pair): Define SFINAE helper.
560         (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is
561         a specialization of std::pair.
562         * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure
563         pair elements are constructed correctly.
565         LWG 2989 hide path iostream operators from normal lookup
566         * include/bits/fs_path.h (operator<<, operator>>): Define inline as
567         friends.
568         * testsuite/27_io/filesystem/path/io/dr2989.cc: New.
570         LWG 3050 Fix cv-qualification of convertibility constraints
571         * include/std/chrono (duration, operator*, operator/, operator%): Use
572         const-qualified type as source type in is_convertible constraints.
573         * testsuite/20_util/duration/arithmetic/dr3050.cc: New.
574         * testsuite/20_util/duration/cons/dr3050.cc: New.
575         * testsuite/20_util/duration/literals/range.cc: Rename to...
576         * testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
577         dg-error lineno.
579 2018-06-18  Maya Rashish  <coypu@sdf.org>
581         * crossconfig.m4: Handle OpenBSD just like NetBSD.
582         * configure: Rebuilt.
584 2018-06-18  Jonathan Wakely  <jwakely@redhat.com>
586         P0754R2 <version> header
587         * include/Makefile.am: Add new header.
588         * include/Makefile.in: Regenerate.
589         * include/bits/c++config: Change doxygen comment to suggest <version>
590         instead of <iosfwd>.
591         * include/precompiled/stdc++.h: Include <cwchar> and <cwctype>
592         unconditionally.  Add C++17 and C++20 headers.
593         * include/std/version: New header.
594         * testsuite/17_intro/headers/c++2017/all_attributes.cc: New.
595         * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc: New.
596         * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: New.
597         * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc: New.
598         * testsuite/17_intro/headers/c++2017/operator_names.cc: New.
599         * testsuite/17_intro/headers/c++2017/stdc++.cc: New.
600         * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
601         New.
602         * testsuite/17_intro/headers/c++2020/all_attributes.cc: New.
603         * testsuite/17_intro/headers/c++2020/all_no_exceptions.cc: New.
604         * testsuite/17_intro/headers/c++2020/all_no_rtti.cc: New.
605         * testsuite/17_intro/headers/c++2020/all_pedantic_errors.cc: New.
606         * testsuite/17_intro/headers/c++2020/operator_names.cc: New.
607         * testsuite/17_intro/headers/c++2020/stdc++.cc: New.
608         * testsuite/17_intro/headers/c++2020/stdc++_multiple_inclusion.cc:
609         New.
610         * testsuite/18_support/headers/version/macros.cc: New.
611         * testsuite/18_support/headers/version/macros.cc: New.
613         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Only check when
614         enable_libstdcxx_filesystem_ts = yes. Check for link, readlink and
615         symlink.
616         * config.h.in: Regenerate.
617         * configure: Regenerate.
618         * configure.ac: Remove AC_CHECK_FUNCS for link, readlink and symlink.
620         LWG 3035. std::allocator's constructors should be constexpr
621         * include/bits/allocator.h (allocator): Add constexpr to constructors
622         for C++2a. Replace dynamic exception specifications with NOTHROW
623         macro.
624         (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with
625         NOTHROW.
626         * include/bits/c++config (_GLIBCXX20_CONSTEXPR): Define.
627         * include/ext/malloc_allocator.h (malloc_allocator): Add constexpr
628         to constructors for C++2a.
629         * include/ext/new_allocator.h (new_allocator): Likewise.
631 2018-06-16  Jonathan Wakely  <jwakely@redhat.com>
633         LWG 3076 basic_string CTAD ambiguity
634         * doc/xml/manual/intro.xml: Document LWG 3076 change.
635         * include/bits/basic_string.h
636         [__cpp_deduction_guides && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
637         (basic_string(const _CharT*, const _Alloc&)): Turn into a function
638         template constrained by _RequireAllocator.
639         (basic_string(size_type, _CharT, const _Alloc&)): Likewise.
640         * src/c++11/string-inst.cc (_GLIBCXX_DEFINING_STRING_INSTANTIATIONS):
641         Define.
642         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
643         deduction
644         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
645         Likewise.
647 2018-06-15  Jonathan Wakely  <jwakely@redhat.com>
649         PR libstdc++/86169
650         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
651         (basic_string::data()): Unshare string.
652         * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
653         New.
655         * include/std/string_view (basic_string_view(const CharT*)): Remove
656         check for null pointer and add nonnull attribute.
657         (compare(const CharT*), compare(size_type, size_type, const CharT*))
658         (find(const CharT*, size_type), rfind(const CharT*, size_type))
659         (find_first_of(const CharT*, size_type))
660         (find_last_of(const CharT*, size_type))
661         (find_first_not_of(const CharT*, size_type))
662         (find_last_not_of(const CharT*, size_type)): Add nonnull attribute.
663         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: New.
664         * testsuite/21_strings/basic_string_view/operations/compare/char/
665         nonnull.cc: New.
666         * testsuite/21_strings/basic_string_view/operations/find/char/
667         nonnull.cc: New.
668         * testsuite/21_strings/basic_string_view/operations/rfind/char/
669         nonnull.cc: New.
671         PR libstdc++/86168
672         * include/bits/random.h (random_device(const string&)): Remove
673         default argument.
675         * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Only
676         define for C++17 and above.
678         LWG 2993 reference_wrapper<T> conversion from T&&
679         * doc/xml/manual/intro.xml: Document LWG 2993 change.
680         * include/bits/refwrap.h (reference_wrapper(_Tp&)): Remove.
681         (reference_wrapper(_Tp&&)): Remove.
682         (reference_wrapper<_Up>(_Up&&)): Define new constructor as constrained
683         template.
684         (reference_wrapper): Add deduction guide.
685         * testsuite/20_util/reference_wrapper/deduction.cc: New.
686         * testsuite/20_util/reference_wrapper/lwg2993.cc: New.
688         LWG 3039 Unnecessary decay in thread and packaged_task
689         * include/std/future (__constrain_pkgdtask): Replace with ...
690         (packaged_task::__not_same): New alias template, using
691         __remove_cvref_t instead of decay.
692         * include/std/thread (thread::__not_same): Add comment.
694 2018-06-14  Jonathan Wakely  <jwakely@redhat.com>
696         LWG 3075 basic_string needs deduction guides from basic_string_view
697         * testsuite/21_strings/basic_string/cons/char/deduction.cc: Test
698         deduction from string views.
699         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
700         Likewise.
702         LWG 3074 make scalar types non-deduced in valarray non-member functions
703         * include/bits/valarray_after.h (_DEFINE_EXPR_BINARY_FUNCTION): Change
704         scalar parameters to be a non-deduced context.
705         * include/std/valarray (_DEFINE_BINARY_OPERATOR): Likewise. Adjust
706         whitespace.
707         * testsuite/26_numerics/valarray/operators.cc: Test scalar operands.
708         * testsuite/26_numerics/valarray/transcend.cc: New.
710         * include/std/tuple (__cpp_lib_tuple_element_t, tuple_element_t):
711         Move back to <utility>.
712         * include/std/utility (__cpp_lib_tuple_element_t. tuple_element_t):
713         Restore to here.
715         P0935R0 Eradicating unnecessarily explicit default constructors
716         * include/backward/strstream (strstreambuf): Add non-explicit default
717         constructor.
718         * include/bits/locale_conv.h (wbuffer_convert, wstring_convert):
719         Likewise.
720         * include/bits/regex.h (match_results): Likewise.
721         * testsuite/22_locale/conversions/buffer/1.cc: Test for non-explicit
722         default constructor.
723         * testsuite/22_locale/conversions/string/1.cc: Likewise.
724         * testsuite/28_regex/match_results/ctors/char/default.cc: Likewise.
725         * testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
727         * include/std/tuple (__cpp_lib_tuple_element_t): Move feature test
728         macro from <utility> and change type to long.
729         * include/std/utility (__cpp_lib_tuple_element_t): Remove.
730         * testsuite/20_util/tuple/tuple_element_t.cc: Check for feature test
731         macro.
733         P0935R0 Eradicating unnecessarily explicit default constructors
734         * include/bits/random.h (uniform_real_distribution::param_type)
735         (normal_distribution::param_type, lognormal_distribution::param_type)
736         (gamma_distribution::param_type, chi_squared_distribution::param_type)
737         (cauchy_distribution::param_type, fisher_f_distribution::param_type)
738         (student_t_distribution::param_type)
739         (bernoulli_distribution::param_type)
740         (binomial_distribution::param_type)
741         (geometric_distribution::param_type)
742         (negative_binomial_distribution::param_type)
743         (poisson_distribution::param_type)
744         (exponential_distribution::param_type)
745         (weibull_distribution::param_type)
746         (extreme_value_distribution::param_type): Add non-explicit default
747         constructors. Remove default argument for first parameter of explicit
748         constructors.
749         * include/bits/uniform_int_dist.h
750         (uniform_int_distribution::param_type): Likewise.
751         * include/ext/random
752         (beta_distribution::param_type, rice_distribution::param_type)
753         (nakagami_distribution::param_type, pareto_distribution::param_type)
754         (k_distribution::param_type, arcsine_distribution::param_type)
755         (hoyt_distribution::param_type, triangular_distribution::param_type)
756         (von_mises_distribution::param_type)
757         (hypergeometric_distribution::param_type)
758         (logistic_distribution::param_type)
759         (uniform_inside_sphere_distribution::param_type): Likewise.
760         (uniform_on_sphere_distribution::param_type): Make default constructor
761         non-explicit.
762         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
763         Test param_type for non-explicit default constructor.
764         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
765         Likewise.
766         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
767         Likewise.
768         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
769         Likewise.
770         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
771         Likewise.
772         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
773         Likewise.
774         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
775         Likewise.
776         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
777         Likewise.
778         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
779         Likewise.
780         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
781         Likewise.
782         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
783         Likewise.
784         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
785         Likewise.
786         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
787         Likewise.
788         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
789         Likewise.
790         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
791         Likewise.
792         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
793         Likewise.
794         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
795         Likewise.
796         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
797         Likewise.
798         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
799         Likewise.
800         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
801         Likewise.
802         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
803         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
804         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
805         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
806         Likewise.
807         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
808         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
809         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
810         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
811         Likewise.
812         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
813         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
814         * testsuite/ext/random/triangular_distribution/cons/default.cc:
815         Likewise.
816         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
817         Likewise.
818         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
819         Likewise.
820         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
821         Likewise.
823 2018-06-14  Daniel Trebbien <dtrebbien@gmail.com>
824             Jonathan Wakely  <jwakely@redhat.com>
826         PR libstdc++/83982
827         * include/bits/vector.tcc (vector::_M_default_append(size_type)):
828         Default-construct new elements before moving existing ones.
829         * testsuite/23_containers/vector/capacity/resize/strong_guarantee.cc:
830         New.
832 2018-06-13  Jonathan Wakely  <jwakely@redhat.com>
834         PR libstdc++/86127
835         * include/bits/forward_list.h (_Fwd_list_base::_Tp_alloc_type): Remove
836         unused typedef.
837         (_Fwd_list_base::_M_create_node, _Fwd_list_base::_M_erase_after):
838         Use node allocator to create and destroy elements.
839         (forward_list::_Tp_alloc_type): Remove unused typedef.
840         (forward_list::_Alloc_traits): Use allocator_traits instead of
841         __gnu_cxx::__alloc_traits.
843 2018-06-13  François Dumont  <fdumont@gcc.gnu.org>
845         * include/debug/helper_functions.h
846         (__gnu_debug::_Safe_iterator<>): Add declaration.
847         (__can_advance(_Ite, _Size)): New.
848         (__can_advance(const _Safe_iterator<>&, _Size)): Overload declaration.
849         * include/debug/functions.h
850         (__gnu_debug::_Safe_iterator<>): Remove declaration.
851         * include/debug/stl_iterator.h
852         (__can_advance(const _Safe_iterator<>&)): New definition.
853         * include/debug/stl_iterator.h
854         (__can_advance(const std::reverse_iterator<>&, _Size)): New.
855         (__can_advance(const std::move_iterator<>&, _Size)): New.
856         * include/debug/macros.h (__glibcxx_check_can_increment): New.
857         * include/debug/debug.h (__glibcxx_requires_can_increment): New.
858         * include/bits/stl_algobase.h (fill_n): Use latter.
859         * testsuite/25_algorithms/fill_n/2.cc: New.
860         * testsuite/25_algorithms/fill_n/debug/1_neg.cc: New.
861         * testsuite/25_algorithms/fill_n/debug/2_neg.cc: New.
862         * testsuite/25_algorithms/fill_n/debug/3_neg.cc: New.
863         * testsuite/25_algorithms/fill_n/debug/4_neg.cc: New.
865         * include/debug/debug.h (__glibcxx_requires_can_increment_range): New.
866         (__glibcxx_requires_can_decrement_range): New.
868 2018-06-12  François Dumont  <fdumont@gcc.gnu.org>
870         * include/debug/macros.h (__glibcxx_check_can_increment_range): New.
871         (__glibcxx_check_can_decrement_range): New.
872         * include/bits/stl_algobase.h (std::copy(_II, _II, _OI)): Use
873         __glibcxx_requires_can_increment_range.
874         (std::move(_II, _II, _OI)): Likewise.
875         (std::copy_backward(_BI, _BI, _BI2)): Use
876         __glibcxx_requires_can_decrement_range.
877         (std::move_backward(_BI, _BI, _BI2)): Likewise.
878         * testsuite/25_algorithms/copy_backward/debug/1_neg.cc: New.
879         * testsuite/25_algorithms/copy_backward/debug/2_neg.cc: New.
880         * testsuite/25_algorithms/copy_backward/debug/3_neg.cc: New.
881         * testsuite/25_algorithms/equal/debug/1_neg.cc: New.
882         * testsuite/25_algorithms/equal/debug/2_neg.cc: New.
883         * testsuite/25_algorithms/equal/debug/3_neg.cc: New.
885 2018-06-12  Jonathan Wakely  <jwakely@redhat.com>
887         P0935R0 Eradicating unnecessarily explicit default constructors
888         * include/bits/random.h (linear_congruential_engine)
889         (mersenne_twister_engine, subtract_with_carry_engine, random_device)
890         (uniform_real_distribution, normal_distribution)
891         (lognormal_distribution, gamma_distribution, chi_squared_distribution)
892         (cauchy_distribution, fisher_f_distribution, student_t_distribution)
893         (bernoulli_distribution, binomial_distribution,geometric_distribution)
894         (negative_binomial_distribution, exponential_distribution)
895         (weibull_distribution, extreme_value_distribution): Add non-explicit
896         default constructors. Remove default argument for first parameter of
897         explicit constructors.
898         (piecewise_constant_distribution, piecewise_linear_distribution):
899         Make default constructor non-explicit.
900         * include/bits/uniform_int_dist.h (uniform_int_distribution): Add
901         non-explicit default constructors. Remove default argument for first
902         parameter of explicit constructor.
903         * include/ext/random
904         (simd_fast_mersenne_twister_engine, beta_distribution)
905         (rice_distribution, nakagami_distribution, pareto_distribution)
906         (k_distribution, arcsine_distribution, hoyt_distribution)
907         (triangular_distribution, von_mises_distribution)
908         (hypergeometric_distribution, logistic_distribution)
909         (uniform_inside_sphere_distribution): Likewise.
910         (uniform_on_sphere_distribution): Make default constructor
911         non-explicit.
912         * testsuite/26_numerics/random/bernoulli_distribution/cons/default.cc:
913         Test for non-explicit default constructor. Fix references to standard.
914         * testsuite/26_numerics/random/binomial_distribution/cons/default.cc:
915         Likewise.
916         * testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
917         Likewise.
918         * testsuite/26_numerics/random/chi_squared_distribution/cons/default.cc:
919         Likewise.
920         * testsuite/26_numerics/random/discrete_distribution/cons/default.cc:
921         Likewise.
922         * testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
923         Likewise.
924         * testsuite/26_numerics/random/extreme_value_distribution/cons/default.cc:
925         Likewise.
926         * testsuite/26_numerics/random/fisher_f_distribution/cons/default.cc:
927         Likewise.
928         * testsuite/26_numerics/random/gamma_distribution/cons/default.cc:
929         Likewise.
930         * testsuite/26_numerics/random/geometric_distribution/cons/default.cc:
931         Likewise.
932         * testsuite/26_numerics/random/lognormal_distribution/cons/default.cc:
933         Likewise.
934         * testsuite/26_numerics/random/negative_binomial_distribution/cons/default.cc:
935         Likewise.
936         * testsuite/26_numerics/random/normal_distribution/cons/default.cc:
937         Likewise.
938         * testsuite/26_numerics/random/piecewise_constant_distribution/cons/default.cc:
939         Likewise.
940         * testsuite/26_numerics/random/piecewise_linear_distribution/cons/default.cc:
941         Likewise.
942         * testsuite/26_numerics/random/poisson_distribution/cons/default.cc:
943         Likewise.
944         * testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
945         Likewise.
946         * testsuite/26_numerics/random/uniform_int_distribution/cons/default.cc:
947         Likewise.
948         * testsuite/26_numerics/random/uniform_real_distribution/cons/default.cc:
949         Likewise.
950         * testsuite/26_numerics/random/weibull_distribution/cons/default.cc:
951         Likewise.
952         * testsuite/ext/random/arcsine_distribution/cons/default.cc: Likewise.
953         * testsuite/ext/random/beta_distribution/cons/default.cc: Likewise.
954         * testsuite/ext/random/hoyt_distribution/cons/default.cc: Likewise.
955         * testsuite/ext/random/hypergeometric_distribution/cons/default.cc:
956         Likewise.
957         * testsuite/ext/random/k_distribution/cons/default.cc: Likewise.
958         * testsuite/ext/random/logistic_distribution/cons/default.cc: Likewise.
959         * testsuite/ext/random/nakagami_distribution/cons/default.cc: Likewise.
960         * testsuite/ext/random/normal_mv_distribution/cons/default.cc:
961         Likewise.
962         * testsuite/ext/random/pareto_distribution/cons/default.cc: Likewise.
963         * testsuite/ext/random/rice_distribution/cons/default.cc: Likewise.
964         * testsuite/ext/random/triangular_distribution/cons/default.cc:
965         Likewise.
966         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/default.cc:
967         Likewise.
968         * testsuite/ext/random/uniform_on_sphere_distribution/cons/default.cc:
969         Likewise.
970         * testsuite/ext/random/von_mises_distribution/cons/default.cc:
971         Likewise.
972         * testsuite/util/testsuite_common_types.h
973         (implicitly_default_constructible): New helper.
975 2018-06-08  Jonathan Wakely  <jwakely@redhat.com>
977         * include/bits/ios_base.h (ios::Init::Init(const Init&))
978         (ios::Init::operator=): Define as defaulted.
979         * include/bits/stl_bvector.h (_Bit_reference(const _Bit_reference&)):
980         Likewise.
981         * include/bits/stream_iterator.h (istream_iterator::operator=)
982         (ostream_iterator::operator=): Likewise.
983         * include/bits/streambuf_iterator.h (istreambuf_iterator::operator=)
984         Likewise.
985         * include/std/bitset (bitset::reference::reference(const reference&)):
986         Likewise.
987         * include/std/complex (complex<float>::complex(const complex&))
988         (complex<double>::complex(const complex&))
989         (complex<long double>::complex(const complex&)): Likewise.
991 2018-06-07  Jonathan Wakely  <jwakely@redhat.com>
993         * include/bits/regex.h (sub_match): Add noexcept to default
994         constructor and length observer.
995         (match_results): Add noexcept to default constructor and observers
996         with no preconditions. Define destructor as defaulted.
997         (operator==, operator!=, swap): Add noexcept.
998         (regex_iterator): Add default member initializers and define default
999         constructor and destructor as defaulted. Add noexcept to equality
1000         and dereference operators.
1002 2018-06-07  François Dumont  <fdumont@gcc.gnu.org>
1004         * src/c++11/debug.cc
1005         (_Safe_iterator_base::_M_detach()): Reset state only if needed.
1006         (_Safe_iterator_base::_M_detach_single()): Likewise.
1007         (_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
1008         (_Safe_local_iterator_base::_M_detach_single()): Likewise.
1010 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
1012         * include/bits/shared_ptr_base.h (__shared_count): Remove redundant
1013         move of const value.
1015 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
1017         PR c++/86068
1018         * include/bits/c++config: Check __cpp_transactional_memory >= 201500L
1019         rather than __cpp_transactional_memory >= 201505L.
1021 2018-06-06  Jonathan Wakely  <jwakely@redhat.com>
1023         PR libstdc++/86008
1024         * include/bits/quoted_string.h (_Quoted_string<basic_string_view, C>):
1025         Define new partial specialization.
1026         * include/std/iomanip (quoted(basic_string_view<C,T>, C, C)): Define
1027         new overload.
1028         (operator<<(basic_ostream<C,T>&, const _Quoted_string<S,C>&)): Use
1029         value not reference for iteration.
1030         * testsuite/27_io/manipulators/standard/char/quoted.cc: Adjust
1031         comment.
1032         * testsuite/27_io/manipulators/standard/char/quoted_sv.cc: New test.
1033         * testsuite/27_io/manipulators/standard/wchar_t/quoted.cc: Adjust
1034         comment.
1036 2018-06-05  Jonathan Wakely  <jwakely@redhat.com>
1038         * include/std/type_traits: Fix comment typos.
1040         * testsuite/27_io/filesystem/operations/read_symlink.cc: XFAIL for
1041         mingw* targets.
1042         * testsuite/27_io/filesystem/operations/symlink_status.cc: Likewise.
1043         * testsuite/experimental/filesystem/operations/read_symlink.cc:
1044         Likewise.
1046 2018-06-05  François Dumont  <fdumont@gcc.gnu.org>
1048         * include/bits/stl_tempbuf.h
1049         (_Temporary_buffer(_FwdIte, _FwdIte)): Delete, replaced by...
1050         (_Temporary_buffer(_FwdIte, size_type)): ...this, new.
1051         * include/ext/memory (temporary_buffer<>(_FwdIte, _FwdIte)): Adapt.
1052         * include/bits/stl_algo.h (__stable_partition): Adapt.
1053         (__inplace_merge): Adapt.
1054         (__stable_sort): Adapt.
1056 2018-06-04  Jonathan Wakely  <jwakely@redhat.com>
1058         PR libstdc++/85930
1059         * include/bits/shared_ptr_base.h [!__cpp_rtti]: Include <typeinfo>
1060         unconditionally. Remove redundant declaration.
1061         [!__cpp_rtti] (_Sp_make_shared_tag::_S_ti): Fix location of
1062         alignment-specifier.
1064         * include/bits/postypes.h (fpos): Define special members as defaulted.
1066         PR libstdc++/85930
1067         * include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Align
1068         the static variable correctly.
1070 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
1072         PR libstdc++/78870 support std::filesystem on Windows
1073         * config.h.in: Regenerate.
1074         * configure: Regenerate.
1075         * configure.ac: Check for link, readlink and symlink.
1076         * include/bits/fs_path.h (path::operator/=(const path&)): Move
1077         definition out of class body.
1078         (path::is_absolute(), path::_M_append(path)): Likewise.
1079         (operator<<(basic_ostream, const path&)): Use std::quoted directly.
1080         (operator>>(basic_istream, path&)): Likewise.
1081         (u8path): Reorder definitions and fix Windows implementation.
1082         (path::is_absolute()): Define inline and fix for Windows.
1083         [!_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1084         Define POSIX version inline.
1085         (path::_M_append(path)): Define inline.
1086         * include/experimental/bits/fs_path.h (path::is_absolute()): Move
1087         definition out of class body.
1088         (operator<<(basic_ostream, const path&)): Fix type of delimiter and
1089         escape characters.
1090         (operator>>(basic_istream, path&)): Likewise.
1091         (path::is_absolute()): Define inline and fix for Windows.
1092         * src/filesystem/dir-common.h (__gnu_posix): New namespace.
1093         (__gnu_posix::char_type, __gnu_posix::DIR, __gnu_posix::dirent)
1094         (__gnu_posix::opendir, __gnu_posix::readdir, __gnu_posix::closedir):
1095         Define as adaptors for Windows functions/types or as
1096         using-declarations for POSIX functions/types.
1097         (_Dir_base, get_file_type): Qualify names to use declarations from
1098         __gnu_posix namespace.
1099         (_Dir_base::is_dor_or_dotdot): New helper functions.
1100         * src/filesystem/dir.cc (_Dir, recursive_directory_iterator): Qualify
1101         names to use declarations from __gnu_posix namespace.
1102         * src/filesystem/ops-common.h (__gnu_posix): New nested namespace.
1103         (__gnu_posix::open, __gnu_posix::close, __gnu_posix::stat_type)
1104         (__gnu_posix::stat, __gnu_posix::lstat, __gnu_posix::mode_t)
1105         (__gnu_posix::chmod, __gnu_posix::mkdir, __gnu_posix::getcwd)
1106         (__gnu_posix::chdir, __gnu_posix::utimbuf, __gnu_posix::utime)
1107         (__gnu_posix::rename, __gnu_posix::truncate, __gnu_posix::char_type):
1108         Define as adaptors for Windows functions/types or as
1109         using-declarations for POSIX functions/types.
1110         (stat_type, do_copy_file): Qualify names to use declarations from
1111         __gnu_posix namespace.
1112         (do_space): Declare new function.
1113         (make_file_type): Only use S_ISLNK if defined.
1114         * src/filesystem/ops.cc (char_ptr, filesystem::canonical): Use
1115         path::value_type not char.
1116         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1117         names to use declarations from __gnu_posix namespace.
1118         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1119         add implementation for Windows.
1120         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1121         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1122         [!_PC_PATH_MAX]: Don't use pathconf.
1123         [PATH_MAX]: Use if defined.
1124         (filesystem::current_path(const path&, error_code&))
1125         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1126         (filesystem::last_write_time, filesystem::permissions): Use names
1127         from __gnu_posix.
1128         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1129         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1130         implementation for Windows.
1131         (filesystem::rename, filesystem::resize_file): Use names from
1132         __gnu_posix.
1133         (filesystem::space): Use do_space.
1134         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Get absolute path to directory.
1135         (filesystem::status, filesystem::symlink_status): Use names from
1136         __gnu_posix.
1137         (filesystem::temp_directory_path): Add implementation for Windows.
1138         * src/filesystem/path.cc (dot): Define constant.
1139         (path::replace_extension): Use dot.
1140         (path::_M_find_extension): Likewise. Use path::string_type not
1141         std::string.
1142         (path::_M_split_cmpts): Use dot.
1143         (filesystem_error::_M_get_what): Use u8string() not native().
1144         * src/filesystem/std-dir.cc (_Dir, recursive_directory_iterator):
1145         Qualify names to use declarations from __gnu_posix namespace.
1146         * src/filesystem/std-ops.cc (filesystem::absolute(const path&)): Use
1147         correct error_code.
1148         (filesystem::absolute(const path&, error_code&)): Add implementation
1149         for Windows.
1150         (char_ptr, filesystem::canonical): Use path::value_type not char.
1151         (do_copy_file): Use names from __gnu_posix.
1152         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Do not use fchmod, fchmodat or
1153         sendfile.
1154         (filesystem::copy, create_dir, filesystem::create_directory): Qualify
1155         names to use declarations from __gnu_posix namespace.
1156         (filesystem::create_hard_link): Check HAVE_LINK autoconf macro and
1157         add implementation for Windows.
1158         (filesystem::create_symlink): Check HAVE_SYMLINK autoconf macro.
1159         (filesystem::current_path(error_code&)): Use __gnu_posix::getcwd.
1160         [!_PC_PATH_MAX]: Don't use pathconf.
1161         [PATH_MAX]: Use if defined.
1162         (filesystem::current_path(const path&, error_code&))
1163         (filesystem::equivalent, do_stat, filesystem::hard_link_count)
1164         (filesystem::last_write_time, filesystem::permissions): Use names
1165         from __gnu_posix.
1166         (filesystem::read_symlink): Check HAVE_READLINK autoconf macro.
1167         (filesystem::remove) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Add
1168         implementation for Windows.
1169         (filesystem::rename, filesystem::resize_file): Use names from
1170         __gnu_posix.
1171         (do_space): Define.
1172         (filesystem::space): Use do_space.
1173         (filesystem::status, filesystem::symlink_status): Use names from
1174         __gnu_posix.
1175         (filesystem::temp_directory_path): Add implementation for Windows.
1176         * src/filesystem/std-path.cc
1177         [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (path::operator/=(const path&)):
1178         Define for Windows.
1179         (dot): Define constant.
1180         (path::replace_extension, is_dot): Use dot.
1181         (path::lexically_normal): Check _M_type instead of calling
1182         non-existent function.
1183         (path::_M_find_extension): Use dot. Use path::string_type not
1184         std::string.
1185         (path::_M_split_cmpts): Use dot.
1186         (filesystem_error::_M_get_what): Use u8string() not native().
1187         * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Do not
1188         use symlinks.
1189         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1190         Likewise.
1191         * testsuite/27_io/filesystem/operations/absolute.cc: Use
1192         __gnu_test::root_path() instead of "/" and add Windows-specific tests.
1193         * testsuite/27_io/filesystem/operations/canonical.cc: Use
1194         path::string() to get narrow string, not path::native().
1195         * testsuite/27_io/filesystem/operations/copy.cc: Construct fstreams
1196         with std::filesystem::path not std::basic_string.
1197         * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
1198         * testsuite/27_io/filesystem/operations/exists.cc: Use
1199         __gnu_test::root_path() instead of "/".
1200         * testsuite/27_io/filesystem/operations/is_empty.cc: Construct
1201         fstreams with std::filesystem::path not std::basic_string.
1202         * testsuite/27_io/filesystem/operations/last_write_time.cc: Use
1203         path::string() to get narrow string.
1204         * testsuite/27_io/filesystem/operations/space.cc: Check results for
1205         errors, expect sensible values otherwise.
1206         * testsuite/27_io/filesystem/operations/temp_directory_path.cc: Add
1207         helpers for adjusting the environment on Windows.
1208         * testsuite/27_io/filesystem/path/append/path.cc: Test
1209         Windows-specific behaviour.
1210         * testsuite/27_io/filesystem/path/construct/format.cc: Fix creation
1211         of path::string_type objects.
1212         * testsuite/27_io/filesystem/path/construct/locale.cc: Compare native
1213         string to wide string on Windows.
1214         * testsuite/27_io/filesystem/path/decompose/root_directory.cc: Allow
1215         for backslash as root-directory.
1216         * testsuite/27_io/filesystem/path/decompose/stem.cc: Use
1217         path::string() to get narrow string.
1218         * testsuite/27_io/filesystem/path/itr/traversal.cc: Test Windows-style
1219         paths.
1220         * testsuite/27_io/filesystem/path/native/string.cc: Use string_type
1221         not std::string.
1222         * testsuite/27_io/filesystem/path/query/is_absolute.cc: Adjust for
1223         different definintion of absolute paths on Windows.
1224         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1225         Do not use symlinks.
1226         * testsuite/experimental/filesystem/operations/absolute.cc: Test
1227         Windows behaviour.
1228         * testsuite/experimental/filesystem/operations/copy.cc: Construct
1229         fstreams with NTCTS not std::basic_string.
1230         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
1231         * testsuite/experimental/filesystem/operations/exists.cc: Use
1232         __gnu_test::root_path() instead of "/".
1233         * testsuite/experimental/filesystem/operations/is_empty.cc: Construct
1234         fstreams with NTCTS not std::basic_string.
1235         * testsuite/experimental/filesystem/operations/last_write_time.cc:
1236         Use path::string() to get narrow string.
1237         * testsuite/experimental/filesystem/operations/space.cc: Use
1238         __gnu_test::root_path() instead of "/".
1239         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1240         Add helpers for adjusting the environment on Windows.
1241         * testsuite/experimental/filesystem/path/append/path.cc: Use
1242         path::string() to get narrow strings for comparisons.
1243         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
1244         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
1245         Likewise.
1246         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
1247         * testsuite/experimental/filesystem/path/native/string.cc: Use
1248         string_type not std::string.
1249         * testsuite/experimental/filesystem/path/query/is_absolute.cc:
1250         Adjust for different definintion of absolute paths on Windows.
1251         * testsuite/util/testsuite_fs.h (__gnu_test::root_path()): New
1252         function.
1253         (__gnu_test::scoped_file): Construct fstreams with NTCTS not
1254         std::basic_string.
1256 2018-05-31  Jonathan Wakely  <jwakely@redhat.com>
1258         PR libstdc++/85951
1259         * include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
1260         uint_least16_t and uint_least32_t.
1261         (__make_unsigned<wchar_t>): Define unconditionally.
1262         (__make_unsigned_selector<_Tp, true, false>): Remove intermediate
1263         typedefs.
1264         (__make_unsigned_selector_base): New type to provide helper templates.
1265         (__make_unsigned_selector<_Tp, false, true>): Reimplement using
1266         __make_unsigned_selector_base helpers.
1267         (__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
1268         (__make_signed_selector<_Tp, true, false>): Remove intermediate
1269         typedefs.
1270         (__make_signed<wchar_t>, __make_signed<char16_t>)
1271         (__make_signed<char32_t>)): Define unconditionally.
1272         * testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
1273         wchar_t, char16_t and char32_t are transformed correctly.
1274         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
1275         dg-error lineno.
1276         * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
1277         wchar_t, char16_t and char32_t are transformed correctly.
1278         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
1279         dg-error lineno.
1281 2018-05-29  Jonathan Wakely  <jwakely@redhat.com>
1283         * include/std/variant (__erased_dtor): Qualify call to __get.
1285 2018-05-27  François Dumont  <fdumont@gcc.gnu.org>
1287         * include/bits/stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New.
1288         (_Rb_tree(const allocator_type&)): Use latter.
1289         * include/bits/stl_map.h (map(const allocator_type&)): Likewise.
1290         (map(initializer_list<value_type>, const allocator_type&)): Likewise.
1291         (map(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1292         * include/bits/stl_multimap.h
1293         (multimap(const allocator_type&)): Likewise.
1294         (multimap(initializer_list<value_type>, const allocator_type&)):
1295         Likewise.
1296         (multimap(_InputIterator, _InputIterator, const allocator_type&)):
1297         Likewise.
1298         * include/bits/stl_set.h (set(const allocator_type&)): Likewise.
1299         (set(initializer_list<value_type>, const allocator_type&)): Likewise.
1300         (set(_InputIterator, _InputIterator, const allocator_type&)): Likewise.
1301         * include/bits/stl_multiset.h
1302         (multiset(const allocator_type&)): Likewise.
1303         (multiset(initializer_list<value_type>, const allocator_type&)):
1304         Likewise.
1305         (multiset(_InputIterator, _InputIterator, const allocator_type&)):
1306         Likewise.
1308 2018-05-25  François Dumont  <fdumont@gcc.gnu.org>
1310         PR libstdc++/85768
1311         * src/c++11/debug.cc: Remove backtrace usage.
1313 2018-05-24  Maya Rashish  <coypu@sdf.org>
1315         PR target/85904
1316         * crossconfig.m4: Test for aligned_alloc on netbsd.
1317         * configure: Regenerate.
1319 2018-05-24  Jonathan Wakely  <jwakely@redhat.com>
1321         PR libstdc++/69769
1322         PR libstdc++/85886
1323         * include/bits/atomic_base.h (__atomic_base::value_type)
1324         (__atomic_base::difference_type): Add new typedefs.
1325         * include/std/atomic (atomic<bool>::value_type, atomic<T>::value_type)
1326         (atomic<T*>::value_type, atomic<T*>::difference_type): Likewise.
1327         (atomic<T*>::operator++, atomic<T*>::operator--)
1328         (atomic<T*>::operator+=, atomic<T*>::operator-=)
1329         (atomic<T*>::fetch_add, atomic<T*>::fetch_sub): Add static assertion
1330         to enforce C++17 requirement on pointer arithmetic.
1331         (__atomic_val_t, __atomic_diff_t): New alias templates.
1332         (atomic_init, atomic_store_explicit, atomic_exchange_explicit)
1333         (atomic_compare_exchange_weak_explicit)
1334         (atomic_compare_exchange_strong_explicit, atomic_store)
1335         (atomic_exchange, atomic_compare_exchange_weak)
1336         (atomic_compare_exchange_strong): Use __atomic_val_t to make
1337         scalar parameters be non-deduced contexts.
1338         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1339         (atomic_fetch_add, atomic_fetch_sub): Change first parameter to be
1340         atomic instead of __atomic_base, and use __atomic_diff_t for scalar
1341         parameters.
1342         (atomic_fetch_and_explicit, atomic_fetch_or_explicit)
1343         (atomic_fetch_xor_explicit, atomic_fetch_and, atomic_fetch_or)
1344         (atomic_fetch_xor): Use __atomic_val_t for scalar parameters.
1345         (atomic_fetch_add_explicit, atomic_fetch_sub_explicit)
1346         (atomic_fetch_add, atomic_fetch_sub): Remove overloads for atomic
1347         address types.
1348         * testsuite/29_atomics/atomic/60695.cc: Adjust dg-error lineno.
1349         * testsuite/29_atomics/atomic/69769.cc: New test.
1350         * testsuite/29_atomics/atomic/nonmembers.cc: New test.
1351         * testsuite/29_atomics/atomic/operators/pointer_partial_void.cc:
1352         Disable test for C++17 and later.
1353         * testsuite/29_atomics/atomic/requirements/typedefs.cc: New test.
1354         * testsuite/29_atomics/atomic_integral/nonmembers.cc: New test.
1355         * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc: New
1356         test.
1358 2018-05-23  Jonathan Wakely  <jwakely@redhat.com>
1360         * include/bits/fs_path.h (path::__is_encoded_char): Change from class
1361         template to alias template.
1362         (path::__value_type_is_char): Use remove_const_t.
1363         (path:_S_string_from_iter): New helper function.
1364         (path::_S_convert(InputIter, __null_terminated))
1365         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1366         Use _S_string_from_iter.
1367         (path::string<_CharT, _Allocator>(const _Allocator&)): Allow sharing
1368         rep for COW strings.
1369         * include/experimental/bits/fs_path.h (path::__is_encoded_char):
1370         Change from class template to alias template.
1371         (path::__value_type_is_char): Use remove_const.
1372         (path:_S_string_from_iter): New helper function.
1373         (path::_S_convert(InputIter, __null_terminated))
1374         (path::_S_convert_loc(InputIter, __null_terminated, const locale&)):
1375         Use _S_string_from_iter.
1376         * testsuite/27_io/filesystem/path/append/source.cc: Test appending
1377         wide strings.
1378         * testsuite/27_io/filesystem/path/concat/strings.cc: Check for exact
1379         string equality, not path equivalence.
1380         * testsuite/27_io/filesystem/path/construct/format.cc: Check
1381         construction from std::string and std::wstring and input iterators.
1382         * testsuite/27_io/filesystem/path/construct/locale.cc: Check
1383         construction from iterators.
1384         * testsuite/experimental/filesystem/path/concat/strings.cc: Check for
1385         exact string equality, not path equivalence.
1386         * testsuite/experimental/filesystem/path/construct/locale.cc: Check
1387         construction from iterators.
1389         * include/bits/fs_path.h (path::_M_type): Change default member
1390         initializer to _Filename.
1391         (path::begin): Create past-the-end iterator for empty path.
1392         * src/filesystem/std-path.cc (path::remove_filename()): Remove
1393         debugging check.
1394         (path::has_relative_path()): Return false for empty filenames.
1395         (path::_M_split_cmpts): Set _M_type to _Filename for empty paths.
1396         Fix offset of empty final component.
1397         * testsuite/27_io/filesystem/path/itr/components.cc: New.
1398         * testsuite/27_io/filesystem/path/itr/traversal.cc: Add new inputs.
1400 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
1402         Add support for opening file streams from wide character strings.
1403         * config/io/basic_file_stdio.cc [_GLIBCXX_HAVE__WFOPEN]
1404         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1405         Define new overload.
1406         * config/io/basic_file_stdio.h [_GLIBCXX_HAVE__WFOPEN]
1407         (__basic_file<char>::open(const wchar_t*, ios_base::openmode)):
1408         Declare new overload.
1409         * configure.ac: Check for _wfopen.
1410         * crossconfig.m4: Likewise.
1411         * configure: Regenerate.
1412         * config.h.in: Regenerate.
1413         * include/bits/fstream.tcc [_GLIBCXX_HAVE__WFOPEN]
1414         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1415         Define new overload.
1416         * include/std/fstream [_GLIBCXX_HAVE__WFOPEN]
1417         (basic_filebuf<C,T>::open(const wchar_t*, ios_base::openmode)):
1418         Declare new overload.
1419         [_GLIBCXX_HAVE__WFOPEN]
1420         (basic_ifstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1421         (basic_ifstream<C,T>::basic_open(const wchar_t*, openmode))
1422         (basic_ofstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1423         (basic_ofstream<C,T>::basic_open(const wchar_t*, openmode))
1424         (basic_fstream<C,T>::basic_ifstream(const wchar_t*, openmode))
1425         (basic_fstream<C,T>::basic_open(const wchar_t*, openmode)): Define
1426         new overloads.
1427         * testsuite/27_io/basic_filebuf/open/wchar_t/1.cc: New.
1428         * testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc: New.
1429         * testsuite/27_io/basic_ifstream/open/wchar_t/1.cc: New.
1430         * testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc: New.
1431         * testsuite/27_io/basic_ofstream/open/wchar_t/1.cc: New.
1432         * testsuite/27_io/basic_fstream/cons/wchar_t/1.cc: New.
1433         * testsuite/27_io/basic_fstream/open/wchar_t/1.cc: New.
1435 2018-05-21  François Dumont  <fdumont@gcc.gnu.org>
1437         PR libstdc++/85845
1438         * include/bits/stl_tree.h
1439         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): Fix noexcept
1440         qualification.
1442 2018-05-21  Jonathan Wakely  <jwakely@redhat.com>
1444         * src/filesystem/std-ops.cc (absolute): Report an error for empty
1445         paths.
1446         (weakly_canonical(const path&)): Do not call canonical on empty path.
1447         (weakly_canonical(const path&, error_code&)): Likewise.
1448         * testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.
1450         PR libstdc++/85818
1451         * testsuite/experimental/filesystem/path/preferred_separator.cc: Add
1452         dg-require-filesystem-ts.
1454         PR libstdc++/85843
1455         * src/c++11/cow-stdexcept.cc (logic_error, runtime_error): Explicitly
1456         initialize base class to avoid warnings.
1458 2018-05-19  Jonathan Wakely  <jwakely@redhat.com>
1460         * src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
1461         [__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
1462         little_endian element in bitmask.
1463         * testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
1464         * testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.
1466 2018-05-18  François Dumont  <fdumont@gcc.gnu.org>
1468         * include/bits/stl_tree.h
1469         (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New.
1470         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, true_type)): New, use latter.
1471         (_Rb_tree(_Rb_tree&&, _Node_allocator&&, false_type)): New.
1472         (_Rb_tree(_Rb_tree&&, _Node_allocator&&)): Adapt, use latters.
1473         * include/debug/map.h
1474         (map(map&&, const_allocator_type&)): Add noexcept qualitication.
1475         * include/debug/multimap.h
1476         (multimap(multimap&&, const_allocator_type&)): Likewise.
1477         * include/debug/set.h
1478         (set(set&&, const_allocator_type&)): Likewise.
1479         * include/debug/multiset.h
1480         (multiset(multiset&&, const_allocator_type&)): Likewise.
1481         * testsuite/23_containers/map/cons/noexcept_default_construct.cc:
1482         Add checks.
1483         * testsuite/23_containers/map/cons/noexcept_move_construct.cc:
1484         Add checks.
1485         * testsuite/23_containers/multimap/cons/noexcept_default_construct.cc:
1486         Add checks.
1487         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
1488         Add checks.
1489         * testsuite/23_containers/multiset/cons/noexcept_default_construct.cc:
1490         Add checks.
1491         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
1492         Add checks.
1493         * testsuite/23_containers/set/cons/noexcept_default_construct.cc:
1494         Add checks.
1495         * testsuite/23_containers/set/cons/noexcept_move_construct.cc:
1496         Add checks.
1498 2018-05-18  Jason Merrill  <jason@redhat.com>
1500         * include/bits/stl_deque.h (_Deque_iterator): Constrain constructor
1501         for conversion to const_iterator.  Add defaulted copy ops.
1502         * libsupc++/new (bad_alloc): Add defaulted copy ops.
1503         * libsupc++/exception.h (exception): Add defaulted copy ops.
1504         * include/std/system_error (system_error): Add defaulted copy ops.
1505         * include/std/stdexcept (domain_error, invalid_argument)
1506         (length_error, out_of_range, range_error, overflow_error)
1507         (underflow_error): Add defaulted copy ops.
1508         * include/bits/stl_iterator.h (reverse_iterator): Add defaulted
1509         copy assignment.
1510         * include/bits/allocator.h (allocator): Add defaulted copy assignment.
1511         * include/ext/throw_allocator.h (condition_base): Add defaulted
1512         default and copy ctor and copy assignment.
1514 2018-05-18  Jonathan Wakely  <jwakely@redhat.com>
1516         PR libstdc++/85098
1517         * include/bits/regex.h [__cplusplus < 201703L] (basic_regex::icase)
1518         (basic_regex::nosubs, basic_regex::optimize, basic_regex::collate)
1519         (basic_regex::ECMAScript, basic_regex::basic, basic_regex::extended)
1520         (basic_regex::awk, basic_regex::grep, basic_regex::egrep): Add
1521         definitions.
1522         * include/bits/regex_automaton.h (_NFA::_M_insert_state): Adjust
1523         whitespace.
1524         * include/bits/regex_compiler.tcc (__INSERT_REGEX_MATCHER): Add
1525         braces around body of do-while.
1526         * testsuite/28_regex/basic_regex/85098.cc: New
1528 2018-05-17  Jonathan Wakely  <jwakely@redhat.com>
1530         PR libstdc++/85818
1531         * src/filesystem/path.cc (path::preferred_separator): Add used
1532         attribute.
1533         * testsuite/experimental/filesystem/path/preferred_separator.cc: New.
1535         PR libstdc++/85812
1536         * libsupc++/cxxabi_init_exception.h (__cxa_free_exception): Declare.
1537         * libsupc++/exception_ptr.h (make_exception_ptr) [__cpp_exceptions]:
1538         Refactor to separate non-throwing and throwing implementations.
1539         [__cpp_rtti && !_GLIBCXX_HAVE_CDTOR_CALLABI]: Deallocate the memory
1540         if constructing the object throws.
1542 2018-05-15  Jonathan Wakely  <jwakely@redhat.com>
1544         PR libstdc++/85749
1545         * include/bits/random.h (__detail::__is_seed_seq): New SFINAE helper.
1546         (linear_congruential_engine, mersenne_twister_engine)
1547         (subtract_with_carry_engine, discard_block_engine)
1548         (independent_bits_engine, shuffle_order_engine): Use __is_seed_seq to
1549         constrain function templates taking seed sequences.
1550         * include/bits/random.tcc (linear_congruential_engine::seed(_Sseq&))
1551         (mersenne_twister_engine::seed(_Sseq&))
1552         (subtract_with_carry_engine::seed(_Sseq&)): Change return types to
1553         match declarations.
1554         * include/ext/random (simd_fast_mersenne_twister_engine): Use
1555         __is_seed_seq to constrain function templates taking seed sequences.
1556         * include/ext/random.tcc (simd_fast_mersenne_twister_engine::seed):
1557         Change return type to match declaration.
1558         * testsuite/26_numerics/random/discard_block_engine/cons/seed_seq2.cc:
1559         New.
1560         * testsuite/26_numerics/random/independent_bits_engine/cons/
1561         seed_seq2.cc: New.
1562         * testsuite/26_numerics/random/linear_congruential_engine/cons/
1563         seed_seq2.cc: New.
1564         * testsuite/26_numerics/random/mersenne_twister_engine/cons/
1565         seed_seq2.cc: New.
1566         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
1567         * testsuite/26_numerics/random/shuffle_order_engine/cons/seed_seq2.cc:
1568         New.
1569         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/
1570         seed_seq2.cc: New.
1571         * testsuite/ext/random/simd_fast_mersenne_twister_engine/cons/
1572         seed_seq2.cc: New.
1574         PR libstdc++/83891
1575         * include/bits/fs_path.h (path::is_absolute()): Use same definition
1576         for all operating systems.
1577         * include/experimental/bits/fs_path.h (path::is_absolute()): Likewise.
1578         * testsuite/27_io/filesystem/path/query/is_absolute.cc: New.
1579         * testsuite/27_io/filesystem/path/query/is_relative.cc: Fix comment.
1580         * testsuite/experimental/filesystem/path/query/is_absolute.cc: New.
1582         * testsuite/27_io/filesystem/path/decompose/extension.cc: Remove
1583         unused <vector> header.
1584         * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
1585         * testsuite/27_io/filesystem/path/query/has_extension.cc: Likewise.
1586         * testsuite/27_io/filesystem/path/query/has_filename.cc: Likewise.
1587         * testsuite/27_io/filesystem/path/query/has_parent_path.cc: Likewise.
1588         * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
1589         Likewise.
1590         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
1591         Likewise.
1592         * testsuite/27_io/filesystem/path/query/has_root_name.cc: Likewise.
1593         * testsuite/27_io/filesystem/path/query/has_root_path.cc: Likewise.
1594         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
1595         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
1596         * testsuite/experimental/filesystem/path/decompose/extension.cc:
1597         Likewise.
1598         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
1599         * testsuite/experimental/filesystem/path/query/has_extension.cc:
1600         Likewise.
1601         * testsuite/experimental/filesystem/path/query/has_filename.cc:
1602         Likewise.
1603         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
1604         Likewise.
1605         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
1606         Likewise.
1607         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
1608         Likewise.
1609         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
1610         Likewise.
1611         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
1612         Likewise.
1613         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
1614         * testsuite/experimental/filesystem/path/query/is_relative.cc:
1615         Likewise.
1617         PR libstdc++/84159
1618         * include/bits/fs_path.h (path::operator/=, path::append): Construct
1619         temporary path before calling _M_append.
1620         (path::_M_append): Change parameter to path and implement C++17
1621         semantics.
1622         * testsuite/27_io/filesystem/path/append/path.cc: Add helper function
1623         and more examples from the standard.
1624         * testsuite/27_io/filesystem/path/append/source.cc: New.
1625         * testsuite/27_io/filesystem/path/decompose/filename.cc: Add comment.
1626         * testsuite/27_io/filesystem/path/nonmember/append.cc: New.
1628         * include/std/variant (__gen_vtable_impl::__visit_invoke): Qualify
1629         __invoke to prevent ADL.
1631 2018-05-14  Jonathan Wakely  <jwakely@redhat.com>
1633         PR libstdc++/81256
1634         * include/bits/fstream.tcc (basic_filebuf::close): Do not swallow
1635         exceptions from _M_terminate_output().
1636         * include/std/fstream (basic_filebuf::~basic_filebuf): Swallow any
1637         exceptions from close().
1638         * testsuite/27_io/basic_filebuf/close/81256.cc: New.
1640         * include/bits/valarray_array.h (__valarray_get_memory): Remove.
1641         (__valarray_get_storage): Call operator new directly. Remove ignored
1642         top-level restrict qualifier and add malloc attribute instead.
1643         (_Array<_Tp>::_Array(size_t)): Remove unused constructor.
1645         PR libstdc++/67554
1646         * include/bits/valarray_array.h (_Array_copy_ctor<_Tp, true>)
1647         (_Array_copier<_Tp, true>): Do not pass null pointers to memcpy.
1649         PR libstdc++/82966
1650         * include/bits/node_handle.h (_Node_handle_common::_M_swap): Use value
1651         instead of type.
1652         * testsuite/23_containers/set/modifiers/node_swap.cc: New.
1654 2018-05-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
1656         PR libstdc++/80165
1657         * testsuite/20_util/variant/80165.cc: New.
1659 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
1661         * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer.
1662         * doc/xml/manual/debug_mode.xml: Add array and forward_list to list
1663         of C++11 containers with Debug Mode support.
1664         * doc/xml/manual/using.xml: Document Dual ABI for ios_base::failure.
1665         * doc/html/*: Regenerate.
1667 2018-05-10  Jason Merrill  <jason@redhat.com>
1669         * include/bits/regex_compiler.h (_S_cache_size): Change from
1670         function to variable.
1672 2018-05-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
1674         PR libstdc++/83140 - assoc_legendre returns negated value when m is odd
1675         * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase
1676         argument defaulted to +1.  Doxy comments on same.
1677         * testsuite/special_functions/02_assoc_legendre/
1678         check_value.cc: Regen.
1679         * testsuite/tr1/5_numerical_facilities/special_functions/
1680         02_assoc_legendre/check_value.cc: Regen.
1682 2018-05-10  Jonathan Wakely  <jwakely@redhat.com>
1684         PR libstdc++/85729
1685         * include/bits/c++config.h (__replacement_assert): Add linkage
1686         specification.
1687         * include/bits/std_abs.h: Add comment to closing brace of block.
1688         * include/c_global/cstddef: Add linkage specification.
1689         * include/c_global/cstring: Likewise.
1690         * include/c_global/cwchar: Likewise.
1692 2018-05-09  François Dumont  <fdumont@gcc.gnu.org>
1694         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_constant()):
1695         Rename in...
1696         (_Safe_iterator<>::_S_constant()): ...that.
1697         * include/debug/safe_local_iterator.h
1698         (_Safe_local_iterator<>::_M_constant()): Rename in...
1699         (_Safe_local_iterator<>::_S_constant()): ...that.
1700         * include/debug/formatter.h: Remove bits/cpp_type_traits.h include.
1701         (_Iterator_state::__rbegin): New.
1702         (_Iterator_state::__rmiddle): New.
1703         (_Iterator_state::__rend): New.
1704         (_Parameter::_Parameter(const _Safe_iterator<>&, const char*,
1705         _Is_iterator)): Use _Safe_iterator<>::_S_constant. Grab normal underlying
1706         iterator type.
1707         (_Parameter::_Parameter(const _Safe_local_iterator<>&, const char*,
1708         _Is_iterator)): Likewise.
1709         (_Parameter::_S_reverse_state(_Iterator_state)): New.
1710         (_Parameter(__gnu_cxx::__normal_iterator<> const&, const char*,
1711         _Is_iterator)): New.
1712         (_Parameter(std::reverse_iterator<> const&, const char*,
1713         _Is_iterator)): New.
1714         (_Parameter(std::reverse_iterator<_Safe_iterator<>> const&,
1715         const char*, _Is_iterator)): New.
1716         (_Parameter(std::move_iterator<> const&, const char*, _Is_iterator):
1717         New.
1718         (_Parameter(std::move_iterator<_Safe_iterator<>> const&, const char*,
1719         _Is_iterator)): New.
1720         * testsuite/24_iterators/move_iterator/debug_neg.cc: New.
1721         * testsuite/24_iterators/normal_iterator/debug_neg.cc: New.
1722         * testsuite/24_iterators/reverse_iterator/debug_neg.cc: New.
1724 2018-05-09  Jonathan Wakely  <jwakely@redhat.com>
1726         * include/bits/std_function.h (_Base_manager::_M_get_pointer):
1727         Use constexpr if in C++17 mode.
1728         (_Base_manager::_M_clone(_Any_data&, const _Any_data&, true_type)):
1729         Copy from const object.
1730         * testsuite/20_util/function/cons/non_copyconstructible.cc: New.
1732 2018-05-08  François Dumont  <fdumont@gcc.gnu.org>
1734         * src/c++11/debug.cc [_GLIBCXX_HAVE_EXECINFO_H]: Include execinfo.h.
1735         [_GLIBCXX_HAVE_EXECINFO_H](_Error_formatter::_M_error): Render
1736         backtrace.
1738         * include/debug/macros.h (__glibcxx_check_valid_range_at): New.
1739         * include/debug/functions.h (__check_valid_range): Use latter.
1740         * include/debug/macros.h (__glibcxx_check_valid_constructor_range): New,
1741         use latter.
1742         * include/debug/deque
1743         (deque::deque<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1744         * include/debug/forward_list
1745         (forward_list::forward_list<_Iter>(_Iter, _Iter, const _Alloc&)):
1746         Likewise.
1747         * include/debug/list
1748         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1749         * include/debug/list
1750         (list::list<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1751         * include/debug/map.h
1752         (map::map<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1753         (map::map<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1754         Likewise.
1755         * include/debug/multimap.h
1756         (multimap::multimap<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1757         (multimap::multimap<_Iter>(_Iter, _Iter, const _Compare&,
1758         const _Alloc&)): Likewise.
1759         * include/debug/set.h
1760         (set::set<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1761         (set::set<_Iter>(_Iter, _Iter, const _Compare&, const _Alloc&)):
1762         Likewise.
1763         * include/debug/multiset.h
1764         (multiset::multiset<_Iter>(_Iter, _Iter, const _Alloc&)): Likewise.
1765         (multiset::multiset<_Iter>(_Iter, _Iter, const _Compare&,
1766         const _Alloc&)): Likewise.
1767         * include/debug/string
1768         (basic_string::basic_string<_Iter>(_Iter, _Iter, const _Alloc&)):
1769         Likewise.
1770         * include/debug/unordered_map
1771         (unordered_map::unordered_map<_Iter>(_Iter, _Iter, const _Alloc&)):
1772         Likewise.
1773         (unordered_multimap::unordered_multimap<_Iter>(_Iter, _Iter,
1774         const _Alloc&)): Likewise.
1775         * include/debug/unordered_set
1776         (unordered_set::unordered_set<_Iter>(_Iter, _Iter, const _Alloc&)):
1777         Likewise.
1778         (unordered_multiset::unordered_multiset<_Iter>(_Iter, _Iter,
1779         const _Alloc&)): Likewise.
1780         * include/debug/vector
1781         (vector::vector<_Iter>(_Iter, _Iter, const _Alloc&)): Use latter.
1783         * include/debug/formatter.h (_Error_formatter::_M_function): New.
1784         (_Error_formatter(const char*, unsigned int)): Adapt.
1785         (_Error_formatter::_M_at): Rename in...
1786         (_Error_formatter::_S_at): ...that and adapt.
1787         * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): New.
1788         (_GLIBCXX_DEBUG_VERIFY_AT, _GLIBCXX_DEBUG_VERIFY): Adapt.
1789         * src/c++11/debug.cc (_Error_formatter::_M_error): Render _M_function
1790         when available.
1792 2018-05-08  Jonathan Wakely  <jwakely@redhat.com>
1794         * include/bits/regex_automaton.h (_NFA_base::_M_paren_stack, _NFA):
1795         Use normal std::vector even in Debug Mode.
1797         PR libstdc++/85672
1798         * include/Makefile.am [!ENABLE_FLOAT128]: Change c++config.h entry
1799         to #undef _GLIBCXX_USE_FLOAT128 instead of defining it to zero.
1800         * include/Makefile.in: Regenerate.
1801         * include/bits/c++config (_GLIBCXX_USE_FLOAT128): Move definition
1802         within conditional block.
1804 2018-05-07  Jonathan Wakely  <jwakely@redhat.com>
1806         * doc/xml/manual/using.xml (table.cmd_options): Document that the
1807         C++17 Filesystem implementation also needs -lstdc++fs.
1809         PR libstdc++/85671
1810         * include/bits/fs_path.h (operator/): Permit copy elision.
1811         * include/experimental/bits/fs_path.h (operator/): Likewise.
1813 2018-05-07  Edward Smith-Rowland  <3dw4rd@verizon.net>
1815         Moar PR libstdc++/80506
1816         * include/bits/random.tcc (gamma_distribution::__generate_impl()):
1817         Fix magic number used in loop condition.
1819 2018-05-04  Jonathan Wakely  <jwakely@redhat.com>
1821         PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>>
1822         * include/std/optional (_Optional_payload): Add noexcept to default
1823         constructor. Re-indent.
1824         (_Optional_payload<_Tp, true, true, true>): Likewise. Add noexcept to
1825         constructor for copying disengaged payloads.
1826         (_Optional_payload<_Tp, true, false, true>): Likewise.
1827         (_Optional_payload<_Tp, true, true, false>): Likewise.
1828         (_Optional_payload<_Tp, true, false, false>): Likewise.
1829         * testsuite/20_util/optional/cons/85642.cc: New.
1830         * testsuite/20_util/optional/cons/value_neg.cc: Adjust dg-error lines.
1832 2018-05-03  Jonathan Wakely  <jwakely@redhat.com>
1834         PR libstdc++/82644
1835         * include/tr1/cmath [__STRICT_ANSI__] (hypergf, hypergl, hyperg): Use
1836         inline definitions instead of using-declarations.
1837         [__STRICT_ANSI__] (conf_hypergf, conf_hypergl, conf_hyperg): Likewise.
1838         * testsuite/tr1/5_numerical_facilities/special_functions/
1839         07_conf_hyperg/compile_cxx17.cc: New.
1840         * testsuite/tr1/5_numerical_facilities/special_functions/
1841         17_hyperg/compile_cxx17.cc: New.
1843         PR libstdc++/84769
1844         * include/std/variant (visit): Qualify std::get call.
1846         PR libstdc++/85632 use uintmax_t for arithmetic
1847         * src/filesystem/ops.cc (experimental::filesystem::space): Perform
1848         arithmetic in result type.
1849         * src/filesystem/std-ops.cc (filesystem::space): Likewise.
1850         * testsuite/27_io/filesystem/operations/space.cc: Check total capacity
1851         is greater than free space.
1852         * testsuite/experimental/filesystem/operations/space.cc: New.
1854         * testsuite/20_util/remove_cvref/requirements/alias_decl.cc: New.
1855         * testsuite/20_util/remove_cvref/requirements/explicit_instantiation.cc:
1856         New.
1857         * testsuite/20_util/remove_cvref/value.cc: New.
1858         * testsuite/20_util/remove_cvref/value_ext.cc: New.
1860         PR libstdc++/84087 LWG DR 2268 basic_string default arguments
1861         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI=1]
1862         (append(const basic_string&, size_type, size_type)
1863         (assign(const basic_string&, size_type, size_type)
1864         (insert(size_type, const basic_string&, size_type, size_type)
1865         (replace(size_type,size_type,const basic_string&,size_type,size_type)
1866         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1867         Add default arguments (LWG 2268).
1868         [_GLIBCXX_USE_CXX11_ABI=0]
1869         (append(const basic_string&, size_type, size_type)
1870         (assign(const basic_string&, size_type, size_type)
1871         (insert(size_type, const basic_string&, size_type, size_type)
1872         (replace(size_type,size_type,const basic_string&,size_type,size_type)
1873         (compare(size_type,size_type,constbasic_string&,size_type,size_type)):
1874         Likewise.
1875         * testsuite/21_strings/basic_string/dr2268.cc: New test.
1877         PR libstdc++/84535
1878         * include/std/thread (thread::__not_same): New SFINAE helper.
1879         (thread::thread(_Callable&&, _Args&&...)): Add SFINAE constraint that
1880         first argument is not a std::thread. Add static assertion to check
1881         INVOKE expression is valid.
1882         (thread::thread(thread&), thread::thread(const thread&&)): Remove.
1883         (thread::_Invoke::_M_invoke, thread::_Invoke::operator()): Use
1884         __invoke_result for return types and remove exception specifications.
1885         * testsuite/30_threads/thread/cons/84535.cc: New.
1887         * include/std/future (__async_result_of): Use __invoke_result instead
1888         of result_of.
1890         * include/std/any (any_cast): Use __remove_cvref_t.
1891         * include/std/tuple (__make_tuple): Likewise.
1892         * include/std/type_traits (__remove_cvref_t): Define.
1893         (__result_of_memobj, __result_of_memfun): Use __remove_cvref_t.
1894         [__cplusplus > 201703L] (remove_cvref, remove_cvref_t): Define.
1895         * include/std/variant (__erased_hash): Use __remove_cvref_t.
1897 2018-05-02  François Dumont  <fdumont@gcc.gnu.org>
1899         * include/bits/deque.tcc (deque<>::_M_assign_aux): Cast to void to
1900         ensure overloaded comma not used.
1901         * include/bits/list.tcc (list<>::_M_assign_dispatch): Likewise.
1902         * include/bits/vector.tcc (vector<>::_M_assign_aux): Likewise.
1903         * include/bits/stl_bvector.h (vector<bool>::_M_assign_aux): Likewise.
1904         * testsuite/23_containers/deque/modifiers/assign/1.cc: New.
1905         * testsuite/23_containers/list/modifiers/assign/1.cc: New.
1906         * testsuite/23_containers/vector/bool/modifiers/assign/1.cc: New.
1907         * testsuite/23_containers/vector/modifiers/assign/1.cc: New.
1909 2018-05-02  Jonathan Wakely  <jwakely@redhat.com>
1911         PR libstdc++/68197
1912         * include/bits/ios_base.h (ios_base::iword, ios_base::pword): Cast
1913         indices to unsigned.
1914         * src/c++11/ios.cc (ios_base::_M_grow_words): Treat negative indices
1915         as failure. Refactor error handling.
1916         * testsuite/27_io/ios_base/storage/68197.cc: New.
1918         PR libstdc++/57997
1919         PR libstdc++/83860
1920         * include/bits/gslice_array.h (gslice_array): Define default
1921         constructor as deleted, as per C++11 standard.
1922         * include/bits/mask_array.h (mask_array): Likewise.
1923         * include/bits/slice_array.h (slice_array): Likewise.
1924         * include/bits/valarray_after.h (_GBase, _GClos, _IBase, _IClos): Move
1925         to namespace __detail.
1926         (_GBase::_M_expr, _IBase::_M_expr): Use _ValArrayRef for type of data
1927         members.
1928         * include/bits/valarray_before.h (_ValArrayRef): New helper for type
1929         of data members in closure objects.
1930         (_FunBase, _ValFunClos, _RefFunClos, _UnBase, _UnClos, _BinBase)
1931         (_BinBase2, _BinBase1, _BinClos, _SBase, _SClos): Move to namespace
1932         __detail.
1933         (_FunBase::_M_expr, _UnBase::_M_expr, _BinBase::_M_expr1)
1934         (_BinBase::_M_expr2, _BinBase2::_M_expr1, _BinBase1::_M_expr2)
1935         (_SBase::_M_expr): Use _ValArrayRef for type of data members.
1936         * include/std/valarray (_UnClos, _BinClos, _SClos, _GClos, _IClos)
1937         (_ValFunClos, _RefFunClos): Move to namespace __detail and add
1938         using-declarations to namespace std.
1939         * testsuite/26_numerics/valarray/83860.cc: New.
1941         * testsuite/backward/strstream_move.cc: Remove duplicate function
1942         call.
1944         PR libstdc++/69608
1945         * include/backward/strstream (strstreambuf): Define move constructor
1946         and move assignment operator.
1947         (istrstream, ostrstream, strstream): Likewise.
1948         * testsuite/backward/strstream_move.cc: New.
1950 2018-05-01  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
1952         PR libstdc++/84654
1953         * acinclude.m4: Set ENABLE_FLOAT128 instead of _GLIBCXX_USE_FLOAT128.
1954         * config.h.in: Remove references to _GLIBCXX_USE_FLOAT128.
1955         * configure: Regenerate.
1956         * include/Makefile.am: Replace the value of _GLIBCXX_USE_FLOAT128
1957         based on ENABLE_FLOAT128.
1958         * include/Makefile.in: Regenerate.
1959         * include/bits/c++config: Define _GLIBCXX_USE_FLOAT128.
1960         [!defined(__FLOAT128__) && !defined(__SIZEOF_FLOAT128__)]: Undefine
1961         _GLIBCXX_USE_FLOAT128.
1963 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
1965         * configure: Regenerated.
1967 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
1969         * configure: Regenerated.
1971 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
1972             Jakub Jelinek  <jakub@redhat.com>
1974         PR libstdc++/85442
1975         * src/c++11/Makefile.am: Don't generate debuginfo again for
1976         cxx11-ios_failure-lt.s and cxx11-ios_failure.s files.
1977         * src/c++11/Makefile.in: Regenerate.
1979 2018-04-18  Jonathan Wakely  <jwakely@redhat.com>
1981         PR libstdc++/84442
1982         * testsuite/30_threads/thread/cons/terminate.cc
1983         [!_GLIBCXX_USE_C99_STDLIB] : Use _exit or std::exit instead of _Exit.
1985 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
1987         PR jit/85384
1988         * configure: Regenerate.
1990 2018-04-16  Jonathan Wakely  <jwakely@redhat.com>
1992         * testsuite/experimental/filesystem/file_status/1.cc: Add
1993         -DUSE_FILESYSTEM_TS to dg-options.
1994         * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1995         Likewise.
1996         * testsuite/experimental/filesystem/iterators/pop.cc: Likewise.
1997         * testsuite/experimental/filesystem/iterators/
1998         recursive_directory_iterator.cc: Likewise.
1999         * testsuite/experimental/filesystem/operations/absolute.cc: Likewise.
2000         * testsuite/experimental/filesystem/operations/canonical.cc: Likewise.
2001         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
2002         * testsuite/experimental/filesystem/operations/copy_file.cc: Likewise.
2003         * testsuite/experimental/filesystem/operations/create_directories.cc:
2004         Likewise.
2005         * testsuite/experimental/filesystem/operations/create_directory.cc:
2006         Likewise.
2007         * testsuite/experimental/filesystem/operations/create_symlink.cc:
2008         Likewise.
2009         * testsuite/experimental/filesystem/operations/current_path.cc:
2010         Likewise.
2011         * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise.
2012         * testsuite/experimental/filesystem/operations/exists.cc: Likewise.
2013         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
2014         * testsuite/experimental/filesystem/operations/is_empty.cc: Likewise.
2015         * testsuite/experimental/filesystem/operations/last_write_time.cc:
2016         Likewise.
2017         * testsuite/experimental/filesystem/operations/permissions.cc:
2018         Likewise.
2019         * testsuite/experimental/filesystem/operations/read_symlink.cc:
2020         Likewise.
2021         * testsuite/experimental/filesystem/operations/remove.cc: Likewise.
2022         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
2023         * testsuite/experimental/filesystem/operations/status.cc: Likewise.
2024         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
2025         Likewise.
2026         * testsuite/experimental/filesystem/path/append/path.cc: Likewise.
2027         * testsuite/experimental/filesystem/path/assign/assign.cc: Likewise.
2028         * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
2029         * testsuite/experimental/filesystem/path/compare/compare.cc: Likewise.
2030         * testsuite/experimental/filesystem/path/compare/path.cc: Likewise.
2031         * testsuite/experimental/filesystem/path/compare/strings.cc: Likewise.
2032         * testsuite/experimental/filesystem/path/concat/path.cc: Likewise.
2033         * testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
2034         * testsuite/experimental/filesystem/path/construct/copy.cc: Likewise.
2035         * testsuite/experimental/filesystem/path/construct/default.cc:
2036         Likewise.
2037         * testsuite/experimental/filesystem/path/construct/locale.cc: Likewise.
2038         * testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
2039         * testsuite/experimental/filesystem/path/construct/string_view.cc:
2040         Likewise.
2041         * testsuite/experimental/filesystem/path/decompose/extension.cc:
2042         Likewise.
2043         * testsuite/experimental/filesystem/path/decompose/filename.cc:
2044         Likewise.
2045         * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
2046         Likewise.
2047         * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
2048         Likewise.
2049         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
2050         Likewise.
2051         * testsuite/experimental/filesystem/path/decompose/root_name.cc:
2052         Likewise.
2053         * testsuite/experimental/filesystem/path/decompose/root_path.cc:
2054         Likewise.
2055         * testsuite/experimental/filesystem/path/decompose/stem.cc: Likewise.
2056         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
2057         Likewise.
2058         * testsuite/experimental/filesystem/path/itr/traversal.cc: Likewise.
2059         * testsuite/experimental/filesystem/path/modifiers/clear.cc: Likewise.
2060         * testsuite/experimental/filesystem/path/modifiers/make_preferred.cc:
2061         Likewise.
2062         * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
2063         Likewise.
2064         * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
2065         Likewise.
2066         * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
2067         Likewise.
2068         * testsuite/experimental/filesystem/path/modifiers/swap.cc: Likewise.
2069         * testsuite/experimental/filesystem/path/native/string.cc: Likewise.
2070         * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
2071         Likewise.
2072         * testsuite/experimental/filesystem/path/query/empty.cc: Likewise.
2073         * testsuite/experimental/filesystem/path/query/has_extension.cc:
2074         Likewise.
2075         * testsuite/experimental/filesystem/path/query/has_filename.cc:
2076         Likewise.
2077         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
2078         Likewise.
2079         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
2080         Likewise.
2081         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
2082         Likewise.
2083         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
2084         Likewise.
2085         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
2086         Likewise.
2087         * testsuite/experimental/filesystem/path/query/has_stem.cc: Likewise.
2088         * testsuite/experimental/filesystem/path/query/is_relative.cc:
2089         Likewise.
2091 2018-04-13  Jonathan Wakely  <jwakely@redhat.com>
2093         * src/c++11/Makefile.am: Fix sed command.
2094         * src/c++11/Makefile.in: Regenerate.
2096         * src/c++11/Makefile.am: Rewrite sed rule to be less fragile and to
2097         handle mangled names starting with double underscores on darwin.
2098         * src/c++11/Makefile.in: Regenerate.
2100 2018-04-12  Jonathan Wakely  <jwakely@redhat.com>
2102         * src/c++11/Makefile.am: Fix comment.
2103         * src/c++11/Makefile.in: Regenerate.
2104         * src/c++11/cxx11-ios_failure.cc: Fix comment.
2105         * src/c++98/ios_failure.cc: Likewise.
2107         * src/c++11/ios.cc: Remove redundant macro definition.
2109 2018-04-11  Jonathan Wakely  <jwakely@redhat.com>
2111         * doc/xml/manual/abi.xml: Document header locations in recent
2112         releases.
2113         * doc/xml/manual/evolution.xml: Add API changes since GCC 5.
2114         * doc/xml/manual/spine.xml: Update copyright years.
2115         * doc/xml/manual/strings.xml: Adjust tolower example to avoid
2116         undefined behaviour.
2117         * doc/xml/manual/test.xml: Update outdated notes on VERIFY in tests.
2118         * doc/html/*: Regenerate.
2120 2018-04-10  Jonathan Wakely  <jwakely@redhat.com>
2122         * doc/xml/faq.xml: Update links to archived copy of SGI STL docs.
2123         * doc/xml/manual/backwards_compatibility.xml: Likewise.
2124         * doc/xml/manual/containers.xml: Likewise.
2125         * doc/xml/manual/debug_mode.xml: Likewise.
2126         * doc/xml/manual/extensions.xml: Likewise.
2127         * doc/xml/manual/policy_data_structures_biblio.xml: Likewise.
2128         * doc/xml/manual/using.xml: Likewise.
2129         * doc/xml/manual/utilities.xml: Likewise.
2131         PR libstdc++/85222
2132         * src/c++11/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
2133         cxx11-ios_failure.cc to rewrite type info for __ios_failure.
2134         * src/c++11/Makefile.in: Regenerate.
2135         * src/c++11/cxx11-ios_failure.cc (__ios_failure, __iosfail_type_info):
2136         New types.
2137         [_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2138         * src/c++11/ios.cc (__throw_ios_failure): Remove definition.
2139         * src/c++98/ios_failure.cc (__construct_ios_failure)
2140         (__destroy_ios_failure, is_ios_failure_handler): New functions.
2141         [!_GLIBCXX_USE_DUAL_ABI] (__throw_ios_failure): Define here.
2142         * testsuite/27_io/ios_base/failure/dual_abi.cc: New.
2143         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
2144         handler types, to always catch std::ios_base::failure.
2145         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
2146         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
2147         exceptions_failbit.cc: Likewise.
2148         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
2149         exceptions_failbit.cc: Likewise.
2150         * testsuite/27_io/basic_istream/extractors_other/char/
2151         exceptions_null.cc: Likewise.
2152         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
2153         exceptions_null.cc: Likewise.
2154         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
2155         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
2156         * testsuite/27_io/basic_ostream/inserters_other/char/
2157         exceptions_null.cc: Likewise.
2158         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
2159         exceptions_null.cc: Likewise.
2160         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
2162 2018-04-05  Jonathan Wakely  <jwakely@redhat.com>
2164         * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): Qualify
2165         __get calls to avoid ADL and avoid ambiguity due to Clang bug.
2167 2018-04-03  Jonathan Wakely  <jwakely@redhat.com>
2169         PR libstdc++/85183
2170         * include/std/variant (_Move_assign_base::operator=): Fix incorrect
2171         value categories.
2172         * testsuite/20_util/variant/85183.cc: New.
2174 2018-03-26  Jonathan Wakely  <jwakely@redhat.com>
2176         * include/std/variant (__get): Qualify calls to avoid ADL.
2177         (__select_index): Adjust whitespace.
2178         (variant): Add using-declaration to workaround Clang bug.
2180 2018-03-22  Jonathan Wakely  <jwakely@redhat.com>
2182         PR libstdc++/85040
2183         * include/bits/stl_function.h (greater::__not_overloaded)
2184         (less::__not_overloaded, greater_equal::__not_overloaded)
2185         (less_equal::__not_overloaded): Fix ambiguous specializations.
2186         * testsuite/20_util/function_objects/comparisons_pointer.cc: Add
2187         tests for type with overloaded operators.
2189 2018-03-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2191         PR libstdc++/77691
2192         * testsuite/experimental/memory_resource/resource_adaptor.cc:
2193         xfail execution on 32-bit Solaris/x86.
2195 2018-03-21  Jonathan Wakely  <jwakely@redhat.com>
2197         * testsuite/20_util/function_objects/comparisons_pointer.cc: Use
2198         VERIFY instead of assert.
2199         * testsuite/20_util/hash/84998.cc: New test.
2200         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc: New
2201         copy of test adjusted for Debug Mode.
2202         * testsuite/23_containers/vector/cons/destructible_neg.cc: Do not run
2203         test in Debug Mode.
2205 2018-03-20  François Dumont  <fdumont@gcc.gnu.org>
2207         PR libstdc++/84998
2208         * include/bits/stl_bvector.h: Fix std::hash friend declaration.
2209         * include/std/bitset: Likewise.
2210         * include/bits/stl_map.h (std::map<>): Fix _Rb_tree_merge_helper friend
2211         declaration.
2212         * include/bits/stl_multimap.h (std::multimap<>): Likewise.
2213         * include/bits/stl_multiset.h (std::multiset<>): Likewise.
2214         * include/bits/stl_set.h (std::set<>): Likewise.
2215         * include/bits/unordered_map.h (std::unordered_map<>): Fix
2216         _Hash_merge_helper friend declaration.
2217         (std::unordered_multimap<>): Likewise.
2218         * include/bits/unordered_set.h (std::unordered_set<>): Likewise.
2219         (std::unordered_multiset<>): Likewise.
2221 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
2223         * doc/xml/api.xml: www.fsf.org has moved to https. Also omit
2224         trailing slash for domain level link.
2225         * doc/xml/faq.xml: Ditto.
2226         * doc/xml/manual/appendix_free.xml (software): Ditto.
2227         * doc/xml/manual/intro.xml: Ditto.
2228         * doc/xml/manual/spine.xml: Ditto.
2229         * doc/xml/spine.xml: Ditto.
2231 2018-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
2233         * doc/xml/manual/documentation_hacking.xml: Adjust link to
2234         docbook.org.
2236 2018-03-17  Jonathan Wakely  <jwakely@redhat.com>
2238         * testsuite/20_util/function_objects/comparisons_pointer.cc: Adjust
2239         to compile as C++98.
2241 2018-03-14  Jonathan Wakely  <jwakely@redhat.com>
2243         PR libstdc++/78420
2244         * include/bits/stl_function.h (greater<_Tp*>, less<_Tp*>)
2245         (greater_equal<_Tp*>, less_equal<_Tp>*): Add partial specializations
2246         to ensure total order for pointers.
2247         (greater<void>, less<void>, greater_equal<void>, less_equal<void>):
2248         Add operator() overloads for pointer arguments and make generic
2249         overloads dispatch to new _S_cmp functions when comparisons would
2250         use built-in operators for pointers.
2251         * testsuite/20_util/function_objects/comparisons_pointer.cc: New.
2253 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
2255         PR libstdc++/84773
2256         PR libstdc++/83662
2257         * crossconfig.m4: Check for aligned_alloc etc. on freebsd and mingw32.
2258         * configure: Regenerate.
2259         * include/c_global/cstdlib [_GLIBCXX_HAVE_ALIGNED_ALLOC]
2260         (aligned_alloc): Add using-declaration.
2261         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: New test.
2263 2018-03-09  François Dumont  <fdumont@gcc.gnu.org>
2265         * python/libstdcxx/v6/printers.py (build_libstdcxx_dictionary):
2266         Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers
2267         registration.
2269 2018-03-09  Jonathan Wakely  <jwakely@redhat.com>
2271         PR libstdc++/84769
2272         * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>):
2273         Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>.
2275         src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
2276         src/filesystem/std-ops.cc (create_dir): Likewise.
2278 2018-03-08  François Dumont  <fdumont@gcc.gnu.org>
2280         * python/libstdcxx/v6/printers.py (NodeIteratorPrinter): New.
2281         (StdListIteratorPrinter): Inherit from latter.
2282         (StdFwdListIteratorPrinter): New, inherit from latter.
2283         (StdDebugIteratorPrinter.to_string): Use non-debug iterator printer
2284         when iterator has no associated container.
2285         (build_libstdcxx_dictionary): Add __gnu_cxx::_Fwd_list_iterator and
2286         __gnu_cxx::_Fwd_list_const_iterator printers. Remove __norm namespace
2287         registrations.
2288         * testsuite/libstdc++-prettyprinters/debug.cc: Adapt.
2289         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Adapt.
2291 2018-03-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
2293         PR libstdc++/84601
2294         * include/std/optional (_Optional_payload): Split into multiple
2295         specializations that can handle different cases of trivial or
2296         non-trivial assignment operators.
2297         * testsuite/20_util/optional/84601.cc: New.
2298         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2300 2018-03-02  Jonathan Wakely  <jwakely@redhat.com>
2302         PR libstdc++/84671
2303         * include/bits/parse_numbers.h (_Number_help): Add partial
2304         specialization to handle digit separators. Adjust partial
2305         specialization for recursion temrination to require _Pow == 1ULL.
2306         * testsuite/20_util/duration/literals/84671.cc: New
2308 2018-02-27  Ville Voutilainen  <ville.voutilainen@gmail.com>
2310         Implement the missing bits of LWG 2769
2311         * include/std/any (any_cast(const any&)): Add static_assert.
2312         (any_cast(any&)): Likewise.
2313         (any_cast(any&&)): Likewise, and remove the handling
2314         for copyable-but-not-movable type.
2315         * testsuite/20_util/any/misc/any_cast.cc: Adjust.
2316         * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise, and
2317         add new tests.
2319 2018-02-23  Jonathan Wakely  <jwakely@redhat.com>
2321         PR libstdc++/84532
2322         * include/std/thread (thread::__make_invoker): Construct tuple
2323         directly instead of using make_tuple.
2324         * testsuite/30_threads/async/84532.cc: New.
2325         * testsuite/30_threads/thread/84532.cc: New.
2327 2018-02-20  François Dumont  <fdumont@gcc.gnu.org>
2329         * include/ext/aligned_buffer.h [_GLIBCXX_INLINE_VERSION]
2330         (template<> __aligned_buffer): Define as __aligned_membuf alias.
2332 2018-02-19  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
2334         PR target/84148
2335         * configure: Regenerate.
2337 2018-02-15  Jonathan Wakely  <jwakely@redhat.com>
2339         PR libstdc++/81797
2340         * configure.ac (INCLUDE_DIR_NOTPARALLEL): Define.
2341         * configure: Regenerate.
2342         * include/Makefile.am (INCLUDE_DIR_NOTPARALLEL): Add .NOTPARALLEL when
2343         defined.
2344         * include/Makefile.in: Regenerate.
2346 2018-01-29  Jonathan Wakely  <jwakely@redhat.com>
2348         PR libstdc++/83833
2349         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc:
2350         Add -ffloat-store to options for m68k and ia32.
2352         * doc/xml/faq.xml: Update copyright years.
2353         * doc/html/*: Regenerate.
2355         PR libstdc++/83658
2356         * include/std/any (any::__do_emplace): Only set _M_manager after
2357         constructing the contained object.
2358         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust dg-error line.
2359         * testsuite/20_util/any/modifiers/83658.cc: New test.
2361 2018-01-25  Jonathan Wakely  <jwakely@redhat.com>
2363         PR libstdc++/81076
2364         * include/c_global/cstddef (__byte_operand): Define primary template.
2365         * testsuite/18_support/byte/81076.cc: New test.
2367 2018-01-19  Christophe Lyon  <christophe.lyon@linaro.org>
2369         * testsuite/ext/special_functions/airy_ai/check_nan.cc: Fix
2370         dg-options and dg-add-options order.
2371         * testsuite/ext/special_functions/airy_bi/check_nan.cc: Likewise.
2372         * testsuite/ext/special_functions/conf_hyperg/check_nan.cc:
2373         Likewise.
2374         * testsuite/ext/special_functions/hyperg/check_nan.cc: Likewise.
2375         * testsuite/special_functions/01_assoc_laguerre/check_nan.cc:
2376         Likewise.
2377         * testsuite/special_functions/02_assoc_legendre/check_nan.cc:
2378         Likewise.
2379         * testsuite/special_functions/03_beta/check_nan.cc: Likewise.
2380         * testsuite/special_functions/04_comp_ellint_1/check_nan.cc:
2381         Likewise.
2382         * testsuite/special_functions/05_comp_ellint_2/check_nan.cc:
2383         Likewise.
2384         * testsuite/special_functions/06_comp_ellint_3/check_nan.cc:
2385         Likewise.
2386         * testsuite/special_functions/06_comp_ellint_3/pr66689.cc:
2387         Likewise.
2388         * testsuite/special_functions/07_cyl_bessel_i/check_nan.cc:
2389         Likewise.
2390         * testsuite/special_functions/08_cyl_bessel_j/check_nan.cc:
2391         Likewise.
2392         * testsuite/special_functions/09_cyl_bessel_k/check_nan.cc:
2393         Likewise.
2394         * testsuite/special_functions/10_cyl_neumann/check_nan.cc:
2395         Likewise.
2396         * testsuite/special_functions/11_ellint_1/check_nan.cc: Likewise.
2397         * testsuite/special_functions/12_ellint_2/check_nan.cc: Likewise.
2398         * testsuite/special_functions/13_ellint_3/check_nan.cc: Likewise.
2399         * testsuite/special_functions/13_ellint_3/pr66689.cc: Likewise.
2400         * testsuite/special_functions/14_expint/check_nan.cc: Likewise.
2401         * testsuite/special_functions/15_hermite/check_nan.cc: Likewise.
2402         * testsuite/special_functions/16_laguerre/check_nan.cc: Likewise.
2403         * testsuite/special_functions/17_legendre/check_nan.cc: Likewise.
2404         * testsuite/special_functions/18_riemann_zeta/check_nan.cc:
2405         Likewise.
2406         * testsuite/special_functions/19_sph_bessel/check_nan.cc:
2407         Likewise.
2408         * testsuite/special_functions/20_sph_legendre/check_nan.cc:
2409         Likewise.
2410         * testsuite/special_functions/21_sph_neumann/check_nan.cc:
2411         Likewise.
2413 2018-01-18  Uros Bizjak  <ubizjak@gmail.com>
2415         * configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
2416         include linux/types.h when checking linux/random.h header.
2417         * config.h.in: Regenerate.
2418         * configure: Ditto.
2419         * src/c++11/random.cc: Conditionally include linux/types.h.
2421 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
2423         * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux.
2425 2018-01-16  Jonathan Wakely  <jwakely@redhat.com>
2427         PR libstdc++/83834
2428         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Replace std::c[a-g]* wildcard
2429         pattern with exact match for std::cerr.
2431 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
2433         PR libstdc++/83833
2434         * include/bits/random.h (chi_squared_distribution::param): Update
2435         gamma distribution parameter.
2436         * testsuite/26_numerics/random/chi_squared_distribution/83833.cc: New
2437         test.
2439         PR libstdc++/83830
2440         * include/std/type_traits (has_unique_object_representations_v): Add
2441         variable template.
2442         * testsuite/20_util/has_unique_object_representations/value.cc: Check
2443         variable template.
2445 2018-01-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
2447         Make optional conditionally
2448         trivially_{copy,move}_{constructible,assignable}
2449         * include/std/optional (_Optional_payload): Fix the comment in
2450         the class head and turn into a primary and one specialization.
2451         (_Optional_payload::_M_engaged): Strike the NSDMI.
2452         (_Optional_payload<_Tp, false>::operator=(const _Optional_payload&)):
2453         New.
2454         (_Optional_payload<_Tp, false>::operator=(_Optional_payload&&)):
2455         Likewise.
2456         (_Optional_payload<_Tp, false>::_M_get): Likewise.
2457         (_Optional_payload<_Tp, false>::_M_reset): Likewise.
2458         (_Optional_base_impl): Likewise.
2459         (_Optional_base): Turn into a primary and three specializations.
2460         (optional(nullopt)): Change the base init.
2461         * testsuite/20_util/optional/assignment/8.cc: New.
2462         * testsuite/20_util/optional/cons/trivial.cc: Likewise.
2463         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
2465 2018-01-15  Jonathan Wakely  <jwakely@redhat.com>
2467         PR libstdc++/80276
2468         * python/libstdcxx/v6/printers.py (strip_inline_namespaces): New.
2469         (get_template_arg_list): New.
2470         (StdVariantPrinter._template_args): Remove, use get_template_arg_list
2471         instead.
2472         (TemplateTypePrinter): Rewrite to work with gdb.Type objects instead
2473         of strings and regular expressions.
2474         (add_one_template_type_printer): Adapt to new TemplateTypePrinter.
2475         (FilteringTypePrinter): Add docstring. Match using startswith. Use
2476         strip_inline_namespaces instead of strip_versioned_namespace.
2477         (add_one_type_printer): Prepend namespace to match argument.
2478         (register_type_printers): Add type printers for char16_t and char32_t
2479         string types and for types using cxx11 ABI. Update calls to
2480         add_one_template_type_printer to provide default argument dicts.
2481         * testsuite/libstdc++-prettyprinters/80276.cc: New test.
2482         * testsuite/libstdc++-prettyprinters/whatis.cc: Remove tests for
2483         basic_string<unsigned char> and basic_string<signed char>.
2484         * testsuite/libstdc++-prettyprinters/whatis2.cc: Duplicate whatis.cc
2485         to test local variables, without overriding _GLIBCXX_USE_CXX11_ABI.
2487 2018-01-14  Andreas Schwab  <schwab@linux-m68k.org>
2489         PR libstdc++/81092
2490         * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
2492 2018-01-13  Tim Shen  <timshen@google.com>
2494         PR libstdc++/83601
2495         * include/bits/regex.tcc (regex_replace): Fix escaping in sed.
2496         * testsuite/28_regex/algorithms/regex_replace/char/pr83601.cc: Tests.
2497         * testsuite/28_regex/algorithms/regex_replace/wchar_t/pr83601.cc: Tests.
2499 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2501         PR libstdc++/64054
2502         * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
2503         Remove dg-xfail-run-if.
2505 2018-01-10  François Dumont  <fdumont@gcc.gnu.org>
2507         * include/bits/forward_list.h
2508         (_Fwd_list_node_base(_Fwd_list_node_base&&)): New.
2509         (_Fwd_list_node_base& operator=(_Fwd_list_node_base&&)): New.
2510         (_Fwd_list_node_base(const _Fwd_list_node_base&)): Explicit delete.
2511         (_Fwd_list_node_base& operator=(const _Fwd_list_node_base&)): Likewise.
2512         (_Fwd_list_impl()): Add noexcept qualification.
2513         (_Fwd_list_impl(const _Node_alloc_type&)): Delete.
2514         (_Fwd_list_impl(_Fwd_list_impl&&)): New, default.
2515         (_Fwd_list_impl(_Fwd_list_impl&&, _Node_alloc_type&&)): New.
2516         (_Fwd_list_base()): Default.
2517         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&, true_type)): New.
2518         (_Fwd_list_base(_Fwd_list_base&&)): Default.
2519         (forward_list<>()): Default.
2520         (forward_list<>(forward_list&&)): Default.
2521         (forward_list(forward_list&&, _Node_alloc_type&&, false_type)): New.
2522         (forward_list(forward_list&&, _Node_alloc_type&&, true_type)): New.
2523         (forward_list(forward_list&&, const _Alloc&)): Adapt to use latters.
2524         * include/bits/forward_list.tcc
2525         (_Fwd_list_base(_Fwd_list_base&&, _Node_alloc_type&&)): Adapt to use
2526         _M_impl._M_head move assignment.
2527         (forward_list<>::merge(forward_list<>&&, _Comp)): Likewise.
2528         * testsuite/23_containers/forward_list/allocator/default_init.cc: New.
2530 2018-01-09  Jonathan Wakely  <jwakely@redhat.com>
2532         PR libstdc++/80276
2533         * python/libstdcxx/v6/printers.py (SharedPointerPrinter)
2534         (UniquePointerPrinter): Print correct template argument, not type of
2535         the pointer.
2536         (TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
2537         a type.
2538         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
2539         array type.
2540         * testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
2541         weak_ptr of array types.
2543 2018-01-09  François Dumont  <fdumont@gcc.gnu.org>
2545         PR libstdc++/83709
2546         * include/bits/hashtable_policy.h
2547         (__distance_fwd(_Iterator, _Iterator, input_iterator_tag)): Return 1 if
2548         __first != __last.
2549         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, true_type)): New.
2550         (_Insert_base::_M_insert_range(_Ite, _Ite, _NodeGetter, false_type)):
2551         Add false_type parameter.
2552         (_Insert_base::insert): Adapt.
2553         * include/bits/hashtable.h (_Hashtable::operator=(initializzr_list<>)):
2554         Adapt.
2555         (_Hashtable::_M_insert(_Arg&&, const _NodeGen&, true_type, size_t)):
2556          Add __n_elt parameter, defaulted to 1.
2557         (_Hashtable::_M_insert_unique_node): Likewise. Use it to call rehash
2558         policy _M_need_rehash.
2559         (_Hashtable::_M_merge_unique): Pass target number of elements to add to
2560         produce only 1 rehash if necessary.
2561         * testsuite/23_containers/unordered_map/insert/83709.cc: New.
2562         * testsuite/23_containers/unordered_set/insert/83709.cc: New.
2564 2018-01-09  Juraj Oršulić  <juraj.orsulic@fer.hr>
2565             Jonathan Wakely  <jwakely@redhat.com>
2567         PR libstdc++/59253 (partial)
2568         * python/libstdcxx/v6/printers.py (SmartPtrIterator): Common iterator
2569         type for pointer stored by shared_ptr, weak_ptr and unique_ptr.
2570         (SharedPointerPrinter, UniquePointerPrinter): Treat stored values as
2571         children.
2572         * testsuite/libstdc++-prettyprinters/cxx11.cc: Update expected output
2573         of unique_ptr printer.
2574         * testsuite/libstdc++-prettyprinters/shared_ptr.cc: Update expected
2575         output of shared_ptr printer.
2577 2018-01-05  Jonathan Wakely  <jwakely@redhat.com>
2579         PR libstdc++/83626
2580         * src/filesystem/ops.cc (remove(const path&, error_code&)): Remove
2581         unnecessary symlink_status call.
2582         (remove_all(const path&, error_code&)): Use filesystem::remove.
2583         * src/filesystem/std-ops.cc: Likewise.
2585         PR libstdc++/83279
2586         * src/filesystem/std-ops.cc  (do_copy_file): Use non-null offset with
2587         sendfile.
2589         PR libstdc++/83626
2590         * src/filesystem/ops.cc (remove(const path&, error_code&)): Do not
2591         report an error for ENOENT.
2592         (remove_all(const path&)): Fix type of result variable.
2593         (remove_all(const path&, error_code&)): Use non-throwing increment
2594         for directory iterator. Call POSIX remove directly to avoid redundant
2595         calls to symlink_status. Do not report errors for ENOENT.
2596         * src/filesystem/std-ops.cc: Likewise.
2597         * testsuite/27_io/filesystem/operations/remove_all.cc: Test throwing
2598         overload.
2599         * testsuite/experimental/filesystem/operations/remove_all.cc:
2600         Likewise.
2602 2018-01-04  Jonathan Wakely  <jwakely@redhat.com>
2604         PR libstdc++/83626
2605         * src/filesystem/ops.cc (remove(const path&, error_code&))): Remove
2606         redundant call to ec.clear().
2607         (remove_all(const path&, error_code&))): Do not return an error for
2608         non-existent paths.
2609         * src/filesystem/std-ops.cc: Likewise.
2610         * testsuite/27_io/filesystem/operations/remove.cc: New test.
2611         * testsuite/27_io/filesystem/operations/remove_all.cc: Fix expected
2612         results for non-existent paths.
2613         * testsuite/experimental/filesystem/operations/remove.cc: New test.
2614         * testsuite/experimental/filesystem/operations/remove_all.cc: Fix
2615         expected results for non-existent paths.
2617         * include/bits/fs_ops.h (exists(const path&, error_code&))): Only
2618         check status_known once.
2619         * include/experimental/bits/fs_ops.h: Likewise.
2621         PR libstdc++/83607
2622         * include/std/functional (__is_byte_like): New trait.
2623         (__is_std_equal_to): Remove.
2624         (__boyer_moore_base_t): Use __is_byte_like instead of
2625         __is_std_equal_to.
2626         * include/experimental/functional (__is_std_equal_to): Remove.
2627         (__boyer_moore_base_t): Use __is_byte_like instead of
2628         __is_std_equal_to.
2629         * testsuite/20_util/function_objects/83607.cc: New test.
2631 2018-01-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
2633         Protect optional's deduction guide with the feature macro
2634         * include/std/optional: Use the feature macro.
2636 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
2638         Update copyright years.
2640 Copyright (C) 2018 Free Software Foundation, Inc.
2642 Copying and distribution of this file, with or without modification,
2643 are permitted in any medium without royalty provided the copyright
2644 notice and this notice are preserved.