1 2017-01-26 Jonathan Wakely <jwakely@redhat.com>
4 * include/bits/c++config (literals::string_view_literals::__7): Add.
5 Only declare versioned namespaces for the relevant C++ dialects.
6 * include/experimental/bits/erase_if.h (fundamentals_v2::__detail):
8 * include/experimental/bits/lfts_config.h:
9 (fundamentals_v1::__detail::__7, fundamentals_v2::__detail::__7): Add.
10 * include/experimental/string_view (fundamentals_v2::__detail):
11 Add versioning macros.
12 (fundamentals_v2::__detail::__identity): Remove.
13 (fundamentals_v2::__detail::__idt): Use common_type instead of
15 * include/std/string_view (__detail::__identity, __detail::__idt):
17 (literals::string_view_literals): Fix nesting of versioning macros.
20 * libsupc++/del_opa.cc (operator delete(void*, std::align_val_t))
21 [!_GLIBCXX_HAVE_ALIGNED_ALLOC && !_GLIBCXX_HAVE_POSIX_MEMALIGN
22 && !_GLIBCXX_HAVE_MEMALIGN && !_GLIBCXX_HAVE__ALIGNED_MALLOC]:
23 Retrieve original pointer value allocated by malloc.
24 * libsupc++/new_opa.cc [!_GLIBCXX_HAVE_ALIGNED_ALLOC
25 && !_GLIBCXX_HAVE_POSIX_MEMALIGN && !_GLIBCXX_HAVE_MEMALIGN
26 && !_GLIBCXX_HAVE__ALIGNED_MALLOC] (aligned_alloc(size_t, size_t)):
27 Define, adjusting pointer value allocated by malloc and storing for
28 retrieval by operator delete.
30 2017-01-26 Jakub Jelinek <jakub@redhat.com>
32 * libsupc++/eh_atomics.h: Update copyright years.
33 * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.
35 2017-01-25 Jonathan Wakely <jwakely@redhat.com>
39 * include/std/complex (real(T), imag(T)): Add _GLIBCXX_CONSTEXPR.
40 (proj(T), conj(T)): Change return types per DR 1522.
41 * include/tr1/complex (conj): Remove overloads and use std::conj.
42 * testsuite/26_numerics/complex/dr781_dr1137.cc: Rename to...
43 * testsuite/26_numerics/complex/dr781.cc: ... this, and update.
44 * testsuite/26_numerics/complex/value_operations/constexpr2.cc: Test
45 real(T) and imag(T). Allow testing for C++11 too.
47 2017-01-24 Jonathan Wakely <jwakely@redhat.com>
50 * include/experimental/string_view (operator==): Check sizes first.
51 * include/std/string_view (operator==): Likewise.
53 2017-01-23 Jonathan Wakely <jwakely@redhat.com>
55 * testsuite/experimental/array/make_array.cc: Restore <functional>
58 2017-01-23 Thomas Preud'homme <thomas.preudhomme@arm.com>
60 * testsuite/29_atomics/atomic/69301.cc: Require atomic builtins.
62 2017-01-23 Jonathan Wakely <jwakely@redhat.com>
65 * include/experimental/array (__make_array_elem): New class template
66 and partial specialization.
67 (__is_reference_wrapper): Move into __make_array_elem specialization.
68 (make_array): Use __make_array_elem to determine element type and move
69 static assertion into specialization. Qualify std::forward call.
70 (to_array): Add exception specifiation.
71 * testsuite/experimental/array/make_array.cc: Test argument types
72 without a common type.
73 * testsuite/experimental/array/neg.cc: Adjust expected error message.
75 2017-01-22 Gerald Pfeifer <gerald@pfeifer.com>
77 * doc/xml/manual/debug.xml: code.google.com uses https now.
79 2017-01-22 Gerald Pfeifer <gerald@pfeifer.com>
81 * doc/xml/manual/test.xml: Fix link into gccint online manual.
83 2017-01-21 Ville Voutilainen <ville.voutilainen@gmail.com>
85 Make poisoned hashes SFINAE away the call operator of the hash.
86 * include/bits/functional_hash.h
87 (__poison_hash::__enable_hash_call): New.
88 * include/std/optional (__optional_hash_call_base): New.
89 (hash<optional<_Tp>>): Derive from the new base,
90 move the hash function into that base.
91 * include/std/variant (__variant_hash_call_base_impl): New.
92 (__variant_hash_call_base): Likewise.
93 (hash<variant<_Types...>>): Derive from the new base,
94 move the hash function into that base.
95 * testsuite/20_util/optional/hash.cc: Add tests for is_callable.
96 * testsuite/20_util/variant/hash.cc: Likewise.
98 2017-01-20 Joe Seymour <joe.s@somniumtech.com>
100 * acinclude.m4 (GLIBCXX_CHECK_SIZE_T_MANGLING): Support uint20_t.
101 * configure: Regenerate.
103 2017-01-20 Jonathan Wakely <jwakely@redhat.com>
106 * include/bits/random.h (uniform_real_distribution::param_type)
107 (normal_distribution::param_type, lognormal_distribution::param_type)
108 (gamma_distribution::param_type, chi_squared_distribution::param_type)
109 (cauchy_distribution::param_type, fisher_f_distribution::param_type)
110 (student_t_distribution::param_type)
111 (bernoulli_distribution::param_type, binomial_distribution::param_type)
112 (geometric_distribution::param_type)
113 (negative_binomial_distribution::param_type)
114 (poisson_distribution::param_type)
115 (exponential_distribution::param_type)
116 (weibull_distribution::param_type)
117 (extreme_value_distribution::param_type)
118 (discrete_distribution::param_type)
119 (piecewise_constant_distribution::param_type)
120 (piecewise_linear_distribution::param_type): Define operator!=.
121 * include/bits/uniform_int_dist.h
122 (uniform_int_distribution::param_type): Likewise.
123 * include/ext/random (beta_distribution::param_type)
124 (rice_distribution::param_type, nakagami_distribution::param_type)
125 (pareto_distribution::param_type, k_distribution::param_type)
126 (arcsine_distribution::param_type, hoyt_distribution::param_type)
127 (triangular_distribution::param_type)
128 (von_mises_distribution::param_type)
129 (hypergeometric_distribution::param_type)
130 (logistic_distribution::param_type)
131 (uniform_on_sphere_distribution::param_type)
132 (uniform_inside_sphere_distribution::param_type): Likewise.
133 * testsuite/26_numerics/random/bernoulli_distribution/cons/parms.cc:
134 Test construction with param_type.
135 * testsuite/26_numerics/random/binomial_distribution/cons/parms.cc:
137 * testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
139 * testsuite/26_numerics/random/chi_squared_distribution/cons/parms.cc:
141 * testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
143 * testsuite/26_numerics/random/extreme_value_distribution/cons/
145 * testsuite/26_numerics/random/fisher_f_distribution/cons/parms.cc:
147 * testsuite/26_numerics/random/gamma_distribution/cons/parms.cc:
149 * testsuite/26_numerics/random/geometric_distribution/cons/parms.cc:
151 * testsuite/26_numerics/random/lognormal_distribution/cons/parms.cc:
153 * testsuite/26_numerics/random/negative_binomial_distribution/cons/
155 * testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
157 * testsuite/26_numerics/random/poisson_distribution/cons/parms.cc:
159 * testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
161 * testsuite/26_numerics/random/uniform_int_distribution/cons/parms.cc:
163 * testsuite/26_numerics/random/uniform_real_distribution/cons/parms.cc:
165 * testsuite/26_numerics/random/weibull_distribution/cons/parms.cc:
167 * testsuite/ext/random/arcsine_distribution/cons/parms.cc: Likewise.
168 * testsuite/ext/random/beta_distribution/cons/parms.cc: Likewise.
169 * testsuite/ext/random/hoyt_distribution/cons/parms.cc: Likewise.
170 * testsuite/ext/random/hypergeometric_distribution/cons/parms.cc:
172 * testsuite/ext/random/k_distribution/cons/parms.cc: Likewise.
173 * testsuite/ext/random/logistic_distribution/cons/parms.cc: Likewise.
174 * testsuite/ext/random/nakagami_distribution/cons/parms.cc: Likewise.
175 * testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
176 * testsuite/ext/random/pareto_distribution/cons/parms.cc: Likewise.
177 * testsuite/ext/random/rice_distribution/cons/parms.cc: Likewise.
178 * testsuite/ext/random/triangular_distribution/cons/parms.cc:
180 * testsuite/ext/random/uniform_inside_sphere_distribution/cons/
182 * testsuite/ext/random/von_mises_distribution/cons/parms.cc: Likewise.
185 * include/bits/alloc_traits.h (__allocator_traits_base::__diff_type)
186 (__allocator_traits_base::__size_type): Remove.
187 (allocator_traits::_Ptr): New class template to detect const and void
188 pointer types without instantiating pointer_traits::rebind
190 (allocator_traits::_Diff): Likewise for detecting difference_type.
191 (allocator_traits::_Size): New class template to detect size_type
192 without instantiating make_unsigned unnecessarily.
193 * include/bits/ptr_traits.h (pointer_traits::element_type): Use
194 __detected_or_t instead of __detected_or_t_.
195 * include/std/type_traits (__detected_or_t_): Remove.
196 * testsuite/20_util/allocator_traits/members/pointers.cc: New test.
200 * include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
201 Replace with class template using void_t.
202 (__alloc_rebind): Define in terms of
203 __allocator_traits_base::__rebind.
204 (allocator_traits): Remove unconditional static_assert for
206 * include/bits/ptr_traits.h (__replace_first_arg): Remove type member.
207 (pointer_traits::__rebind): Replace with class template using void_t.
208 (pointer_traits::rebind): Define in terms of __rebind.
209 (pointer_traits): Remove unconditional static_assert for rebind.
210 * testsuite/20_util/allocator_traits/members/rebind_alloc.cc: New test.
211 * testsuite/20_util/pointer_traits/rebind.cc: New test.
214 * include/experimental/any (__any_caster): Avoid instantiating
215 manager function for types that can't be stored in any.
216 * include/std/any (__any_caster): Likewise.
217 * testsuite/20_util/any/misc/any_cast.cc: Test non-copyable type.
218 * testsuite/experimental/any/misc/any_cast.cc: Likewise.
221 * include/bits/stl_algo.h (is_partitioned): Use increment instead of
224 2017-01-19 Jonathan Wakely <jwakely@redhat.com>
227 * include/bits/shared_ptr_base.h (__enable_shared_from_this_base):
229 (__enable_shared_from_this): Declare __shared_ptr as a friend.
230 * testsuite/ext/shared_ptr/1.cc: New test.
233 * include/bits/stl_algo.h (is_partitioned): Don't retest the partition
235 * testsuite/25_algorithms/is_partitioned/2.cc: New test.
237 * doc/xml/manual/abi.xml: Fix typo.
238 * doc/html/manual/abi.html: Likewise.
241 * include/bits/predefined_ops.h (_Iter_less_val, _Val_less_iter): Add
242 converting constructors from _Iter_less_iter.
243 (_Iter_comp_val, _Val_comp_iter): Add converting constructors from
245 (__iter_comp_val(_Iter_comp_iter<C>): Use converting constructor.
246 (__val_comp_iter(_Iter_comp_iter<C>): Likewise.
247 * include/bits/stl_heap.h (__is_heap_until, __push_heap, __pop_heap)
248 (__make_heap, __sort_heap): Change _Compare parameters to references.
249 (__is_heap, push_heap, __adjust_heap, __pop_heap, pop_heap)
250 (__make_heap, make_heap, sort_heap, is_heap_until): Pass comparison
251 functions as lvalues.
252 (is_heap): Call __is_heap_until directly to avoid copying __comp.
253 * testsuite/23_containers/priority_queue/67085.cc: Adjust test to
254 count copies during construction with empty sequence.
257 * include/bits/stl_heap.h (__is_heap): Use _GLIBCXX_MOVE.
258 (__make_heap, __sort_heap): Don't use _GLIBCXX_MOVE inside loops.
259 * testsuite/23_containers/priority_queue/67085.cc: Adjust expected
261 * testsuite/25_algorithms/make_heap/movable.cc: New test.
264 * include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap)
265 (pop_heap, __make_heap, make_heap, __sort_heap, sort_heap): Use
266 _GLIBCXX_MOVE when passing comparison function to other functions.
267 (is_heap_until, is_heap): Use std::move when passing comparison
269 * testsuite/23_containers/priority_queue/67085.cc: New test.
272 * doc/xml/manual/abi.xml (abi.versioning.history): Add markup to
273 macro names, filenames, and literal values. Document _GLIBCXX_RELEASE.
274 Document that the deprecated _GLIBCXX_VERSION macro was removed for
276 * doc/html/*: Regenerate.
277 * include/Makefile.am (_GLIBCXX_RELEASE): Set value.
278 * include/Makefile.in: Regenerate.
279 * include/bits/c++config (_GLIBCXX_RELEASE): Add #define.
280 * testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in
283 2017-01-18 Jonathan Wakely <jwakely@redhat.com>
286 * include/std/atomic (atomic<T>::load, atomic<T>::exchange): Use
287 aligned buffer instead of default-initialized variable.
288 * testsuite/29_atomics/atomic/69301.cc: New test.
289 * include/experimental/memory (observer_ptr::release): Use reserved
291 * include/ext/pointer.h (_Pointer_adapter::operator++(int))
292 (_Pointer_adapter::operator--(int)): Likewise.
295 * include/experimental/random (randint): Use temporary instead of
298 2017-01-17 Joshua Conner <joshconner@google.com>
300 * crossconfig.m4: Add fuchsia OS.
301 * configure: Regenerate.
303 2017-01-17 Jonathan Wakely <jwakely@redhat.com>
306 * doc/xml/manual/abi.xml (abi.versioning.history): Explain why the
307 __GLIBCXX__ macro is not useful. Remove redundant date information
308 and link to the GCC release timeline.
309 (abi.versioning.active): Move partial sentence into the previous
311 * doc/html/*: Regenerate.
314 * libsupc++/nested_exception.h (throw_with_nested): Use decay instead
316 * testsuite/18_support/nested_exception/79114.cc: New test.
318 2017-01-17 Jakub Jelinek <jakub@redhat.com>
321 * configure.ac: Add GCC_BASE_VER.
322 * fragment.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
323 get version from BASE-VER file.
324 * po/Makefile.in: Regenerated.
325 * libsupc++/Makefile.in: Regenerated.
326 * testsuite/Makefile.in: Regenerated.
327 * src/Makefile.in: Regenerated.
328 * configure: Regenerated.
329 * Makefile.in: Regenerated.
330 * include/Makefile.in: Regenerated.
331 * doc/Makefile.in: Regenerated.
332 * python/Makefile.in: Regenerated.
333 * src/c++11/Makefile.in: Regenerated.
334 * src/c++98/Makefile.in: Regenerated.
335 * src/filesystem/Makefile.in: Regenerated.
337 2017-01-16 Jonathan Wakely <jwakely@redhat.com>
340 * src/c++11/functexcept.cc: Use new ABI for std::ios_base::failure
342 * testsuite/27_io/basic_ios/copyfmt/char/1.cc: Don't override ABI
343 for test, so new ios::failure can be caught.
344 * testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
345 * testsuite/27_io/basic_istream/extractors_arithmetic/char/
346 exceptions_failbit.cc: Likewise.
347 * testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
348 exceptions_failbit.cc: Likewise.
349 * testsuite/27_io/basic_istream/extractors_other/char/
350 exceptions_null.cc: Likewise.
351 * testsuite/27_io/basic_istream/extractors_other/wchar_t/
352 exceptions_null.cc: Likewise.
353 * testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
354 * testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
355 * testsuite/27_io/basic_ostream/inserters_other/char/
356 exceptions_null.cc: Likewise.
357 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/
358 exceptions_null.cc: Likewise.
359 * testsuite/27_io/ios_base/storage/2.cc: Likewise.
362 * include/bits/locale_classes.h (locale::facet::__shim): Change from
363 private to protected.
364 * src/c++11/cxx11-shim_facets.cc (__shim_accessor): Define helper to
365 make locale::facet::__shim accessible.
367 2017-01-16 Ville Voutilainen <ville.voutilainen@gmail.com>
370 * include/bits/list.tcc (merge(list&&)): Fix backwards size adjustments.
371 (merge(list&&, _StrictWeakOrdering)): Likewise.
372 * testsuite/23_containers/list/operations/78389.cc: Add
373 better test for the sizes.
375 2017-01-14 Jonathan Wakely <jwakely@redhat.com>
377 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
378 Skip test when -D_GLIBCXX_PROFILE mode is included in options.
379 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
380 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
382 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
383 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
384 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
385 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
386 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
388 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc::
390 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc::
392 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
394 * testsuite/23_containers/vector/modifiers/insert_vs_emplace.cc:
396 * testsuite/25_algorithms/binary_search/partitioned.cc: Likewise.
397 * testsuite/25_algorithms/equal_range/partitioned.cc: Likewise.
398 * testsuite/25_algorithms/lexicographical_compare/71545.cc: Likewise.
399 * testsuite/25_algorithms/lower_bound/partitioned.cc: Likewise.
400 * testsuite/25_algorithms/upper_bound/partitioned.cc: Likewise.
401 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
402 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
403 * testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
404 * testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
405 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
406 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
407 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
408 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
410 2017-01-13 Jonathan Wakely <jwakely@redhat.com>
413 * config/io/basic_file_stdio.cc (__basic_file<char>::close()): Don't
414 retry fclose on EINTR.
416 * include/profile/base.h: Remove unused header that leads to header
420 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
422 [!_GLIBCXX_USE_CXX11_ABI] (basic_string): Add member functions taking
423 basic_string_view arguments.
426 * testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Remove
427 redundant option from cxxflags.
428 (check_effective_target_cxx11-abi): Define.
429 * testsuite/21_strings/basic_string/allocator/71964.cc: Use cxx11-abi
431 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
432 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
434 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
436 * testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
437 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
439 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
441 * testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
442 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
444 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
446 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
448 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
450 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
452 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
454 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
456 * testsuite/23_containers/list/61347.cc: Likewise.
457 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
458 * testsuite/27_io/ios_base/failure/cxx11.cc: Likewise.
460 2017-01-13 Ville Voutilainen <ville.voutilainen@gmail.com>
463 * include/bits/list.tcc (merge(list&&)):
464 Adjust list sizes if the comparator throws.
465 (merge(list&&, _StrictWeakOrdering)): Likewise.
466 (sort()): Splice elements back from the scratch buffers
467 if the comparator throws.
468 (sort(_StrictWeakOrdering)): Likewise.
469 * testsuite/23_containers/list/operations/78389.cc: New.
471 2017-01-13 Jonathan Wakely <jwakely@redhat.com>
473 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Mark
474 XFAIL for C++17 until node reinsertion supports fancy pointers.
477 * testsuite/20_util/add_pointer/value.cc: Test forming function
480 2017-01-13 Michael Brune <lucdanton@free.fr>
483 * include/std/type_traits (__is_referenceable): Handle noexcept
486 2017-01-12 Jonathan Wakely <jwakely@redhat.com>
489 * include/bits/stl_queue.h (queue, priority_queue): Remove default
490 member-initializers and define default constructors as templates with
492 * include/bits/stl_stack.h (stack): Likewise.
493 * testsuite/23_containers/priority_queue/requirements/constructible.cc:
495 * testsuite/23_containers/priority_queue/requirements/
496 explicit_instantiation/1.cc: Test more instantiations.
497 * testsuite/23_containers/priority_queue/requirements/
498 explicit_instantiation/1_c++98.cc: Likewise.
499 * testsuite/23_containers/queue/requirements/constructible.cc: New.
500 * testsuite/23_containers/stack/requirements/constructible.cc: New.
503 * doc/xml/manual/intro.xml: Document LWG 2781 change.
504 * doc/html/*: Regenerate.
505 * include/std/functional (_Function_base::_Ref_manager): Remove.
506 (_Function_handler): Remove partial specializations for
508 (function::target): Remove special case for const qualification.
509 * testsuite/20_util/function/6.cc: Adjust tests for target type.
510 * testsuite/20_util/function/7.cc: Likewise.
511 * testsuite/20_util/function/8.cc: Likewise.
513 2017-01-11 Jonathan Wakely <jwakely@redhat.com>
516 * include/bits/stl_map.h (map::lower_bound, map::upper_bound)
517 (map::equal_range): Fix return type of heterogeneous overloads.
518 * include/bits/stl_multimap.h (multimap::lower_bound)
519 (multimap::upper_bound, multimap::equal_range): Likewise.
520 * include/bits/stl_multiset.h (multiset::lower_bound)
521 (multiset::upper_bound, multiset::equal_range): Likewise.
522 * include/bits/stl_set.h (set::lower_bound, set::upper_bound)
523 (set::equal_range): Likewise.
524 * testsuite/23_containers/map/operations/2.cc
525 * testsuite/23_containers/multimap/operations/2.cc
526 * testsuite/23_containers/multiset/operations/2.cc
527 * testsuite/23_containers/set/operations/2.cc
530 * include/bits/stl_map.h (map::count<_Kt>(const _Kt&)): Don't assume
531 the heterogeneous comparison can only find one match.
532 * include/bits/stl_set.h (set::count<_Kt>(const _Kt&)): Likewise.
533 * testsuite/23_containers/map/operations/2.cc: Test count works with
534 comparison function that just partitions rather than sorting.
535 * testsuite/23_containers/set/operations/2.cc: Likewise.
537 2017-01-11 Ville Voutilainen <ville.voutilainen@gmail.com>
539 Reduce the size of variant, it doesn't need an index of
540 type size_t internally.
541 * include/std/variant (parse_numbers.h): New include.
542 (__select_index): New.
543 (_Variant_storage<false, _Types...>::_M_reset_impl): Use
544 _index_type for comparison with variant_npos.
545 (_Variant_storage<false, _Types...>::__index_type): New.
546 (_Variant_storage<false, _Types...>::_M_index): Change the
547 type from size_t to __index_type.
548 (_Variant_storage<true, _Types...>::__index_type): New.
549 (_Variant_storage<true, _Types...>::_M_index): Change the
550 type from size_t to __index_type.
551 (_Variant_base::_M_valid): Use _Storage::__index_type
552 for comparison with variant_npos.
553 (variant::index): Use _Base::_Storage::__index_type
554 for comparison with variant_npos.
555 * testsuite/20_util/variant/index_type.cc: New.
557 2017-01-10 Jonathan Wakely <jwakely@redhat.com>
559 * testsuite/18_support/exception_ptr/60612-unexpected.cc: Adjust
560 effective target selector to prevent running in C++17 mode.
563 * include/bits/stl_queue.h (queue::c): Add default member initializer.
564 (queue::queue()): Add constructor and define as defaulted.
565 (queue::queue(_Sequence&&)): Remove default argument.
566 (priority_queue::c, priority_queue::comp): Add default member
568 (priority_queue::priority_queue()): Add constructor and define as
570 (priority_queue::priority_queue(const _Compare&, _Sequence&&)):
571 Remove default argument for first parameter.
572 * include/bits/stl_stack.h (stack::c): Add default member initializer.
573 (stack::stack()): Add constructor and define as defaulted.
574 (stack::stack(const _Sequence&)): Remove default argument.
575 * testsuite/23_containers/priority_queue/requirements/
576 explicit_instantiation/1.cc: Test explicit instantiation with
577 non-DefaultConstructible sequence.
578 * testsuite/23_containers/priority_queue/77528.cc: New test.
579 * testsuite/23_containers/priority_queue/requirements/
580 explicit_instantiation/1_c++0x.cc: Replace with 1_c++98.cc.
581 * testsuite/23_containers/queue/77528.cc: New test.
582 * testsuite/23_containers/queue/requirements/explicit_instantiation/
583 1.cc: Test explicit instantiation with non-DefaultConstructible
585 * testsuite/23_containers/queue/requirements/explicit_instantiation/
586 1_c++0x.cc: Replace with 1_c++98.cc.
587 * testsuite/23_containers/stack/77528.cc: New test.
588 * testsuite/23_containers/stack/requirements/explicit_instantiation/
589 1.cc: Test explicit instantiation with non-DefaultConstructible
591 * testsuite/23_containers/stack/requirements/explicit_instantiation/
592 1_c++0x.cc: Replace with 1_c++98.cc.
594 2017-01-10 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
596 * include/bits/locale_facets_nonio.tcc
597 (time_get::_M_extract_via_format): Avoid compilation errors with
598 non-standard struct tm.
600 2017-01-10 François Dumont <fdumont@gcc.gnu.org>
601 Jonathan Wakely <jwakely@redhat.com>
603 * python/libstdcxx/v6/printers.py (_versioned_namespace): Define.
604 (is_specialization, strip_versioned_namespace): New helpers functions
605 to work with symbols in the versioned namespace.
606 (Printer.add_version): Add second name using versioned namespace.
607 (add_one_template_type_printer, add_one_type_printer): Add second
608 type printers using versioned namespace.
609 (register_type_printers): Add template type printer for basic_string.
610 (build_libstdcxx_dictionary): Remove dead code.
611 * python/libstdcxx/v6/xmethods.py: Make all matchers look for
613 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
615 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
617 2017-01-09 Jonathan Wakely <jwakely@redhat.com>
620 * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
621 functions separately on darwin and if they're missing define
622 _GLIBCXX_NO_C99_ROUNDING_FUNCS.
623 * config.h.in: Regenerate.
624 * configure: Regenerate.
625 * include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
626 (llrintf, llrintl, llround, llroundf, llroundl): Do not define.
628 * testsuite/30_threads/condition_variable/members/3.cc: Use new macro
629 to detect correct thread_local destructors.
630 * testsuite/util/testsuite_hooks.h (CORRECT_THREAD_LOCAL_DTORS):
633 2017-01-09 Jonathan Wakely <jwakely@redhat.com>
634 Aditya Kumar <hiraditya@msn.com>
637 * include/bits/basic_string.tcc
638 (basic_string::find(const CharT*, size_type, size_type)): Optimize.
640 2017-01-06 Jonathan Wakely <jwakely@redhat.com>
642 * testsuite/21_strings/basic_string/operations/find/char/6.cc: New.
643 * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: New.
645 * testsuite/util/performance/priority_queue/mem_usage/pop_test.hpp:
646 Include <cassert> header.
649 * crossconfig.m4: Check for __cxa_thread_atexit on *-*-freebsd*.
650 * configure: Regenerate.
652 2017-01-06 Barrett Adair <barrettellisadair@gmail.com>
653 Jonathan Wakely <jwakely@redhat.com>
655 * include/std/variant (variant, swap): Replace __and_ usage with fold
658 2017-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
661 * acinclude.m4 (GLIBCXX_CHECK_ASSEMBLER_HWCAP): Remove.
662 * configure.ac: Call GCC_CHECK_ASSEMBLER_HWCAP instead of
663 GLIBCXX_CHECK_ASSEMBLER_HWCAP.
664 * fragment.am (CONFIG_CXXFLAGS): Use HWCAP_CFLAGS instead of
666 * aclocal.m4: Regenerate.
667 * configure: Regenerate.
668 * Makefile.in, doc/Makefile.in, include/Makefile.in,
669 libsupc++/Makefile.in, po/Makefile.in, python/Makefile.in,
670 src/Makefile.in, src/c++11/Makefile.in, src/c++98/Makefile.in,
671 src/filesystem/Makefile.in, testsuite/Makefile.in: Regenerate.
673 2017-01-06 Jonathan Wakely <jwakely@redhat.com>
675 * include/bits/c++config (_GLIBCXX_ASSERTIONS): Avoid redefinition.
678 * include/bits/predefined_ops.h (_Iter_comp_iter, _Iter_comp_val)
679 (_Val_comp_iter, _Iter_equals_val, _Iter_pred, _Iter_comp_to_val)
680 (_Iter_comp_to_iter, _Iter_negate): Make constructors explicit and
681 move function objects.
682 (__iter_comp_iter, __iter_comp_val, __val_comp_iter, __pred_iter)
683 (__iter_comp_val, __iter_comp_iter, __negate): Move function objects.
684 * testsuite/25_algorithms/sort/78991.cc: New test.
686 2017-01-05 Jonathan Wakely <jwakely@redhat.com>
688 * include/bits/std_function.h (function::_Signature_type): Remove.
689 (function::function(_Functor)): Adjust.
691 2017-01-05 Tim Shen <timshen@google.com>
694 * include/std/variant (__gen_vtable_impl): rename __unused to
695 __dimensions to avoid naming conflict.
697 2017-01-04 Jonathan Wakely <jwakely@redhat.com>
700 * config.h.in: Regenerate.
701 * configure: Likewise.
702 * configure.ac: Check for __cxa_thread_atexit.
703 * libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
704 Don't define __cxa_thread_atexit if libc provides it.
706 2017-01-04 Ville Voutilainen <ville.voutilainen@gmail.com>
708 Implement 2801, Default-constructibility of unique_ptr.
709 * include/bits/unique_ptr.h (__uniq_ptr_impl::_DeleterConstraint): New.
710 (unique_ptr::_DeleterConstraint): Likewise.
711 (unique_ptr()): Constrain.
712 (unique_ptr(pointer)): Likewise.
713 (unique_ptr(nullptr_t)): Likewise.
714 (unique_ptr<_Tp[], _Dp>::_DeleterConstraint): New.
715 (unique_ptr<_Tp[], _Dp>::unique_ptr()): Constrain.
716 (unique_ptr<_Tp[], _Dp>::unique_ptr(_Up)): Likewise.
717 (unique_ptr<_Tp[], _Dp>::unique_ptr(nullptr_t)): Likewise.
718 * testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust.
719 * testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
720 * testsuite/20_util/unique_ptr/cons/default.cc: New.
721 * testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Adjust.
723 2017-01-04 Pauli Nieminen <suokkos@gmail.com>
724 Jonathan Wakely <jwakely@redhat.com>
727 * acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
728 * config.h.in: Regenerate.
729 * config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
730 (GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
731 exports for exception_ptr, nested_exception, and future conditional.
732 [HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
733 exports for exception_ptr, nested_exception, and future conditional.
734 * configure: Regenerate.
735 * configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
736 * include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
737 * libsupc++/eh_atomics.h: New file for internal use only.
738 (__eh_atomic_inc, __eh_atomic_dec): New.
739 * libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
740 (exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
741 (rethrow_exception): Use eh_atomics.h reference counting helpers.
742 * libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
743 * libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
744 * libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
745 * libsupc++/exception_ptr.h: Likewise.
746 * libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
747 * libsupc++/nested_exception.cc: Remove check for
748 ATOMIC_INT_LOCK_FREE.
749 * libsupc++/nested_exception.h: Likewise.
750 * src/c++11/future.cc: Likewise.
751 * testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
752 * testsuite/18_support/nested_exception/*: Likewise.
753 * testsuite/30_threads/async/*: Likewise.
754 * testsuite/30_threads/future/*: Likewise.
755 * testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
756 * testsuite/30_threads/packaged_task/*: Likewise.
757 * testsuite/30_threads/promise/*: Likewise.
758 * testsuite/30_threads/shared_future/*: Likewise.
760 2017-01-03 Gerald Pfeifer <gerald@pfeifer.com>
762 * doc/xml/manual/documentation_hacking.xml: sourceforge.net now
763 defaults to https; adjust reference.
765 2017-01-03 Jonathan Wakely <jwakely@redhat.com>
768 * include/std/thread (thread(const thread&&)): Add deleted
770 * testsuite/30_threads/thread/cons/lwg2097.cc: New test.
772 * doc/xml/manual/spine.xml: Update copyright years.
773 * doc/xml/manual/build_hacking.xml: Fix spelling of libbuilddir.
774 * doc/xml/manual/test.xml: Likewise.
775 * doc/html/*: Regenerate.
777 2017-01-01 Gerald Pfeifer <gerald@pfeifer.com>
779 * doc/xml/faq.xml: Update address of C++ ABI link.
780 * doc/xml/manual/abi.xml: Ditto.
782 2017-01-01 Jakub Jelinek <jakub@redhat.com>
784 Update copyright years.
786 Copyright (C) 2017 Free Software Foundation, Inc.
788 Copying and distribution of this file, with or without modification,
789 are permitted in any medium without royalty provided the copyright
790 notice and this notice are preserved.