PR c++/80244 - ICE with attribute in template alias.
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob3f836d2c673a7493efada176256afbc600a2f721
1 2017-04-12  Gerald Pfeifer  <gerald@pfeifer.com>
3         * doc/xml/faq.xml: Update reference link to C++ ABI for Itanium.
4         * doc/xml/manual/abi.xml. Ditto (thrice).
6 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
8         * doc/xml/manual/status_cxx2017.xml: Remove duplicate table entry.
9         * doc/html/*: Regenerate.
11         * testsuite/20_util/reference_wrapper/invoke.cc: Uncomment tests
12         that no longer fail.
14         * include/bits/ios_base.h: Correct comment.
15         * testsuite/util/testsuite_hooks.h: Likewise.
17         * doc/xml/manual/status_cxx2017.xml: Update C++17 status table.
18         * doc/xml/manual/appendix_contributing.xml (contrib.organization): Add
19         directories for debug, parallel and profile headers.
20         * doc/html/*: Regenerate.
22         * include/bits/char_traits.h (__gnu_cxx::char_traits): Add
23         _GLIBCXX14_CONSTEXPR on assign, compare, find, and length.
24         (std::char_traits<char>, std::char_traits<wchar_t>): Add
25         _GLIBCXX17_CONSTEXPR on assign.
26         (std::char_traits<char16_t>, std::char_traits<char32_t>): Add
27         _GLIBCXX17_CONSTEXPR on assign, compare, find, and length.
28         * testsuite/21_strings/char_traits/requirements/
29         constexpr_functions_c++17.cc: New test.
31 2017-04-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
33         PR libstdc++/79141
34         * include/bits/stl_pair.h (__nonesuch_no_braces): New.
35         (operator=(typename conditional<
36         __and_<is_copy_assignable<_T1>,
37         is_copy_assignable<_T2>>::value,
38         const pair&, const __nonesuch&>::type)): Change __nonesuch
39         to __nonesuch_no_braces.
40         (operator=(typename conditional<
41         __not_<__and_<is_copy_assignable<_T1>,
42         is_copy_assignable<_T2>>>::value,
43         const pair&, const __nonesuch&>::type)): Likewise.
44         (operator=(typename conditional<
45         __and_<is_move_assignable<_T1>,
46         is_move_assignable<_T2>>::value,
47         pair&&, __nonesuch&&>::type)): Likewise.
48         * testsuite/20_util/pair/79141.cc: New.
50 2017-04-03  Ville Voutilainen  <ville.voutilainen@gmail.com>
52         Implement std::is_aggregate.
53         * include/std/type_traits (is_aggregate, is_aggregate_v): New.
54         * testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
55         New.
56         * testsuite/20_util/is_aggregate/requirements/typedefs.cc: Likewise.
57         * testsuite/20_util/is_aggregate/value.cc: Likewise.
59 2017-03-29  Ville Voutilainen  <ville.voutilainen@gmail.com>
61         Adjust optional's pretty printer for LWG 2900.
62         * python/libstdcxx/v6/printers.py (StdExpOptionalPrinter.__init__):
63         Look at the nested payload in case of non-experimental optional.
65 2017-03-29  Ville Voutilainen  <ville.voutilainen@gmail.com>
67         Implement LWG 2900, The copy and move constructors
68         of optional are not constexpr.
69         * include/std/optional (_Optional_payload): New.
70         (_Optional_base): Remove the bool parameter.
71         (_Optional_base<_Tp, false>): Remove.
72         (_Optional_base()): Adjust.
73         (_Optional_base(nullopt_t)): Likewise.
74         (_Optional_base(in_place_t, _Args&&...)): Likewise.
75         (_Optional_base(in_place_t, initializer_list<_Up>, _Args&&...)):
76         Likewise.
77         (_Optional_base(const _Optional_base&)): Likewise.
78         (_Optional_base(_Optional_base&&)): Likewise.
79         (operator=(const _Optional_base&)): Likewise.
80         (operator=(_Optional_base&&)): Likewise.
81         (~_Optional_base()): Remove.
82         (_M_is_engaged()): Adjust.
83         (_M_get()): Likewise.
84         (_M_construct(_Args&&...)): Likewise.
85         (_M_destruct()): Likewise.
86         (_M_reset()): Likewise.
87         (_Optional_base::_Empty_byte): Remove.
88         (_Optional_base::_M_empty): Remove.
89         (_Optional_base::_M_payload): Adjust.
90         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
91         * testsuite/20_util/optional/constexpr/cons/value.cc: Add tests.
93 2017-03-28  Jonathan Wakely  <jwakely@redhat.com>
95         PR libstdc++/80137
96         * include/bits/random.tcc (generate_canonical): Use std::nextafter
97         or numeric_limits::epsilon() to reduce out-of-range values.
98         * testsuite/26_numerics/random/uniform_real_distribution/operators/
99         64351.cc: Verify complexity requirement is met.
101         * doc/xml/manual/abi.xml: Add xml:id anchor.
102         * doc/xml/manual/using.xml (manual.intro.using.macros): Document
103         _GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes.
104         (concurrency.io.structure): Add markup.
105         * doc/html/*: Regenerate.
107         PR libstdc++/80229
108         * include/bits/shared_ptr_base.h
109         (__shared_ptr::_M_enable_shared_from_this_with): Change parameters to
110         non-const and then use remove_cv to get unqualified type.
111         * testsuite/20_util/enable_shared_from_this/members/const.cc: Don't
112         cast away constness on object created const.
113         * testsuite/20_util/shared_ptr/cons/80229.cc: New test.
115 2017-03-26  Markus Trippelsdorf  <markus@trippelsdorf.de>
117         PR libstdc++/80183
118         * include/bits/stl_tree.h:
119         (_Rb_tree_header::_M_move_data(_Rb_tree_header&)): Also save _M_color.
121 2017-03-23  Jonathan Wakely  <jwakely@redhat.com>
123         * testsuite/23_containers/array/tuple_interface/
124         tuple_element_debug_neg.cc: Adjust dg-error.
125         * testsuite/23_containers/list/operations/78389.cc: Fix less-than to
126         define a valid strict weak ordering.
127         * testsuite/23_containers/priority_queue/67085.cc: Disable test for
128         Debug Mode, due to debug checks making extra copies of predicate.
129         * testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc:
130         Likewise.
132         * doc/xml/faq.xml: Add link.
133         * doc/xml/manual/backwards_compatibility.xml: Remove outdated
134         information on pre-ISO headers. Replace broken link to C++ FAQ Lite.
135         * doc/xml/manual/io.xml: Update broken link.
136         * doc/html/*: Regenerate.
138 2017-03-23  Daniel Kruegler  <daniel.kruegler@gmail.com>
140         Implement LWG 2686, Why is std::hash specialized for error_code,
141         but not error_condition?
142         * include/std/system_error (hash<error_condition>): Define for C++17.
143         * testsuite/20_util/hash/operators/size_t.cc (hash<error_condition>):
144         Instantiate test for error_condition.
145         * testsuite/20_util/hash/requirements/explicit_instantiation.cc
146         (hash<error_condition>): Instantiate hash<error_condition>.
148         * include/bits/c++config (_GLIBCXX17_INLINE): Define.
149         * include/bits/regex_constants.h (All std::regex_constants constants):
150         Add _GLIBCXX17_INLINE as per P0607R0.
151         * include/bits/std_mutex.h (defer_lock, try_to_lock, adopt_lock):
152         Likewise.
153         * include/bits/stl_pair.h (piecewise_construct): Likewise.
154         * include/bits/uses_allocator.h (allocator_arg, uses_allocator_v)
155         (__is_uses_allocator_constructible_v)
156         (__is_nothrow_uses_allocator_constructible_v): Likewise.
157         * include/std/chrono (treat_as_floating_point_v): Likewise.
158         * include/std/functional (is_bind_expression_v, is_placeholder_v):
159         Likewise.
160         * include/std/optional (nullopt): Likewise.
161         * include/std/ratio (ratio_equal_v, ratio_not_equal_v, ratio_less_v)
162         ratio_less_equal_v, ratio_greater_v, ratio_greater_equal_v): Likewise.
163         * include/std/system_error (is_error_code_enum_v)
164         (is_error_condition_enum_v): Likewise.
165         * include/std/tuple (tuple_size_v, ignore): Likewise.
166         (ignore): Declare ignore constexpr as per LWG 2773, declare assignment
167         constexpr as per LWG 2933.
168         * include/std/type_traits (All variable templates): Add
169         _GLIBCXX17_INLINE as per P0607R0.
170         * include/std/variant (variant_size_v, variant_npos, __index_of_v)
171         (__tuple_count_v, __exactly_once): Likewise.
172         * testsuite/18_support/headers/new/synopsis.cc
173         (hardware_destructive_interference_size)
174         (hardware_constructive_interference_size): Likewise for commented-out
175         variables.
176         * testsuite/20_util/tuple/creation_functions/constexpr.cc: Add new
177         test function for constexpr std::ignore (LWG 2773).
178         * testsuite/20_util/tuple/creation_functions/constexpr_cpp14.cc: New
179         test for LWG 2933.
181 2017-03-22  Jonathan Wakely  <jwakely@redhat.com>
183         * include/bits/shared_ptr.h (shared_ptr, weak_ptr): Add deduction
184         guides for C++17.
185         * include/bits/std_function.h (function): Likewise.
186         * include/bits/stl_pair.h (pair): Likewise.
187         * include/debug/array (__gnu_debug::array): Likewise.
188         * include/std/array (array): Likewise.
189         * include/std/functional (make_default_searcher)
190         (make_boyer_moore_searcher, make_boyer_moore_horspool_searcher):
191         Remove generator functions.
192         * include/std/tuple (tuple): Add deduction guides.
193         * include/std/valarray (valarray): Likewise.
194         * testsuite/20_util/function_objects/searchers.cc: Adjust to use
195         class template argument deduction instead of generator functions.
196         * testsuite/20_util/function/cons/deduction.cc: New test.
197         * testsuite/20_util/optional/cons/deduction_guide.cc: Rename to ...
198         * testsuite/20_util/optional/cons/deduction.cc: ... here.
199         * testsuite/20_util/pair/cons/deduction.cc: New test.
200         * testsuite/20_util/shared_ptr/cons/deduction.cc: New test.
201         * testsuite/20_util/tuple/cons/deduction.cc: New test.
202         * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust dg-error.
203         * testsuite/20_util/unique_ptr/cons/deduction_neg.cc: New test.
204         * testsuite/20_util/weak_ptr/cons/deduction.cc: New test.
205         * testsuite/23_containers/array/cons/deduction.cc: New test.
206         * testsuite/23_containers/array/cons/deduction_neg.cc: New test.
207         * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
208         Adjust dg-error.
209         * testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
210         * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
211         Likewise.
212         * testsuite/26_numerics/valarray/deduction.cc: New test.
213         * testsuite/30_threads/lock_guard/cons/deduction.cc: New test.
214         * testsuite/30_threads/scoped_lock/cons/deduction.cc: New test.
215         * testsuite/30_threads/unique_lock/cons/deduction.cc: New test.
217 2017-03-20  François Dumont  <fdumont@gcc.gnu.org>
219         * include/bits/stl_deque.h (deque): Access allocator value_type only if
220         concept checks are enabled.
221         * include/bits/stl_stack.h (stack): Likewise.
222         * include/bits/stl_vector.h (vector): Likewise.
223         * include/bits/stl_list.h (list): Likewise and check
224         _SGIAssignableConcept only in C++03.
225         * include/bits/stl_map.h (map): Likewise.
226         * include/bits/stl_set.h (set): Likewise.
227         * include/bits/stl_multimap.h (multimap): Likewise.
228         * include/bits/stl_multiset.h (multiset): Likewise.
229         * include/bits/stl_queue.h (queue, priority_queue): Likewise.
231 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
233         * doc/xml/manual/appendix_contributing.xml: Convert link to
234         ansi.org to https.
235         Update link to the C++ standard at ansi.org.
237         * doc/xml/faq.xml: Remove information redundant with the above;
238         instead add a reference.
240 2017-03-17  Jonathan Wakely  <jwakely@redhat.com>
242         * src/c++11/codecvt.cc (range): Add non-type template parameter and
243         define oerloaded operators for reading and writing code units.
244         (range<Elem, false>): Define partial specialization for accessing
245         wide characters in potentially unaligned byte ranges.
246         (ucs2_span(const char16_t*, const char16_t*, ...))
247         (ucs4_span(const char16_t*, const char16_t*, ...)): Change parameters
248         to range<const char16_t, false> in order to avoid unaligned reads.
249         (__codecvt_utf16_base<char16_t>::do_out)
250         (__codecvt_utf16_base<char32_t>::do_out)
251         (__codecvt_utf16_base<wchar_t>::do_out): Use range specialization for
252         unaligned data to avoid unaligned writes.
253         (__codecvt_utf16_base<char16_t>::do_in)
254         (__codecvt_utf16_base<char32_t>::do_in)
255         (__codecvt_utf16_base<wchar_t>::do_in): Likewise for writes. Return
256         error if there are unprocessable trailing bytes.
257         (__codecvt_utf16_base<char16_t>::do_length)
258         (__codecvt_utf16_base<char32_t>::do_length)
259         (__codecvt_utf16_base<wchar_t>::do_length): Pass arguments of type
260         range<const char16_t, false> to span functions.
261         * testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc: New test.
263 2017-03-16  Jonathan Wakely  <jwakely@redhat.com>
265         PR libstdc++/79980
266         * src/c++11/codecvt.cc (to_integer(codecvt_mode)): Fix target type.
268         PR libstdc++/80041
269         * src/c++11/codecvt.cc (__codecvt_utf16_base<wchar_t>::do_out)
270         (__codecvt_utf16_base<wchar_t>::do_in): Convert char arguments to
271         char16_t to work with UTF-16 instead of UTF-8.
272         * testsuite/22_locale/codecvt/codecvt_utf16/80041.cc: New test.
274         * src/c++11/codecvt.cc (codecvt<char16_t, char, mbstate_t>)
275         (codecvt<char32_t, char, mbstate_t>, __codecvt_utf8_base<char16_t>)
276         (__codecvt_utf8_base<char32_t>, __codecvt_utf8_base<wchar_t>)
277         (__codecvt_utf16_base<char16_t>, __codecvt_utf16_base<char32_t>)
278         (__codecvt_utf16_base<wchar_t>, __codecvt_utf8_utf16_base<char16_t>)
279         (__codecvt_utf8_utf16_base<char32_t>)
280         (__codecvt_utf8_utf16_base<wchar_t>): Fix do_encoding() and
281         do_max_length() return values.
282         * testsuite/22_locale/codecvt/codecvt_utf16/members.cc: New test.
283         * testsuite/22_locale/codecvt/codecvt_utf8/members.cc: New test.
284         * testsuite/22_locale/codecvt/codecvt_utf8_utf16/members.cc: New test.
286         PR libstdc++/79980
287         * include/bits/locale_conv.h (__do_str_codecvt): Set __count on
288         error path.
289         * src/c++11/codecvt.cc (operator&=, operator|=, operator~): Overloads
290         for manipulating codecvt_mode values.
291         (read_utf16_bom): Compare input to BOM constants instead of integral
292         constants that depend on endianness.  Take mode parameter by
293         reference and adjust it, to distinguish between no BOM present and
294         UTF-16BE BOM present.
295         (ucs4_in, ucs2_span, ucs4_span): Adjust calls to read_utf16_bom.
296         (surrogates): New enumeration type.
297         (utf16_in, utf16_out): Add surrogates parameter to choose between
298         UTF-16 and UCS2 behaviour.
299         (utf16_span, ucs2_span): Use std::min not std::max.
300         (ucs2_out): Use std::min not std::max.  Disallow surrogate pairs.
301         (ucs2_in): Likewise. Adjust calls to read_utf16_bom.
302         * testsuite/22_locale/codecvt/codecvt_utf16/79980.cc: New test.
303         * testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: New test.
305         PR libstdc++/79511
306         * src/c++11/codecvt.cc (write_utf16_code_point): Don't write 0xffff
307         as a surrogate pair.
308         (__codecvt_utf8_utf16_base<char32_t>::do_in): Use native endianness
309         for internal representation.
310         (__codecvt_utf8_utf16_base<wchar_t>::do_in): Likewise.
311         * testsuite/22_locale/codecvt/codecvt_utf8_utf16/79511.cc: New test.
313         PR libstdc++/80064
314         * include/bits/stl_heap.h (__is_heap, push_heap, __adjust_heap)
315         (pop_heap, make_heap, sort_heap, is_heap_until, is_heap): Cope with
316         invalid instantiations using function types for _Compare argument.
317         * testsuite/25_algorithms/make_heap/80064.cc: New test.
319         PR libstdc++/67440
320         * python/libstdcxx/v6/printers.py (find_type): Avoid gdb.Type.name
321         for GDB 7.6 compatibility, use gdb.Type.unqualified instead.
323 2017-03-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
325         Implement LWG 2857, {variant,optional,any}::emplace should
326         return the constructed value.
327         * include/std/any (emplace(_Args&&...)): Change the return type and
328         return a reference to the constructed value.
329         (emplace(initializer_list<_Up>, _Args&&...)): Likewise.
330         * include/std/optional (emplace(_Args&&...)): Likewise.
331         (emplace(initializer_list<_Up>, _Args&&...)): Likewise.
332         * include/std/variant (emplace<_Tp>(_Args&&...)): Likewise.
333         (emplace<_Tp>(initializer_list<_Up>, _Args&&...)): Likewise.
334         (emplace<_Np>(_Args&&...)): Likewise.
335         (emplace<_Np>(initializer_list<_Up>, _Args&&...)): Likewise.
336         * testsuite/20_util/any/assign/emplace.cc: Add tests for
337         checking the return value of emplace.
338         * testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.
339         * testsuite/20_util/optional/assignment/6.cc: Add tests for
340         checking the return value of emplace.
341         * testsuite/20_util/variant/run.cc: Likewise.
343 2017-03-15  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
345         PR libstdc++/62045
346         * include/ext/pb_ds/qdetail/binary_heap_/binary_heap_.hpp
347         (is_heap): Remove.
348         (push_heap): Remove the wrong checking using is_heap.
349         (make_heap): Remove the assertion using is_heap.
350         * include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp
351         (modify): Ditto.
352         (resize_for_insert_if_needed): Add PB_DS_ASSERT_VALID after
353         calling make_heap.
355 2017-03-15  Jonathan Wakely  <jwakely@redhat.com>
357         PR libstdc++/62045
358         * testsuite/ext/pb_ds/regression/priority_queue_binary_heap-62045.cc:
359         New test.
360         * testsuite/ext/pb_ds/regression/priority_queues.cc: Fix copy&paste
361         error in comment.
363 2017-03-15  Jonathan Wakely  <jwakely@redhat.com>
365         * acinclude.m4 (GLIBCXX_CHECK_S_ISREG_OR_S_IFREG): Fix typo in
366         comment.
367         * config.h.in: Regenerate.
368         * configure: Regenerate.
369         * doc/Makefile.in: Regenerate.
371 2017-03-14  Jonathan Wakely  <jwakely@redhat.com>
373         PR libstdc++/79162
374         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
375         (basic_string<C,T,A>::operator=(basic_string_view<C,T>)): Replace
376         with a constrained template.
377         [!_GLIBCXX_USE_CXX11_ABI]
378         (basic_string<C,T,A>::operator=(basic_string_view<C,T>)): Likewise.
379         * testsuite/21_strings/basic_string/cons/char/79162.cc: New test.
380         * testsuite/21_strings/basic_string/cons/wchar_t/79162.cc: New test.
382 2017-03-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
384         PR libstdc++/80034
385         * include/bits/list.tcc (merge(list&&)): Use const for the size_t
386         in the catch-block.
387         (merge(list&&, _StrictWeakOrdering)): Likewise.
388         * testsuite/23_containers/list/operations/80034.cc: New.
390 2017-03-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
392         Implement LWG 2806, Base class of bad_optional_access.
393         * include/std/optional (bad_optional_access):
394         Derive from std::exception.
395         (bad_optional_access::bad_optional_access): Adjust.
396         (bad_optional_access::what): New.
397         (__throw_bad_optional_access(const char*)):
398         Remove the parameter and adjust calls.
399         * testsuite/20_util/optional/cons/value_neg.cc: Adjust.
400         * testsuite/20_util/optional/typedefs.cc: Likewise.
402 2017-03-12  Ville Voutilainen  <ville.voutilainen@gmail.com>
404         Implement LWG 2934, optional<const T> doesn't compare with T.
405         * include/std/optional
406         (operator==(const optional<_Tp>&, const optional<_Tp>&)):
407         Turn into operator==(const optional<_Tp>&, const optional<_Up>&).
408         (operator!=(const optional<_Tp>&, const optional<_Tp>&)):
409         Turn into operator!=(const optional<_Tp>&, const optional<_Up>&).
410         (operator<(const optional<_Tp>&, const optional<_Tp>&)):
411         Turn into operator<(const optional<_Tp>&, const optional<_Up>&.
412         (operator>(const optional<_Tp>&, const optional<_Tp>&)):
413         Turn into operator>(const optional<_Tp>&, const optional<_Up>&.
414         (operator<=(const optional<_Tp>&, const optional<_Tp>&)):
415         Turn into operator<=(const optional<_Tp>&, const optional<_Up>&).
416         (operator>=(const optional<_Tp>&, const optional<_Tp>&)):
417         Turn into operator>=(const optional<_Tp>&, const optional<_Up>&).
418         (operator==(const optional<_Tp>&, const _Tp&)):
419         Turn into operator==(const optional<_Tp>&, const _Up&).
420         (operator==(const _Tp&, const optional<_Tp>&)):
421         Turn into operator==(const _Up&, const optional<_Tp>&).
422         (operator!=(const optional<_Tp>&, const _Tp&)):
423         Turn into operator!=(const optional<_Tp>&, const _Up&).
424         (operator!=(const _Tp&, const optional<_Tp>&)):
425         Turn into operator!=(const _Up&, const optional<_Tp>&).
426         (operator<(const optional<_Tp>&, const _Tp&)):
427         Turn into operator<(const optional<_Tp>&, const _Up&).
428         (operator<(const _Tp&, const optional<_Tp>&)):
429         Turn into operator<(const _Up&, const optional<_Tp>&).
430         (operator>(const optional<_Tp>&, const _Tp&)):
431         Turn into operator>(const optional<_Tp>&, const _Up&).
432         (operator>(const _Tp&, const optional<_Tp>&)):
433         Turn into operator>(const _Up&, const optional<_Tp>&).
434         (operator<=(const optional<_Tp>&, const _Tp&)):
435         Turn into operator<=(const optional<_Tp>&, const _Up&).
436         (operator<=(const _Tp&, const optional<_Tp>&)):
437         Turn into operator<=(const _Up&, const optional<_Tp>&).
438         (operator>=(const optional<_Tp>&, const _Tp&)):
439         Turn into operator>=(const optional<_Tp>&, const _Up&).
440         (operator>=(const _Tp&, const optional<_Tp>&)):
441         Turn into operator>=(const _Up&, const optional<_Tp>&).
442         * testsuite/20_util/optional/relops/7.cc: New.
444 2017-03-10  Jonathan Wakely  <jwakely@redhat.com>
446         * testsuite/17_intro/names.cc: Undefine macros that clash with
447         identifiers in AIX system headers.
449         * include/bits/invoke.h (__invoke): Use __invoke_result instead of
450         result_of, and __is_nothrow_invocable instead of
451         __is_nothrow_callable.
452         * include/bits/shared_ptr_base.h (__shared_ptr): Use __is_invocable
453         instead of __is_callable.
454         * include/std/functional (invoke): use invoke_result_t instead of
455         result_of_t and is_nothrow_invocable instead of is_nothrow_callable.
456         (_Not_fn): Use __invoke_result instead of result_of.
457         * include/std/type_traits (__result_of_memobj, __result_of_memfun):
458         Remove partial specializations for reference_wrapper types.
459         (__result_of_impl): Use __inv_unwrap to strip reference_wrapper.
460         (__invoke_result): Define replacement for result_of and then use it to
461         define result_of.
462         (__is_callable_impl, __is_callable, __is_nothrow_callable): Replace
463         with __is_invocable_impl, __is_invocable, and __is_nothrow_invocable
464         respectively.
465         (invoke_result, invoke_result_t): Define for C++17.
466         (is_callable, is_nothrow_callable): Replace with is_invocable,
467         is_invocable_r, is_nothrow_invocable, and is_nothrow_invocable_r.
468         (is_callable_v, is_nothrow_callable_v): Replace with is_invocable_v,
469         is_invocable_r_v, is_nothrow_invocable_v, and is_nothrow_invocable_r_v.
470         * include/std/variant (hash<variant<T...>>): Use is_nothrow_invocable_v
471         instead of is_nothrow_callable_v.
472         * testsuite/20_util/function_objects/invoke/59768.cc: Remove unused
473         main function.
474         * testsuite/20_util/function_objects/not_fn/1.cc: Use is_invocable
475         instead of is_callable.
476         * testsuite/20_util/is_callable/*: Rename directory and adjust tests
477         to use new traits.
478         * testsuite/20_util/is_nothrow_callable/*: Likewise.
479         * testsuite/20_util/optional/hash.cc: Use is_invocable_v instead of
480         is_callable.
481         * testsuite/20_util/variant/hash.cc: Likewise.
483 2017-03-10  George Lander  <george.lander@arm.com>
485         * acinclude.m4 (glibcxx_cv_obsolete_isnan): Define
486         _GLIBCXX_INCLUDE_NEXT_C_HEADERS before including math.h.
487         * configure: Regenerate.
489 2017-03-09  Jonathan Wakely  <jwakely@redhat.com>
491         * include/std/functional (_Not_fn): Define macro to simplify
492         repetitive function definitions.
494         * doc/xml/manual/status_cxx2017.xml: Document std::byte support.
495         * include/c_global/cstddef (std::byte): Define for C++17.
496         * testsuite/18_support/byte/global_neg.cc: New test.
497         * testsuite/18_support/byte/ops.cc: New test.
498         * testsuite/18_support/byte/requirements.cc: New test.
500 2017-03-05  Jonathan Wakely  <jwakely@redhat.com>
502         * doc/xml/manual/status_cxx2017.xml: Document P0156R2 status.
503         * doc/html/*: Regenerate.
504         * include/std/mutex (scoped_lock): Implement new C++17 template.
505         * testsuite/30_threads/scoped_lock/cons/1.cc: New test.
506         * testsuite/30_threads/scoped_lock/requirements/
507         explicit_instantiation.cc: New test.
508         * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: New test.
510 2017-03-02  Gerald Pfeifer  <gerald@pfeifer.com>
511             François Dumont  <frs.dumont@gmail.com>
512             Jonathan Wakely  <jwakely@redhat.com>
514         * doc/xml/manual/debug_mode.xml: Update and simplify note
515         on link- and run-time coexistence.
517 2017-03-02  Jonathan Wakely  <jwakely@redhat.com>
519         * testsuite/17_intro/headers/names.cc: Rename to ...
520         * testsuite/17_intro/names.cc: ... here.
522         PR libstdc++/79789
523         * include/bits/hashtable_policy.h (__clp2): Use reserved names for
524         parameters and local variables.
525         * include/bits/ios_base.h (make_error_code, make_error_condition):
526         Likewise.
527         * include/bits/list.tcc (list::sort): Likewise.
528         * include/bits/mask_array.h (mask_array): Likewise.
529         * include/bits/regex.h (regex_token_iterator): Likewise.
530         * include/bits/slice_array.h (slice_array): Likewise.
531         * include/bits/stl_algo.h (__sample): Likewise.
532         * include/std/memory (undeclare_no_pointers): Likewise.
533         * include/std/type_traits (is_callable_v, is_nothrow_callable_v):
534         Likewise.
535         * libsupc++/exception_ptr.h (__dest_thunk): Likewise.
536         * testsuite/17_intro/headers/names.cc: New test.
538         PR libstdc++/79798
539         * include/std/functional (bind::_Res_type_impl): Fix incorrect use of
540         result_of that loses top-level cv-qualifiers.
541         * testsuite/20_util/bind/79798.cc: New test.
543 2017-03-01  Gerald Pfeifer  <gerald@pfeifer.com>
545         * doc/xml/manual/documentation_hacking.xml: Tweak link to
546         doxygen.org.
548 2017-02-23  Jonathan Wakely  <jwakely@redhat.com>
550         * include/experimental/iterator: Include <iterator>.
551         * testsuite/experimental/iterator/requirements.cc: Check for contents
552         of <iterator>.
554 2017-02-19  Dinka Ranns  <dinka.ranns@googlemail.com>
556         C++17 GB50 resolution
557         * include/std/chrono (duration::operator++()): Add
558         _GLIBCXX17_CONSTEXPR.
559         (duration::operator++(int)): Likewise.
560         (duration::operator--()): Likewise.
561         (duration::operator--(int)): Likewise.
562         (duration::operator+=(const duration&)): Likewise.
563         (duration::operator-=(const duration&)): Likewise.
564         (duration::operator*=(const rep&)): Likewise.
565         (duration::operator/=(const rep&)): Likewise.
566         (duration::operator%=(const rep&)): Likewise.
567         (duration::operator%=(const duration&)): Likewise.
568         (time_point::operator+=(const duration&)): Likewise.
569         (time_point::operator-=(const duration&)): Likewise.
570         * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc: New test.
571         * testsuite/20_util/duration/literals/range.cc: Adjust dg-error.
572         * testsuite/20_util/time_point/arithmetic/constexpr.cc: New test.
574 2017-02-19  Gerald Pfeifer  <gerald@pfeifer.com>
576         * doc/xml/manual/debug.xml: Adjust link to ThreadSanitizer.
578 2017-02-18  Gerald Pfeifer  <gerald@pfeifer.com>
580         * doc/xml/manual/io.xml: Update link to groups.google.com.
581         Tweak link description.
583 2017-02-18  Gerald Pfeifer  <gerald@pfeifer.com>
585         * doc/xml/manual/profile_mode.xml: Fix link.
587 2017-02-16  Gerald Pfeifer  <gerald@pfeifer.com>
589         * doc/xml/manual/policy_data_structures.xml: Simplify and
590         standardize references to boost.org.
591         * doc/xml/manual/policy_data_structures_biblio.xml: Ditto.
592         * doc/xml/manual/shared_ptr.xml: Ditto.
594 2017-02-16  Jonathan Wakely  <jwakely@redhat.com>
596         PR libstdc++/60936
597         * src/c++11/snprintf_lite.cc (__concat_size_t): Calculate length
598         written to buffer, not length remaining in buffer.
600 2017-02-15  Tim Shen  <timshen@google.com>
602         PR libstdc++/78723
603         * include/std/variant (operator<(), operator>(), operator<=(),
604         operator>=(), operator==(), operator!=()): Implement P0393R3.
605         * testsuite/20_util/variant/compile.cc: Adjust tests.
606         * testsuite/20_util/variant/run.cc: Adjust tests.
608 2017-02-15  Tim Shen  <timshen@google.com>
610         PR libstdc++/79513
611         * include/std/variant (visit()): Forward variant types to the return
612         type detection code.
613         * testsuite/20_util/variant/compile.cc: Add test cases.
615 2017-02-13  H.J. Lu  <hongjiu.lu@intel.com>
617         PR libstdc++/79348
618         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
620 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
622         PR libstdc++/79348
623         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
624         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Likewise.
625         * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Likewise.
626         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Likewise.
627         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Likewise.
628         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Likewise.
629         * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Likewise.
630         * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Likewise.
631         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Likewise.
633 2017-02-13  Jonathan Wakely  <jwakely@redhat.com>
635         PR libstdc++/79486
636         * include/std/future (__future_base::_Task_state::_M_run)
637         (__future_base::_Task_state::_M_run_delayed): Use lvalue types in
638         result_of expressions.
639         * testsuite/30_threads/packaged_task/79486.cc: New.
641 2017-02-11  Jonathan Wakely  <jwakely@redhat.com>
643         PR libstdc++/79467
644         * include/bits/shared_ptr_base.h (__shared_ptr(_Yp*, _Deleter))
645         (__shared_ptr(_Yp*, _Deleter, _Alloc)): Use lvalue types in
646         __is_callable check.
647         * testsuite/20_util/shared_ptr/cons/79467.cc: New.
649         * include/bits/atomic_base.h: Re-indent.
651 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
653         * doc/xml/manual/profile_mode.xml: Update a paper reference.
655 2017-02-08  Gerald Pfeifer  <gerald@pfeifer.com>
657         * src/c++11/snprintf_lite.cc (__err): Use https for bug reporting.
659 2017-02-08  Jonathan Wakely  <jwakely@redhat.com>
661         * doc/xml/manual/policy_data_structures.xml: Fix spelling of author's
662         name.
663         * doc/xml/manual/policy_data_structures_biblio.xml: Likewise. Remove
664         broken links to texts that are no longer online.
665         * doc/xml/manual/profile_mode.xml: Update links to CGO 2009 paper and
666         LCPC 2006 paper.
667         * doc/xml/manual/using.xml: Update links to memory model information.
668         * doc/xml/manual/using_exceptions.xml: Update link to "Appendix E:
669         Standard-Library Exception Safety".
670         * doc/html/*: Regenerate.
672 2017-02-08  Gerald Pfeifer  <gerald@pfeifer.com>
674         * doc/xml/manual/profile_mode.xml: Unbreak link to
675         "Optimizing Sorting with Machine Learning Algorithms".
677 2017-02-08  Gerald Pfeifer  <gerald@pfeifer.com>
679         * src/c++11/snprintf_lite.cc (__err): Update bug reporting URL.
681 2017-02-08  Gerald Pfeifer  <gerald@pfeifer.com>
683         * doc/xml/manual/abi.xml: Update link to "Sun Studio 11: C++
684         Migration Guide".
686 2017-02-07  Gerald Pfeifer  <gerald@pfeifer.com>
688         * doc/html/ext/lwg-active.html: Remove.
689         * doc/html/ext/lwg-closed.html: Ditto.
690         * doc/html/ext/lwg-defects.html: Ditto.
692         * doc/Makefile.am (xml_extradir): Remove.
693         (xml_extra): Ditto.
694         (stamp-html-docbook-lwg): Remove recipe...
695         (stamp-html-docbook-data): ...and its use here.
696         * doc/Makefile.in: Regenerate.
698         * doc/xml/manual/intro.xml: Shorten two paragraphs explaining
699         the relationship to the upstream working group.
700         Replace a local link to ../ext/lwg-active.html by the upstream one.
701         Replace all reference to ../ext/lwg-defects.html by a new entity
702         &DR; which refers to the upstream address.
704 2017-02-07  Gerald Pfeifer  <gerald@pfeifer.com>
706         * doc/xml/manual/status_cxx2017.xml: Fix link to N4284.
708 2017-02-06  Jonathan Wakely  <jwakely@redhat.com>
710         PR libstdc++/79323
711         * testsuite/20_util/duration/literals/range.cc: Prune extra output
712         at -O0.
714 2017-02-06  Gerald Pfeifer  <gerald@pfeifer.com>
716         * doc/xml/manual/documentation_hacking.xml: Update URL of the
717         DocBook Element Reference.  Use that term as link description
718         instead of "online".
719         epubcheck has moved to GitHub.
720         Remove obsolete link to DocBook Publishing Tools.
722 2017-02-03  Jonathan Wakely  <jwakely@redhat.com>
724         PR libstdc++/66145
725         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Restore ABI override
726         so new ios::failure can be caught even when old ABI is the default.
727         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
728         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
729         exceptions_failbit.cc: Likewise.
730         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
731         exceptions_failbit.cc: Likewise.
732         * testsuite/27_io/basic_istream/extractors_other/char/
733         exceptions_null.cc: Likewise.
734         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
735         exceptions_null.cc: Likewise.
736         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
737         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
738         * testsuite/27_io/basic_ostream/inserters_other/char/
739         exceptions_null.cc: Likewise.
740         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
741         exceptions_null.cc: Likewise.
742         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
744         PR libstdc++/60936
745         * src/c++11/Makefile.am: Add new files.
746         * src/c++11/Makefile.in: Regenerate.
747         * src/c++11/cow-string-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
748         (operator<<, operator>>, getline): Move explicit instantiations to ...
749         * src/c++11/cow-string-io-inst.cc: ... new file.
750         * src/c++11/cow-wstring-inst.cc [!_GLIBCXX_USE_CXX11_ABI]
751         (operator<<, operator>>, getline): Move explicit instantiations to ...
752         * src/c++11/cow-wstring-io-inst.cc: ... new file.
753         * src/c++11/functexcept.cc (__throw_ios_failure, __throw_system_error)
754         (__throw_future_error, __throw_bad_function_call):
755         (__throw_regex_error): Move functions for C++11 exceptions to the
756         files that define the exception types.
757         * src/c++11/functional.cc (__throw_bad_function_call): Move here.
758         * src/c++11/future.cc (__throw_future_error): Likewise.
759         * src/c++11/ios.cc (__throw_ios_failure): Likewise.
760         * src/c++11/regex.cc (__throw_regex_error): Likewise.
761         * src/c++11/snprintf_lite.cc (__concat_size_t): Print decimal
762         representation directly instead of calling __int_to_char.
763         * src/c++11/sso_string.cc (__sso_string): New file for definition
764         of __sso_string type.
765         * src/c++11/string-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
766         explicit instantiations of narrow string I/O functions.
767         * src/c++11/system_error.cc (__throw_system_error): Move here.
768         (__sso_string): Move to new file.
769         * src/c++11/wstring-io-inst.cc [_GLIBCXX_USE_CXX11_ABI]: New file for
770         explicit instantiations of wide string I/O functions.
771         * src/c++98/misc-inst.cc [_GLIBCXX_USE_CXX11_ABI] (operator<<)
772         (operator>>, getline): Remove explicit instantiations from here.
774 2017-02-02  H.J. Lu  <hongjiu.lu@intel.com>
776         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
778 2017-02-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
780         * configure.host: Separate Solaris/SPARC and x86 baselines.
781         * config/abi/post/solaris2.10/baseline_symbols.txt: Move ...
782         * config/abi/post/sparc-solaris2.10/baseline_symbols.txt: ... here.
783         * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Move ...
784         * config/abi/post/sparc-solaris2.10/sparcv9/baseline_symbols.txt:
785         ... here.
786         * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Move ...
787         * config/abi/post/i386-solaris2.10/amd64/baseline_symbols.txt: ... here.
788         * config/abi/post/i386-solaris2.10/baseline_symbols.txt: New file.
789         * config/abi/post/solaris2.11/baseline_symbols.txt: Move ...
790         * config/abi/post/sparc-solaris2.11/baseline_symbols.txt: ... here.
791         * config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: Move ...
792         * config/abi/post/sparc-solaris2.11/sparcv9/baseline_symbols.txt:
793         ... here.
794         * config/abi/post/solaris2.11/amd64/baseline_symbols.txt: Move ...
795         * config/abi/post/i386-solaris2.11/amd64/baseline_symbols.txt: ... here.
796         * config/abi/post/i386-solaris2.11/baseline_symbols.txt: New file.
798         * config/abi/post/solaris2.10/baseline_symbols.txt: Regenerate.
799         * config/abi/post/solaris2.10/amd64/baseline_symbols.txt: Likewise.
800         * config/abi/post/solaris2.10/sparcv9/baseline_symbols.txt: Likewise.
801         * config/abi/post/solaris2.11/baseline_symbols.txt: Likewise.
802         * config/abi/post/solaris2.11/amd64/baseline_symbols.txt: Likewise.
803         * config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: Likewise.
805 2017-02-01  Jonathan Wakely  <jwakely@redhat.com>
807         PR libstdc++/78346
808         * include/bits/predefined_ops.h (_Iter_equals_iter): Store iterator
809         not its referent.
810         (_Iter_comp_to_iter): Likewise.
811         * testsuite/25_algorithms/search/78346.cc: New test.
813         PR libstdc++/79254
814         * config/abi/pre/gnu.ver: Remove recently added symbols.
815         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
816         (basic_string::_M_copy_assign): Remove.
817         (basic_string::operator=(const basic_string&)): Don't dispatch to
818         _M_copy_assign. If source object is small just deallocate, otherwise
819         perform new allocation before making any changes.
820         * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
821         (basic_string::_M_copy_assign(const basic_string&, true_type)):
822         Remove.
823         * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
824         Test cases where the allocators are equal or the string is small.
825         * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
826         Likewise.
828 2017-01-30  Ville Voutilainen  <ville.voutilainen@gmail.com>
830         Implement LWG 2825, LWG 2756 breaks class template argument
831         deduction for optional.
832         * include/std/optional: Add a deduction guide.
833         * testsuite/20_util/optional/cons/deduction_guide.cc: New.
835 2017-01-27  Jonathan Wakely  <jwakely@redhat.com>
837         PR libstdc++/79254
838         * config/abi/pre/gnu.ver: Add new symbols.
839         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
840         (basic_string::_M_copy_assign): New overloaded functions to perform
841         copy assignment.
842         (basic_string::operator=(const basic_string&)): Dispatch to
843         _M_copy_assign.
844         * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI]
845         (basic_string::_M_copy_assign(const basic_string&, true_type)):
846         Define, performing rollback on exception.
847         * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
848         Test exception-safety guarantee.
849         * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
850         Likewise.
851         * testsuite/util/testsuite_allocator.h (uneq_allocator::swap): Make
852         std::swap visible.
854 2017-01-26  Jonathan Wakely  <jwakely@redhat.com>
856         PR libstdc++/70607
857         * include/tr1/complex (conj): Remove using-declaration and restore
858         overloads, reverting previous change.
860         * testsuite/23_containers/list/operations/78389.cc: Fix for C++11
861         mode.
862         * testsuite/23_containers/priority_queue/requirements/constructible.cc:
863         Mark as unsupported in C++98 mode.
864         * testsuite/23_containers/queue/requirements/constructible.cc:
865         Likewise.
866         * testsuite/23_containers/stack/requirements/constructible.cc:
867         Likewise.
868         * testsuite/25_algorithms/make_heap/movable.cc: Fix for C++11 mode.
870         PR libstdc++/79243
871         * include/bits/c++config (literals::string_view_literals::__7): Add.
872         Only declare versioned namespaces for the relevant C++ dialects.
873         * include/experimental/bits/erase_if.h (fundamentals_v2::__detail):
874         Add versioning macros.
875         * include/experimental/bits/lfts_config.h:
876         (fundamentals_v1::__detail::__7, fundamentals_v2::__detail::__7): Add.
877         * include/experimental/string_view (fundamentals_v2::__detail):
878         Add versioning macros.
879         (fundamentals_v2::__detail::__identity): Remove.
880         (fundamentals_v2::__detail::__idt): Use common_type instead of
881         __detail::__identity.
882         * include/std/string_view (__detail::__identity, __detail::__idt):
883         Likewise.
884         (literals::string_view_literals): Fix nesting of versioning macros.
886         PR libstdc++/79190
887         * libsupc++/del_opa.cc (operator delete(void*, std::align_val_t))
888         [!_GLIBCXX_HAVE_ALIGNED_ALLOC && !_GLIBCXX_HAVE_POSIX_MEMALIGN
889         && !_GLIBCXX_HAVE_MEMALIGN && !_GLIBCXX_HAVE__ALIGNED_MALLOC]:
890         Retrieve original pointer value allocated by malloc.
891         * libsupc++/new_opa.cc [!_GLIBCXX_HAVE_ALIGNED_ALLOC
892         && !_GLIBCXX_HAVE_POSIX_MEMALIGN && !_GLIBCXX_HAVE_MEMALIGN
893         && !_GLIBCXX_HAVE__ALIGNED_MALLOC] (aligned_alloc(size_t, size_t)):
894         Define, adjusting pointer value allocated by malloc and storing for
895         retrieval by operator delete.
897 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
899         * libsupc++/eh_atomics.h: Update copyright years.
900         * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.
902 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
904         PR libstdc++/61791
905         PR libstdc++/70607
906         * include/std/complex (real(T), imag(T)): Add _GLIBCXX_CONSTEXPR.
907         (proj(T), conj(T)): Change return types per DR 1522.
908         * include/tr1/complex (conj): Remove overloads and use std::conj.
909         * testsuite/26_numerics/complex/dr781_dr1137.cc: Rename to...
910         * testsuite/26_numerics/complex/dr781.cc: ... this, and update.
911         * testsuite/26_numerics/complex/value_operations/constexpr2.cc: Test
912         real(T) and imag(T). Allow testing for C++11 too.
914 2017-01-24  Jonathan Wakely  <jwakely@redhat.com>
916         PR libstdc++/79206
917         * include/experimental/string_view (operator==): Check sizes first.
918         * include/std/string_view (operator==): Likewise.
920 2017-01-23  Jonathan Wakely  <jwakely@redhat.com>
922         * testsuite/experimental/array/make_array.cc: Restore <functional>
923         inclusion.
925 2017-01-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
927         * testsuite/29_atomics/atomic/69301.cc: Require atomic builtins.
929 2017-01-23  Jonathan Wakely  <jwakely@redhat.com>
931         PR libstdc++/79195
932         * include/experimental/array (__make_array_elem): New class template
933         and partial specialization.
934         (__is_reference_wrapper): Move into __make_array_elem specialization.
935         (make_array): Use __make_array_elem to determine element type and move
936         static assertion into specialization. Qualify std::forward call.
937         (to_array): Add exception specifiation.
938         * testsuite/experimental/array/make_array.cc: Test argument types
939         without a common type.
940         * testsuite/experimental/array/neg.cc: Adjust expected error message.
942 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
944         * doc/xml/manual/debug.xml: code.google.com uses https now.
946 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
948         * doc/xml/manual/test.xml: Fix link into gccint online manual.
950 2017-01-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
952         Make poisoned hashes SFINAE away the call operator of the hash.
953         * include/bits/functional_hash.h
954         (__poison_hash::__enable_hash_call): New.
955         * include/std/optional (__optional_hash_call_base): New.
956         (hash<optional<_Tp>>): Derive from the new base,
957         move the hash function into that base.
958         * include/std/variant (__variant_hash_call_base_impl): New.
959         (__variant_hash_call_base): Likewise.
960         (hash<variant<_Types...>>): Derive from the new base,
961         move the hash function into that base.
962         * testsuite/20_util/optional/hash.cc: Add tests for is_callable.
963         * testsuite/20_util/variant/hash.cc: Likewise.
965 2017-01-20  Joe Seymour  <joe.s@somniumtech.com>
967         * acinclude.m4 (GLIBCXX_CHECK_SIZE_T_MANGLING): Support uint20_t.
968         * configure: Regenerate.
970 2017-01-20  Jonathan Wakely  <jwakely@redhat.com>
972         PR libstdc++/69240
973         * include/bits/random.h (uniform_real_distribution::param_type)
974         (normal_distribution::param_type, lognormal_distribution::param_type)
975         (gamma_distribution::param_type, chi_squared_distribution::param_type)
976         (cauchy_distribution::param_type, fisher_f_distribution::param_type)
977         (student_t_distribution::param_type)
978         (bernoulli_distribution::param_type, binomial_distribution::param_type)
979         (geometric_distribution::param_type)
980         (negative_binomial_distribution::param_type)
981         (poisson_distribution::param_type)
982         (exponential_distribution::param_type)
983         (weibull_distribution::param_type)
984         (extreme_value_distribution::param_type)
985         (discrete_distribution::param_type)
986         (piecewise_constant_distribution::param_type)
987         (piecewise_linear_distribution::param_type): Define operator!=.
988         * include/bits/uniform_int_dist.h
989         (uniform_int_distribution::param_type): Likewise.
990         * include/ext/random (beta_distribution::param_type)
991         (rice_distribution::param_type, nakagami_distribution::param_type)
992         (pareto_distribution::param_type, k_distribution::param_type)
993         (arcsine_distribution::param_type, hoyt_distribution::param_type)
994         (triangular_distribution::param_type)
995         (von_mises_distribution::param_type)
996         (hypergeometric_distribution::param_type)
997         (logistic_distribution::param_type)
998         (uniform_on_sphere_distribution::param_type)
999         (uniform_inside_sphere_distribution::param_type): Likewise.
1000         * testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc:
1001         Test construction with param_type.
1002         * testsuite/26_numerics/random/binomial_distribution/cons/parms.cc:
1003         Likewise.
1004         * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
1005         Likewise.
1006         * testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc:
1007         Likewise.
1008         * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
1009         Likewise.
1010         * testsuite/26_numerics/random/extreme_value_distribution/cons/
1011         parms.cc: Likewise.
1012         * testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc:
1013         Likewise.
1014         * testsuite/26_numerics/random/gamma_distribution/cons/parms.cc:
1015         Likewise.
1016         * testsuite/26_numerics/random/geometric_distribution/cons/parms.cc:
1017         Likewise.
1018         * testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc:
1019         Likewise.
1020         * testsuite/26_numerics/random/negative_binomial_distribution/cons/
1021         parms.cc: Likewise.
1022         * testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
1023         Likewise.
1024         * testsuite/26_numerics/random/poisson_distribution/cons/parms.cc:
1025         Likewise.
1026         * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
1027         Likewise.
1028         * testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc:
1029         Likewise.
1030         * testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc:
1031         Likewise.
1032         * testsuite/26_numerics/random/weibull_distribution/cons/parms.cc:
1033         Likewise.
1034         * testsuite/ext/random/arcsine_distribution/cons/parms.cc: Likewise.
1035         * testsuite/ext/random/beta_distribution/cons/parms.cc: Likewise.
1036         * testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
1037         * testsuite/ext/random/hypergeometric_distribution/cons/parms.cc:
1038         Likewise.
1039         * testsuite/ext/random/k_distribution/cons/parms.cc: Likewise.
1040         * testsuite/ext/random/logistic_distribution/cons/parms.cc: Likewise.
1041         * testsuite/ext/random/nakagami_distribution/cons/parms.cc: Likewise.
1042         * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
1043         * testsuite/ext/random/pareto_distribution/cons/parms.cc: Likewise.
1044         * testsuite/ext/random/rice_distribution/cons/parms.cc: Likewise.
1045         * testsuite/ext/random/triangular_distribution/cons/parms.cc:
1046         Likewise.
1047         * testsuite/ext/random/uniform_inside_sphere_distribution/cons/
1048         parms.cc: Likewise.
1049         * testsuite/ext/random/von_mises_distribution/cons/parms.cc: Likewise.
1051         PR libstdc++/72792
1052         * include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
1053         (__allocator_traits_base::__size_type): Remove.
1054         (allocator_traits::_Ptr): New class template to detect const and void
1055         pointer types without instantiating pointer_traits::rebind
1056         unnecessarily.
1057         (allocator_traits::_Diff): Likewise for detecting difference_type.
1058         (allocator_traits::_Size): New class template to detect size_type
1059         without instantiating make_unsigned unnecessarily.
1060         * include/bits/ptr_traits.h (pointer_traits::element_type): Use
1061         __detected_or_t instead of __detected_or_t_.
1062         * include/std/type_traits (__detected_or_t_): Remove.
1063         * testsuite/20_util/allocator_traits/members/pointers.cc: New test.
1065         PR libstdc++/72792
1066         PR libstdc++/72793
1067         * include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
1068         Replace with class template using void_t.
1069         (__alloc_rebind): Define in terms of
1070         __allocator_traits_base::__rebind.
1071         (allocator_traits): Remove unconditional static_assert for
1072         rebind_alloc.
1073         * include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
1074         (pointer_traits::__rebind): Replace with class template using void_t.
1075         (pointer_traits::rebind): Define in terms of __rebind.
1076         (pointer_traits): Remove unconditional static_assert for rebind.
1077         * testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
1078         * testsuite/20_util/pointer_traits/rebind.cc: New test.
1080         PR libstdc++/69321
1081         * include/experimental/any (__any_caster): Avoid instantiating
1082         manager function for types that can't be stored in any.
1083         * include/std/any (__any_caster): Likewise.
1084         * testsuite/20_util/any/misc/any_cast.cc: Test non-copyable type.
1085         * testsuite/experimental/any/misc/any_cast.cc: Likewise.
1087         PR libstdc++/64903
1088         * include/bits/stl_algo.h (is_partitioned): Use increment instead of
1089         std::advance.
1091 2017-01-19  Jonathan Wakely  <jwakely@redhat.com>
1093         PR libstdc++/79156
1094         * include/bits/shared_ptr_base.h (__enable_shared_from_this_base):
1095         Fix return type.
1096         (__enable_shared_from_this): Declare __shared_ptr as a friend.
1097         * testsuite/ext/shared_ptr/1.cc: New test.
1099         PR libstdc++/64903
1100         * include/bits/stl_algo.h (is_partitioned): Don't retest the partition
1101         point.
1102         * testsuite/25_algorithms/is_partitioned/2.cc: New test.
1104         * doc/xml/manual/abi.xml: Fix typo.
1105         * doc/html/manual/abi.html: Likewise.
1107         PR libstdc++/67085
1108         * include/bits/predefined_ops.h (_Iter_less_val, _Val_less_iter): Add
1109         converting constructors from _Iter_less_iter.
1110         (_Iter_comp_val, _Val_comp_iter): Add converting constructors from
1111         _Iter_comp_iter.
1112         (__iter_comp_val(_Iter_comp_iter<C>): Use converting constructor.
1113         (__val_comp_iter(_Iter_comp_iter<C>): Likewise.
1114         * include/bits/stl_heap.h (__is_heap_until, __push_heap, __pop_heap)
1115         (__make_heap, __sort_heap): Change _Compare parameters to references.
1116         (__is_heap, push_heap, __adjust_heap, __pop_heap, pop_heap)
1117         (__make_heap, make_heap, sort_heap, is_heap_until): Pass comparison
1118         functions as lvalues.
1119         (is_heap): Call __is_heap_until directly to avoid copying __comp.
1120         * testsuite/23_containers/priority_queue/67085.cc: Adjust test to
1121         count copies during construction with empty sequence.
1123         PR libstdc++/67085
1124         * include/bits/stl_heap.h (__is_heap): Use _GLIBCXX_MOVE.
1125         (__make_heap, __sort_heap): Don't use _GLIBCXX_MOVE inside loops.
1126         * testsuite/23_containers/priority_queue/67085.cc: Adjust expected
1127         number of copies.
1128         * testsuite/25_algorithms/make_heap/movable.cc: New test.
1130         PR libstdc++/67085
1131         * include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap)
1132         (pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Use
1133         _GLIBCXX_MOVE when passing comparison function to other functions.
1134         (is_heap_until, is_heap): Use std::move when passing comparison
1135         function.
1136         * testsuite/23_containers/priority_queue/67085.cc: New test.
1138         PR libstdc++/78905
1139         * doc/xml/manual/abi.xml (abi.versioning.history): Add markup to
1140         macro names, filenames, and literal values. Document _GLIBCXX_RELEASE.
1141         Document that the deprecated _GLIBCXX_VERSION macro was removed for
1142         the 4.0.0 release.
1143         * doc/html/*: Regenerate.
1144         * include/Makefile.am (_GLIBCXX_RELEASE): Set value.
1145         * include/Makefile.in: Regenerate.
1146         * include/bits/c++config (_GLIBCXX_RELEASE): Add #define.
1147         * testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in
1148         dg-error.
1150 2017-01-18  Jonathan Wakely  <jwakely@redhat.com>
1152         PR libstdc++/69301
1153         * include/std/atomic (atomic<T>::load, atomic<T>::exchange): Use
1154         aligned buffer instead of default-initialized variable.
1155         * testsuite/29_atomics/atomic/69301.cc: New test.
1156         * include/experimental/memory (observer_ptr::release): Use reserved
1157         name.
1158         * include/ext/pointer.h (_Pointer_adapter::operator++(int))
1159         (_Pointer_adapter::operator--(int)): Likewise.
1161         PR libstdc++/68925
1162         * include/experimental/random (randint): Use temporary instead of
1163         thread_local static.
1165 2017-01-17  Joshua Conner  <joshconner@google.com>
1167         * crossconfig.m4: Add fuchsia OS.
1168         * configure: Regenerate.
1170 2017-01-17  Jonathan Wakely  <jwakely@redhat.com>
1172         PR libstdc++/69699
1173         * doc/xml/manual/abi.xml (abi.versioning.history): Explain why the
1174         __GLIBCXX__ macro is not useful. Remove redundant date information
1175         and link to the GCC release timeline.
1176         (abi.versioning.active): Move partial sentence into the previous
1177         paragraph.
1178         * doc/html/*: Regenerate.
1180         PR libstdc++/79114
1181         * libsupc++/nested_exception.h (throw_with_nested): Use decay instead
1182         of remove_reference.
1183         * testsuite/18_support/nested_exception/79114.cc: New test.
1185 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
1187         PR other/79046
1188         * configure.ac: Add GCC_BASE_VER.
1189         * fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
1190         get version from BASE-VER file.
1191         * po/Makefile.in: Regenerated.
1192         * libsupc++/Makefile.in: Regenerated.
1193         * testsuite/Makefile.in: Regenerated.
1194         * src/Makefile.in: Regenerated.
1195         * configure: Regenerated.
1196         * Makefile.in: Regenerated.
1197         * include/Makefile.in: Regenerated.
1198         * doc/Makefile.in: Regenerated.
1199         * python/Makefile.in: Regenerated.
1200         * src/c++11/Makefile.in: Regenerated.
1201         * src/c++98/Makefile.in: Regenerated.
1202         * src/filesystem/Makefile.in: Regenerated.
1204 2017-01-16  Jonathan Wakely  <jwakely@redhat.com>
1206         PR libstdc++/66145
1207         * src/c++11/functexcept.cc: Use new ABI for std::ios_base::failure
1208         exceptions.
1209         * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Don't override ABI
1210         for test, so new ios::failure can be caught.
1211         * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
1212         * testsuite/27_io/basic_istream/extractors_arithmetic/char/
1213         exceptions_failbit.cc: Likewise.
1214         * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
1215         exceptions_failbit.cc: Likewise.
1216         * testsuite/27_io/basic_istream/extractors_other/char/
1217         exceptions_null.cc: Likewise.
1218         * testsuite/27_io/basic_istream/extractors_other/wchar_t/
1219         exceptions_null.cc: Likewise.
1220         * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
1221         * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
1222         * testsuite/27_io/basic_ostream/inserters_other/char/
1223         exceptions_null.cc: Likewise.
1224         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
1225         exceptions_null.cc: Likewise.
1226         * testsuite/27_io/ios_base/storage/2.cc: Likewise.
1228         PR libstdc++/78702
1229         * include/bits/locale_classes.h (locale::facet::__shim): Change from
1230         private to protected.
1231         * src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
1232         make locale::facet::__shim accessible.
1234 2017-01-16  Ville Voutilainen  <ville.voutilainen@gmail.com>
1236         PR libstdc++/78389
1237         * include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
1238         (merge(list&&, _StrictWeakOrdering)): Likewise.
1239         * testsuite/23_containers/list/operations/78389.cc: Add
1240         better test for the sizes.
1242 2017-01-14  Jonathan Wakely  <jwakely@redhat.com>
1244         * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
1245         Skip test when -D_GLIBCXX_PROFILE mode is included in options.
1246         * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
1247         * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
1248         Likewise.
1249         * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
1250         * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
1251         * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
1252         * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
1253         * testsuite/23_containers/unordered_map/modifiers/extract.cc:
1254         Likewise.
1255         * testsuite/23_containers/unordered_multimap/modifiers/extract.cc::
1256         Likewise.
1257         * testsuite/23_containers/unordered_multiset/modifiers/extract.cc::
1258         Likewise.
1259         * testsuite/23_containers/unordered_set/modifiers/extract.cc:
1260         Likewise.
1261         * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
1262         Likewise.
1263         * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
1264         * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
1265         * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
1266         * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
1267         * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
1268         * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
1269         * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
1270         * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
1271         * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
1272         * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1273         * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
1274         * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
1275         * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1277 2017-01-13  Jonathan Wakely  <jwakely@redhat.com>
1279         PR libstdc++/65411
1280         * config/io/basic_file_stdio.cc (__basic_file<char>::close()): Don't
1281         retry fclose on EINTR.
1283         * include/profile/base.h: Remove unused header that leads to header
1284         cycle in C++17 mode.
1286         PR libstdc++/79075
1287         * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
1288         Make _If_sv private.
1289         [!_GLIBCXX_USE_CXX11_ABI] (basic_string): Add member functions taking
1290         basic_string_view arguments.
1292         PR libstdc++/79075
1293         * testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Remove
1294         redundant option from cxxflags.
1295         (check_effective_target_cxx11-abi): Define.
1296         * testsuite/21_strings/basic_string/allocator/71964.cc: Use cxx11-abi
1297         effective target.
1298         * testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
1299         * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1300         Likewise.
1301         * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
1302         Likewise.
1303         * testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
1304         * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
1305         Likewise.
1306         * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
1307         Likewise.
1308         * testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
1309         * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
1310         Likewise.
1311         * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1312         Likewise.
1313         * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
1314         Likewise.
1315         * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
1316         Likewise.
1317         * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
1318         Likewise.
1319         * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
1320         Likewise.
1321         * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
1322         Likewise.
1323         * testsuite/23_containers/list/61347.cc: Likewise.
1324         * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
1325         * testsuite/27_io/ios_base/failure/cxx11.cc: Likewise.
1327 2017-01-13  Ville Voutilainen  <ville.voutilainen@gmail.com>
1329         PR libstdc++/78389
1330         * include/bits/list.tcc (merge(list&&)):
1331         Adjust list sizes if the comparator throws.
1332         (merge(list&&, _StrictWeakOrdering)): Likewise.
1333         (sort()): Splice elements back from the scratch buffers
1334         if the comparator throws.
1335         (sort(_StrictWeakOrdering)): Likewise.
1336         * testsuite/23_containers/list/operations/78389.cc: New.
1338 2017-01-13  Jonathan Wakely  <jwakely@redhat.com>
1340         * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Mark
1341         XFAIL for C++17 until node reinsertion supports fancy pointers.
1343         PR libstdc++/78361
1344         * testsuite/20_util/add_pointer/value.cc: Test forming function
1345         pointers.
1347 2017-01-13  Michael Brune  <lucdanton@free.fr>
1349         PR libstdc++/78361
1350         * include/std/type_traits (__is_referenceable): Handle noexcept
1351         function types.
1353 2017-01-12  Jonathan Wakely  <jwakely@redhat.com>
1355         PR libstdc++/77528
1356         * include/bits/stl_queue.h (queue, priority_queue): Remove default
1357         member-initializers and define default constructors as templates with
1358         constraints.
1359         * include/bits/stl_stack.h (stack): Likewise.
1360         * testsuite/23_containers/priority_queue/requirements/constructible.cc:
1361         New.
1362         * testsuite/23_containers/priority_queue/requirements/
1363         explicit_instantiation/1.cc: Test more instantiations.
1364         * testsuite/23_containers/priority_queue/requirements/
1365         explicit_instantiation/1_c++98.cc: Likewise.
1366         * testsuite/23_containers/queue/requirements/constructible.cc: New.
1367         * testsuite/23_containers/stack/requirements/constructible.cc: New.
1369         PR libstdc++/66284
1370         * doc/xml/manual/intro.xml: Document LWG 2781 change.
1371         * doc/html/*: Regenerate.
1372         * include/std/functional (_Function_base::_Ref_manager): Remove.
1373         (_Function_handler): Remove partial specializations for
1374         reference_wrapper.
1375         (function::target): Remove special case for const qualification.
1376         * testsuite/20_util/function/6.cc: Adjust tests for target type.
1377         * testsuite/20_util/function/7.cc: Likewise.
1378         * testsuite/20_util/function/8.cc: Likewise.
1380 2017-01-11  Jonathan Wakely  <jwakely@redhat.com>
1382         PR libstdc++/78134
1383         * include/bits/stl_map.h (map::lower_bound, map::upper_bound)
1384         (map::equal_range): Fix return type of heterogeneous overloads.
1385         * include/bits/stl_multimap.h (multimap::lower_bound)
1386         (multimap::upper_bound, multimap::equal_range): Likewise.
1387         * include/bits/stl_multiset.h (multiset::lower_bound)
1388         (multiset::upper_bound, multiset::equal_range): Likewise.
1389         * include/bits/stl_set.h (set::lower_bound, set::upper_bound)
1390         (set::equal_range): Likewise.
1391         * testsuite/23_containers/map/operations/2.cc
1392         * testsuite/23_containers/multimap/operations/2.cc
1393         * testsuite/23_containers/multiset/operations/2.cc
1394         * testsuite/23_containers/set/operations/2.cc
1396         PR libstdc++/78273
1397         * include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
1398         the heterogeneous comparison can only find one match.
1399         * include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
1400         * testsuite/23_containers/map/operations/2.cc: Test count works with
1401         comparison function that just partitions rather than sorting.
1402         * testsuite/23_containers/set/operations/2.cc: Likewise.
1404 2017-01-11  Ville Voutilainen  <ville.voutilainen@gmail.com>
1406         Reduce the size of variant, it doesn't need an index of
1407         type size_t internally.
1408         * include/std/variant (parse_numbers.h): New include.
1409         (__select_index): New.
1410         (_Variant_storage<false, _Types...>::_M_reset_impl): Use
1411         _index_type for comparison with variant_npos.
1412         (_Variant_storage<false, _Types...>::__index_type): New.
1413         (_Variant_storage<false, _Types...>::_M_index): Change the
1414         type from size_t to __index_type.
1415         (_Variant_storage<true, _Types...>::__index_type): New.
1416         (_Variant_storage<true, _Types...>::_M_index): Change the
1417         type from size_t to __index_type.
1418         (_Variant_base::_M_valid): Use _Storage::__index_type
1419         for comparison with variant_npos.
1420         (variant::index): Use _Base::_Storage::__index_type
1421         for comparison with variant_npos.
1422         * testsuite/20_util/variant/index_type.cc: New.
1424 2017-01-10  Jonathan Wakely  <jwakely@redhat.com>
1426         * testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
1427         effective target selector to prevent running in C++17 mode.
1429         PR libstdc++/77528
1430         * include/bits/stl_queue.h (queue::c): Add default member initializer.
1431         (queue::queue()): Add constructor and define as defaulted.
1432         (queue::queue(_Sequence&&)): Remove default argument.
1433         (priority_queue::c, priority_queue::comp): Add default member
1434         initializers.
1435         (priority_queue::priority_queue()): Add constructor and define as
1436         defaulted.
1437         (priority_queue::priority_queue(const _Compare&, _Sequence&&)):
1438         Remove default argument for first parameter.
1439         * include/bits/stl_stack.h (stack::c): Add default member initializer.
1440         (stack::stack()): Add constructor and define as defaulted.
1441         (stack::stack(const _Sequence&)): Remove default argument.
1442         * testsuite/23_containers/priority_queue/requirements/
1443         explicit_instantiation/1.cc: Test explicit instantiation with
1444         non-DefaultConstructible sequence.
1445         * testsuite/23_containers/priority_queue/77528.cc: New test.
1446         * testsuite/23_containers/priority_queue/requirements/
1447         explicit_instantiation/1_c++0x.cc: Replace with 1_c++98.cc.
1448         * testsuite/23_containers/queue/77528.cc: New test.
1449         * testsuite/23_containers/queue/requirements/explicit_instantiation/
1450         1.cc: Test explicit instantiation with non-DefaultConstructible
1451         sequence.
1452         * testsuite/23_containers/queue/requirements/explicit_instantiation/
1453         1_c++0x.cc: Replace with 1_c++98.cc.
1454         * testsuite/23_containers/stack/77528.cc: New test.
1455         * testsuite/23_containers/stack/requirements/explicit_instantiation/
1456         1.cc: Test explicit instantiation with non-DefaultConstructible
1457         sequence.
1458         * testsuite/23_containers/stack/requirements/explicit_instantiation/
1459         1_c++0x.cc: Replace with 1_c++98.cc.
1461 2017-01-10  Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
1463         * include/bits/locale_facets_nonio.tcc
1464         (time_get::_M_extract_via_format): Avoid compilation errors with
1465         non-standard struct tm.
1467 2017-01-10  François Dumont  <fdumont@gcc.gnu.org>
1468             Jonathan Wakely  <jwakely@redhat.com>
1470         * python/libstdcxx/v6/printers.py (_versioned_namespace): Define.
1471         (is_specialization, strip_versioned_namespace): New helpers functions
1472         to work with symbols in the versioned namespace.
1473         (Printer.add_version): Add second name using versioned namespace.
1474         (add_one_template_type_printer, add_one_type_printer): Add second
1475         type printers using versioned namespace.
1476         (register_type_printers): Add template type printer for basic_string.
1477         (build_libstdcxx_dictionary): Remove dead code.
1478         * python/libstdcxx/v6/xmethods.py: Make all matchers look for
1479         versioned namespace.
1480         * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
1481         results.
1482         * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
1484 2017-01-09  Jonathan Wakely  <jwakely@redhat.com>
1486         PR libstdc++/79017
1487         * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
1488         functions separately on darwin and if they're missing define
1489         _GLIBCXX_NO_C99_ROUNDING_FUNCS.
1490         * config.h.in: Regenerate.
1491         * configure: Regenerate.
1492         * include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
1493         (llrintf, llrintl, llround, llroundf, llroundl): Do not define.
1495         * testsuite/30_threads/condition_variable/members/3.cc: Use new macro
1496         to detect correct thread_local destructors.
1497         * testsuite/util/testsuite_hooks.h (CORRECT_THREAD_LOCAL_DTORS):
1498         Define.
1500 2017-01-09  Jonathan Wakely  <jwakely@redhat.com>
1501             Aditya Kumar  <hiraditya@msn.com>
1503         PR libstdc++/66414
1504         * include/bits/basic_string.tcc
1505         (basic_string::find(const CharT*, size_type, size_type)): Optimize.
1507 2017-01-06  Jonathan Wakely  <jwakely@redhat.com>
1509         * testsuite/21_strings/basic_string/operations/find/char/6.cc: New.
1510         * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: New.
1512         * testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp:
1513         Include <cassert> header.
1515         PR libstdc++/78968
1516         * crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*.
1517         * configure: Regenerate.
1519 2017-01-06  Barrett Adair  <barrettellisadair@gmail.com>
1520             Jonathan Wakely  <jwakely@redhat.com>
1522         * include/std/variant (variant, swap): Replace __and_ usage with fold
1523         expressions.
1525 2017-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1527         PR go/78978
1528         * acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
1529         * configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
1530         GLIBCXX_CHECK_ASSEMBLER_HWCAP.
1531         * fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
1532         HWCAP_FLAGS.
1533         * aclocal.m4: Regenerate.
1534         * configure: Regenerate.
1535         * Makefile.in, doc/Makefile.in, include/Makefile.in,
1536         libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
1537         src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
1538         src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
1540 2017-01-06  Jonathan Wakely  <jwakely@redhat.com>
1542         * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.
1544         PR libstdc++/78991
1545         * include/bits/predefined_ops.h (_Iter_comp_iter, _Iter_comp_val)
1546         (_Val_comp_iter, _Iter_equals_val, _Iter_pred, _Iter_comp_to_val)
1547         (_Iter_comp_to_iter, _Iter_negate): Make constructors explicit and
1548         move function objects.
1549         (__iter_comp_iter, __iter_comp_val, __val_comp_iter, __pred_iter)
1550         (__iter_comp_val, __iter_comp_iter, __negate): Move function objects.
1551         * testsuite/25_algorithms/sort/78991.cc: New test.
1553 2017-01-05  Jonathan Wakely  <jwakely@redhat.com>
1555         * include/bits/std_function.h (function::_Signature_type): Remove.
1556         (function::function(_Functor)): Adjust.
1558 2017-01-05  Tim Shen  <timshen@google.com>
1560         PR libstdc++/78996
1561         * include/std/variant (__gen_vtable_impl): rename __unused to
1562         __dimensions to avoid naming conflict.
1564 2017-01-04  Jonathan Wakely  <jwakely@redhat.com>
1566         PR libstdc++/78968
1567         * config.h.in: Regenerate.
1568         * configure: Likewise.
1569         * configure.ac: Check for __cxa_thread_atexit.
1570         * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
1571         Don't define __cxa_thread_atexit if libc provides it.
1573 2017-01-04  Ville Voutilainen  <ville.voutilainen@gmail.com>
1575         Implement 2801, Default-constructibility of unique_ptr.
1576         * include/bits/unique_ptr.h (__uniq_ptr_impl::_DeleterConstraint): New.
1577         (unique_ptr::_DeleterConstraint): Likewise.
1578         (unique_ptr()): Constrain.
1579         (unique_ptr(pointer)): Likewise.
1580         (unique_ptr(nullptr_t)): Likewise.
1581         (unique_ptr<_Tp[], _Dp>::_DeleterConstraint): New.
1582         (unique_ptr<_Tp[], _Dp>::unique_ptr()): Constrain.
1583         (unique_ptr<_Tp[], _Dp>::unique_ptr(_Up)): Likewise.
1584         (unique_ptr<_Tp[], _Dp>::unique_ptr(nullptr_t)): Likewise.
1585         * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust.
1586         * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
1587         * testsuite/20_util/unique_ptr/cons/default.cc: New.
1588         * testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Adjust.
1590 2017-01-04  Pauli Nieminen  <suokkos@gmail.com>
1591             Jonathan Wakely  <jwakely@redhat.com>
1593         PR libstdc++/64735
1594         * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
1595         * config.h.in: Regenerate.
1596         * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
1597         (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
1598         exports for exception_ptr, nested_exception, and future conditional.
1599         [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
1600         exports for exception_ptr, nested_exception, and future conditional.
1601         * configure: Regenerate.
1602         * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
1603         * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
1604         * libsupc++/eh_atomics.h: New file for internal use only.
1605         (__eh_atomic_inc, __eh_atomic_dec): New.
1606         * libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
1607         (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
1608         (rethrow_exception): Use eh_atomics.h reference counting helpers.
1609         * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
1610         * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
1611         * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
1612         * libsupc++/exception_ptr.h: Likewise.
1613         * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
1614         * libsupc++/nested_exception.cc: Remove check for
1615         ATOMIC_INT_LOCK_FREE.
1616         * libsupc++/nested_exception.h: Likewise.
1617         * src/c++11/future.cc: Likewise.
1618         * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
1619         * testsuite/18_support/nested_exception/*: Likewise.
1620         * testsuite/30_threads/async/*: Likewise.
1621         * testsuite/30_threads/future/*: Likewise.
1622         * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
1623         * testsuite/30_threads/packaged_task/*: Likewise.
1624         * testsuite/30_threads/promise/*: Likewise.
1625         * testsuite/30_threads/shared_future/*: Likewise.
1627 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
1629         * doc/xml/manual/documentation_hacking.xml: sourceforge.net now
1630         defaults to https; adjust reference.
1632 2017-01-03  Jonathan Wakely  <jwakely@redhat.com>
1634         PR libstdc++/78956
1635         * include/std/thread (thread(const thread&&)): Add deleted
1636         constructor.
1637         * testsuite/30_threads/thread/cons/lwg2097.cc: New test.
1639         * doc/xml/manual/spine.xml: Update copyright years.
1640         * doc/xml/manual/build_hacking.xml: Fix spelling of libbuilddir.
1641         * doc/xml/manual/test.xml: Likewise.
1642         * doc/html/*: Regenerate.
1644 2017-01-01  Gerald Pfeifer  <gerald@pfeifer.com>
1646         * doc/xml/faq.xml: Update address of C++ ABI link.
1647         * doc/xml/manual/abi.xml: Ditto.
1649 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1651         Update copyright years.
1653 Copyright (C) 2017 Free Software Foundation, Inc.
1655 Copying and distribution of this file, with or without modification,
1656 are permitted in any medium without royalty provided the copyright
1657 notice and this notice are preserved.