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