Jonathan Wakely
295ce2e534
Remove unnecessary typedef from std::function
...
* include/bits/std_function.h (function::_Signature_type): Remove.
(function::function(_Functor)): Adjust.
From-SVN: r244107
2017-01-05 17:35:49 +00:00
Tim Shen
0f9cf7ff83
re PR libstdc++/78996 (<variant> uses macro as name)
...
2017-01-05 Tim Shen <timshen@google.com>
PR libstdc++/78996
* include/std/variant (__gen_vtable_impl): rename __unused to
__dimensions to avoid naming conflict.
From-SVN: r244092
2017-01-05 03:18:17 +00:00
Jonathan Wakely
2a792efe7f
PR78968 add configure check for __cxa_thread_atexit in libc
...
PR libstdc++/78968
* config.h.in: Regenerate.
* configure: Likewise.
* configure.ac: Check for __cxa_thread_atexit.
* libsupc++/atexit_thread.cc [_GLIBCXX_HAVE___CXA_THREAD_ATEXIT]:
Don't define __cxa_thread_atexit if libc provides it.
From-SVN: r244057
2017-01-04 15:41:19 +00:00
Ville Voutilainen
1308676957
Implement 2801, Default-constructibility of unique_ptr.
...
* include/bits/unique_ptr.h (__uniq_ptr_impl::_DeleterConstraint): New.
(unique_ptr::_DeleterConstraint): Likewise.
(unique_ptr()): Constrain.
(unique_ptr(pointer)): Likewise.
(unique_ptr(nullptr_t)): Likewise.
(unique_ptr<_Tp[], _Dp>::_DeleterConstraint): New.
(unique_ptr<_Tp[], _Dp>::unique_ptr()): Constrain.
(unique_ptr<_Tp[], _Dp>::unique_ptr(_Up)): Likewise.
(unique_ptr<_Tp[], _Dp>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Adjust.
* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
* testsuite/20_util/unique_ptr/cons/default.cc: New.
* testsuite/20_util/unique_ptr/cons/ptr_deleter_neg.cc: Adjust.
From-SVN: r244054
2017-01-04 15:21:02 +02:00
Pauli Nieminen
ed3cb49703
Support exception propagation without lock-free atomic int
...
2017-01-04 Pauli Nieminen <suokkos@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/64735
* acinclude.m4 (GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER): Define.
* config.h.in: Regenerate.
* config/abi/pre/gnu.ver [HAVE_EXCEPTION_PTR_SINCE_GCC46]
(GLIBCXX_3.4.15, GLIBCXX_3.4.21, CXXABI_1.3.3, CXXABI_1.3.5): Make
exports for exception_ptr, nested_exception, and future conditional.
[HAVE_EXCEPTION_PTR_SINCE_GCC46] (GLIBCXX_3.4.23, CXXABI_1.3.11): Add
exports for exception_ptr, nested_exception, and future conditional.
* configure: Regenerate.
* configure.ac: Use GLIBCXX_CHECK_EXCEPTION_PTR_SYMVER.
* include/std/future: Remove check for ATOMIC_INT_LOCK_FREE
* libsupc++/eh_atomics.h: New file for internal use only.
(__eh_atomic_inc, __eh_atomic_dec): New.
* libsupc++/eh_ptr.cc (exception_ptr::_M_addref)
(exception_ptr::_M_release) (__gxx_dependent_exception_cleanup)
(rethrow_exception): Use eh_atomics.h reference counting helpers.
* libsupc++/eh_throw.cc (__gxx_exception_cleanup): Likewise.
* libsupc++/eh_tm.cc (free_any_cxa_exception): Likewise.
* libsupc++/exception: Remove check for ATOMIC_INT_LOCK_FREE.
* libsupc++/exception_ptr.h: Likewise.
* libsupc++/guard.cc: Include header for ATOMIC_INT_LOCK_FREE macro.
* libsupc++/nested_exception.cc: Remove check for
ATOMIC_INT_LOCK_FREE.
* libsupc++/nested_exception.h: Likewise.
* src/c++11/future.cc: Likewise.
* testsuite/18_support/exception_ptr/*: Remove atomic builtins checks.
* testsuite/18_support/nested_exception/*: Likewise.
* testsuite/30_threads/async/*: Likewise.
* testsuite/30_threads/future/*: Likewise.
* testsuite/30_threads/headers/future/types_std_c++0x.cc: Likewise.
* testsuite/30_threads/packaged_task/*: Likewise.
* testsuite/30_threads/promise/*: Likewise.
* testsuite/30_threads/shared_future/*: Likewise.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r244051
2017-01-04 10:54:59 +00:00
Gerald Pfeifer
c671a0d674
documentation_hacking.xml: sourceforge.net now defaults to https; adjust reference.
...
* doc/xml/manual/documentation_hacking.xml: sourceforge.net now
defaults to https; adjust reference.
From-SVN: r244043
2017-01-04 02:33:08 +00:00
Jonathan Wakely
80efc5073d
Add deleted std::thread(const thread&&) constructor
...
PR libstdc++/78956
* include/std/thread (thread(const thread&&)): Add deleted
constructor.
* testsuite/30_threads/thread/cons/lwg2097.cc: New test.
From-SVN: r244022
2017-01-03 13:31:26 +00:00
Jonathan Wakely
f61581f7a0
Fix typos in libstdc++ docs and update copyright years
...
* doc/xml/manual/spine.xml: Update copyright years.
* doc/xml/manual/build_hacking.xml: Fix spelling of libbuilddir.
* doc/xml/manual/test.xml: Likewise.
* doc/html/*: Regenerate.
From-SVN: r244017
2017-01-03 11:16:31 +00:00
Gerald Pfeifer
337160b8ec
faq.xml: Update address of C++ ABI link.
...
* doc/xml/faq.xml: Update address of C++ ABI link.
* doc/xml/manual/abi.xml: Ditto.
From-SVN: r244001
2017-01-02 00:33:17 +00:00
Jakub Jelinek
cbe34bb5ed
Update copyright years.
...
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Ville Voutilainen
2ae2d394c1
Implement LWG 2842, in_place_t check for optional::optional(U&&) should decay U.
...
Implement LWG 2842, in_place_t check for optional::optional(U&&)
should decay U.
* include/std/optional (_Optional_base(in_place_t, _Args&&...)):
Constrain.
(_Optional_base(in_place_t, initializer_list<_Up>, _Args&&...)):
Turn the int-pack constraint hack into a saner bool.
(_Optional_base<_Tp, false>::_Optional_base(in_place_t, _Args&&...)):
Constrain.
(_Optional_base<_Tp, false>::_Optional_base(in_place_t,
initializer_list<_Up>, _Args&&...)):
Turn the int-pack constraint hack into a saner bool.
(optional(_Up&&)): Constrain against in_place_t.
(optional(in_place_t, _Args&&...)): Constrain.
(constexpr optional(in_place_t, initializer_list<_Up>, _Args&&...)):
Turn the int-pack constraint hack into a saner bool.
* testsuite/20_util/optional/cons/value_neg.cc: Add a test for
a type that is constructible from in_place.
From-SVN: r243966
2016-12-29 21:19:59 +02:00
François Dumont
284a35df5d
random.tcc: Fix usage of _OutputIteratorConcept.
...
2016-12-24 François Dumont <fdumont@gcc.gnu.org>
* include/ext/random.tcc: Fix usage of _OutputIteratorConcept.
From-SVN: r243915
2016-12-24 14:13:58 +00:00
Jason Merrill
31bfc9b9dd
Implement P0522R0, matching of template template arguments.
...
gcc/c-family/
* c.opt (-fnew-ttp-matching): New flag.
* c-opts.c (c_common_post_options): Default on if -std=c++1z.
gcc/cp/
* pt.c (coerce_template_template_parms): Allow a template argument
that's less specialized than the parameter.
(unify_bound_ttp_args): Adjust parm's args to apply to arg's
template.
(coerce_template_args_for_ttp): Split out from
lookup_template_class_1.
(coerce_ttp_args_for_tta, store_defaulted_ttp)
(lookup_defaulted_ttp, add_defaults_to_ttp): New.
(process_partial_specialization): Set DECL_CONTEXT of
template template-parameters.
(coerce_template_parms): Only inform when complain.
(expand_template_argument_pack): Handle error_mark_node.
(convert_template_argument, template_args_equal, unify): Handle
any_targ_node.
* cp-tree.h (enum cp_tree_index): Add CPTI_ANY_TARG.
(any_targ_node): New.
* decl.c (cxx_init_decl_processing): Set it.
* name-lookup.c (consider_binding_level): Ignore names with embedded
spaces.
From-SVN: r243871
2016-12-21 14:39:04 -05:00
Jason Merrill
57a6add274
Fix handling of explicit function template arguments with TTPs.
...
gcc/cp/
* pt.c (coerce_template_parms): Consider variadic_args_p before
complaining about too many template arguments.
libstdc++-v3/
* testsuite/util/testsuite_tr1.h (test_property): Don't define both
variadic and non-variadic overloads.
From-SVN: r243869
2016-12-21 14:38:44 -05:00
Jonathan Wakely
e76d309851
PR 71444 define more error constants for mingw-w64
...
PR libstdc++/71444
* config/os/mingw32-w64/error_constants.h
(address_family_not_supported, address_in_use, address_not_available)
(already_connected, connection_aborted, connection_already_in_progress)
connection_refused, connection_reset, cross_device_link)
(destination_address_required, host_unreachable, message_size)
(network_down, network_reset, network_unreachable, no_buffer_space)
(no_protocol_option, not_a_socket, not_connected, operation_canceled)
(operation_in_progress, operation_not_supported, protocol_error)
(protocol_not_supported, too_many_links, too_many_symbolic_link_levels)
(value_too_large, wrong_protocol_type): Define.
(bad_message, identifier_removed, no_link, no_message_available)
(no_message, no_stream_resources, not_a_stream, owner_dead)
(state_not_recoverable, stream_timeout, text_file_busy): Define
conditionally.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Guard test for no_message with _GLIBCXX_HAVE_ENOMSG.
From-SVN: r243853
2016-12-21 13:09:13 +00:00
Ville Voutilainen
4b21c3ea03
Make the perfect-forwarding constructor of a two-element tuple sfinae away when the first argument is an allocator_arg.
...
Make the perfect-forwarding constructor of a two-element tuple
sfinae away when the first argument is an allocator_arg.
* include/std/tuple (tuple(_U1&&, _U2&&)): Constrain.
* testsuite/20_util/tuple/cons/allocator_with_any.cc: New.
* testsuite/20_util/tuple/element_access/get_neg.cc: Adjust.
From-SVN: r243795
2016-12-19 14:55:33 +02:00
Jonathan Wakely
f23e3d74a1
Reuse Doxygen comments for map::erase overloads
...
* include/bits/stl_map.h (map::erase(iterator)): Add Doxygen markup
to reuse documentation for erase(const_iterator) overload.
* include/bits/stl_multimap.h (multimap::erase(iterator)): Likewise.
From-SVN: r243758
2016-12-16 18:13:20 +00:00
Jonathan Wakely
36b8852641
Add assertion to _Rb_tree::erase to check for end iterators
...
* include/bits/stl_tree.h (_Rb_tree::_M_erase_aux(const_iterator)):
Add assertion for undefined argument.
(_Rb_tree::_M_erase_aux(const_iterator, const_iterator)): Call
_M_erase_aux directly instead of through erase.
(_Rb_tree::_M_erase_aux(const Key&)): Likewise.
* testsuite/23_containers/map/modifiers/erase/end_neg.cc: New test.
From-SVN: r243757
2016-12-16 18:13:09 +00:00
Ville Voutilainen
6254952346
Implement LWG 2769, Redundant const in the return type of any_cast(const any&).
...
Implement LWG 2769, Redundant const in the return type of
any_cast(const any&).
* include/std/any (_AnyCast): New.
(any_cast(const any&)): Use it and add an explicit cast for return.
(any_cast(any&)): Likewise.
(any_cast(any&&)): Likewise.
* testsuite/20_util/any/misc/any_cast.cc: Add a test for a type
that has an explicit copy constructor.
*testsuite/20_util/any/misc/any_cast_neg.cc: Adjust.
From-SVN: r243739
2016-12-16 13:34:45 +02:00
Jonathan Wakely
bdfc9f5c54
PR59170 make pretty printers check for singular iterators
...
PR libstdc++/59170
* python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
(StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
(StdRbtreeIteratorPrinter.to_string)
(StdDequeIteratorPrinter.to_string): Add check for value-initialized
iterators.
* testsuite/libstdc++-prettyprinters/simple.cc: Test them.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
From-SVN: r243692
2016-12-15 14:13:36 +00:00
Jonathan Wakely
50a8a9413d
PR59161 make pretty printers always return strings
...
PR libstdc++/59161
* python/libstdcxx/v6/printers.py (StdListIteratorPrinter.to_string)
(StdSlistIteratorPrinter.to_string, StdVectorIteratorPrinter.to_string)
(StdRbtreeIteratorPrinter.to_string, StdDequeIteratorPrinter.to_string)
(StdDebugIteratorPrinter.to_string): Return string instead of
gdb.Value.
* testsuite/libstdc++-prettyprinters/59161.cc: New test.
From-SVN: r243690
2016-12-15 13:25:22 +00:00
Jonathan Wakely
7224c6a997
Tweak formatting and docs for pretty printers
...
* python/libstdcxx/v6/printers.py (UniquePointerPrinter.to_string):
Remove redundant parentheses.
(RbtreeIterator, StdRbtreeIteratorPrinter): Add docstrings.
(StdForwardListPrinter.to_string): Remove redundant parentheses.
(StdExpOptionalPrinter.to_string): Use string formatting instead of
concatenation.
(StdVariantPrinter.to_string, StdNodeHandlePrinter.to_string)
(TemplateTypePrinter): Adjust whitespace.
From-SVN: r243689
2016-12-15 12:45:47 +00:00
Jonathan Wakely
0376e86bfc
Add GDB XMethods for shared_ptr and unique_ptr<T[]>
...
* python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker.__init__): Use
correct element type for unique_ptr<T[]>.
(UniquePtrGetWorker._supports, UniquePtrDerefWorker._supports): New
functions to disable unsupported operators for unique_ptr<T[]>.
(UniquePtrSubscriptWorker): New worker for operator[].
(UniquePtrMethodsMatcher.__init__): Register UniquePtrSubscriptWorker.
(UniquePtrMethodsMatcher.match): Call _supports on the chosen worker.
(SharedPtrGetWorker, SharedPtrDerefWorker, SharedPtrSubscriptWorker)
(SharedPtrUseCountWorker, SharedPtrUniqueWorker): New workers.
(SharedPtrMethodsMatcher): New matcher for shared_ptr.
(register_libstdcxx_xmethods): Register SharedPtrMethodsMatcher.
* testsuite/libstdc++-xmethods/unique_ptr.cc: Test arrays.
* testsuite/libstdc++-xmethods/shared_ptr.cc: New test.
From-SVN: r243688
2016-12-15 12:45:42 +00:00
François Dumont
b958889311
stl_tree.h (_Rb_tree_impl(const _Key_compare&, const _Node_allocator&): Restore before C++11 mode.
...
2016-12-14 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_tree.h
(_Rb_tree_impl(const _Key_compare&, const _Node_allocator&): Restore
before C++11 mode.
From-SVN: r243670
2016-12-14 20:50:07 +00:00
Jonathan Wakely
d33c00e1ce
Make printers use singular noun for a single element
...
* python/libstdcxx/v6/printers.py (num_elements): New function.
(StdMapPrinter.to_string, StdSetPrinter.to_string)
(StdDequePrinter.to_string, Tr1UnorderedSetPrinter.to_string)
(Tr1UnorderedMapPrinter.to_string): Use num_elements.
* testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected results
to use singular noun when there is only one element.
* testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
* testsuite/libstdc++-prettyprinters/tr1.cc: Likewise.
From-SVN: r243652
2016-12-14 16:07:29 +00:00
Jonathan Wakely
3c760f4a79
Make printers detect invalid debug mode iterators
...
PR libstdc++/59170
* python/libstdcxx/v6/printers.py (StdDebugIteratorPrinter): Use
_M_sequence and _M_version to detect invalid iterators.
* testsuite/libstdc++-prettyprinters/debug.cc: Test debug mode vector
and test invalid iterators.
* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: New test.
From-SVN: r243650
2016-12-14 15:17:57 +00:00
Kyrylo Tkachov
39c429372b
[libstdc++][testsuite] XFAIL tests relying on long double-to-string conversions on broken newlib
...
* lib/target-supports.exp
(check_effective_target_newlib_broken_long_double_io): New check.
(check_effective_target_frexpl): Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
XFAIL run if newlib_broken_long_double_io.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
Likewise.
* testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc:
Likewise.
From-SVN: r243558
2016-12-12 15:47:47 +00:00
Jonathan Wakely
1c43384234
Remove stray character at end of dg-do directive
...
* testsuite/experimental/filesystem/operations/is_empty.cc:
Remove stray character at end of dg-do directive.
From-SVN: r243555
2016-12-12 14:32:23 +00:00
Jonathan Wakely
8152d6eff6
Remove stray character at end of dg-do directive
...
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
Remove stray character at end of dg-do directive.
From-SVN: r243548
2016-12-12 12:44:46 +00:00
Jonathan Wakely
9b796223a3
Fix std::variant for gnu-versioned--namespace build
...
* include/std/variant: Remove misplaced
_GLIBCXX_BEGIN_NAMESPACE_VERSION macro.
From-SVN: r243489
2016-12-09 15:22:01 +00:00
David Edelsohn
410aa8982f
parallel_algorithm_assert2.cc: Move dg-do run first.
...
* testsuite/25_algorithms/headers/algorithm/
parallel_algorithm_assert2.cc: Move dg-do run first.
From-SVN: r243468
2016-12-08 17:35:24 -05:00
Eric Botcazou
0a7577bbac
re PR libstdc++/78264 (ICE in build_noexcept_spec, at cp/except.c:1196)
...
PR libstdc++/78264
* include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM): Turn _N into _NE.
(_GLIBCXX_NOEXCEPT_QUAL): Likewise.
From-SVN: r243443
2016-12-08 15:52:11 +00:00
Jonathan Wakely
fdb0b271e8
Fix filesystem test that fails in debug mode
...
* testsuite/experimental/filesystem/path/construct/range.cc: Don't
use basic_string::front() when string might be empty.
From-SVN: r243438
2016-12-08 13:25:09 +00:00
Jonathan Wakely
1d752b4fee
Delete std::swap for debug mode array
...
* include/debug/array (swap): Add deleted overload.
* include/bits/stl_pair.h (swap): Remove redundant inline keyword
from deleted overload.
* include/bits/unique_ptr.h (swap): Likewise.
* include/std/array (swap): Likewise.
* include/std/optional (swap): Likewise.
* include/std/tuple (swap): Likewise.
* include/std/variant (swap): Likewise.
* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
Adjust dg-error line numbers.
* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/
tuple_element_debug_neg.cc: Likewise.
* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
Likewise.
From-SVN: r243437
2016-12-08 13:25:03 +00:00
Jonathan Wakely
eae0b895e0
PR71856 try to fix Parallel Mode assertions again
...
PR libstdc++/71856
* doc/xml/manual/using.xml: Document macro.
* include/bits/c++config [_GLIBCXX_DEBUG || _GLIBCXX_PARALLEL]
(__glibcxx_assert): Rename to __glibcxx_assert_impl.
[_GLIBCXX_DEBUG] (__glibcxx_assert): Expand to __glibcxx_assert_impl.
* include/parallel/base.h [_GLIBCXX_PARALLEL_ASSERTIONS]
(_GLIBCXX_PARALLEL_ASSERT): Expand to __glibcxx_assert_impl.
[!_GLIBCXX_PARALLEL_ASSERTIONS] (_GLIBCXX_PARALLEL_ASSERT): Define as
empty.
* testsuite/25_algorithms/headers/algorithm/
parallel_algorithm_assert2.cc: New test.
From-SVN: r243434
2016-12-08 12:08:14 +00:00
Jakub Jelinek
1d09844a1c
P0003R5 - removal of dynamic exception specification from C++17
...
P0003R5 - removal of dynamic exception specification from C++17
* parser.c (cp_parser_exception_specification_opt): For C++17
error out on throw ( type-id-list ), for C++11 and C++14 issue
-Wdeprecated warning on it. Formatting fix. Treat throw()
in C++17 as noexcept(true).
* g++.dg/compat/eh/ctor1.h: Adjust for deprecation of
throw (type-id-list) in C++11 and C++14 and removal in C++17.
* g++.dg/compat/eh/ctor1_y.C: Likewise.
* g++.dg/compat/eh/new1_x.C: Likewise.
* g++.dg/compat/eh/new1_y.C: Likewise.
* g++.dg/compat/eh/spec3_x.C: Likewise.
* g++.dg/compat/eh/spec3_y.C: Likewise.
* g++.dg/compat/eh/template1.h: Likewise.
* g++.dg/compat/eh/template1_y.C: Likewise.
* g++.dg/compat/eh/unexpected1_x.C: Likewise.
* g++.dg/compat/eh/unexpected1_y.C: Likewise.
* g++.dg/cpp0x/auto9.C: Likewise.
* g++.dg/cpp0x/defaulted23.C: Likewise.
* g++.dg/cpp0x/error5.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-eh2.C: Likewise.
* g++.dg/cpp0x/noexcept02.C: Likewise.
* g++.dg/cpp0x/noexcept07.C: Likewise.
* g++.dg/cpp0x/noexcept08.C: Likewise.
* g++.dg/cpp0x/noexcept19.C: Likewise.
* g++.dg/cpp0x/variadic73.C: Likewise.
* g++.dg/cpp0x/variadic-throw.C: Likewise.
* g++.dg/cpp1z/noexcept-type1.C: Likewise.
* g++.dg/eh/async-unwind2.C: Likewise.
* g++.dg/eh/cond4.C: Likewise.
* g++.dg/eh/delete1.C: Likewise.
* g++.dg/eh/ehopt1.C: Likewise.
* g++.dg/eh/forced3.C: Likewise.
* g++.dg/eh/forced4.C: Likewise.
* g++.dg/eh/init-temp2.C: Likewise.
* g++.dg/eh/pr38662.C: Likewise.
* g++.dg/eh/pr41819.C: Likewise.
* g++.dg/eh/shadow1.C: Likewise.
* g++.dg/eh/spec2.C: Likewise.
* g++.dg/eh/spec3.C: Likewise.
* g++.dg/eh/spec5.C: Likewise.
* g++.dg/eh/spec6.C: Likewise.
* g++.dg/eh/spec7.C: Likewise.
* g++.dg/eh/spec8.C: Likewise.
* g++.dg/eh/spec9.C: Likewise.
* g++.dg/eh/template1.C: Likewise.
* g++.dg/eh/unexpected1.C: Likewise.
* g++.dg/ext/has_nothrow_assign.C: Likewise.
* g++.dg/ext/has_nothrow_constructor.C: Likewise.
* g++.dg/ext/has_nothrow_copy-1.C: Likewise.
* g++.dg/ext/has_nothrow_copy-2.C: Likewise.
* g++.dg/ext/has_nothrow_copy-4.C: Likewise.
* g++.dg/ext/has_nothrow_copy-5.C: Likewise.
* g++.dg/ext/has_nothrow_copy-6.C: Likewise.
* g++.dg/ext/has_nothrow_copy-7.C: Likewise.
* g++.dg/gcov/gcov-7.C: Likewise.
* g++.dg/init/new13.C: Likewise.
* g++.dg/init/new25.C: Likewise.
* g++.dg/lookup/exception1.C: Likewise.
* g++.dg/opt/noreturn-1.C: Likewise.
* g++.dg/other/error3.C: Likewise.
* g++.dg/rtti/crash3.C: Likewise.
* g++.dg/template/eh2.C: Likewise.
* g++.dg/template/error36.C: Likewise.
* g++.dg/tm/pr46567.C: Likewise.
* g++.dg/tm/pr47340.C: Likewise.
* g++.dg/torture/pr46364.C: Likewise.
* g++.dg/torture/pr49394.C: Likewise.
* g++.dg/torture/pr52918-1.C: Likewise.
* g++.dg/torture/pr57190.C: Likewise.
* g++.dg/torture/stackalign/eh-alloca-1.C: Likewise.
* g++.dg/torture/stackalign/eh-fastcall-1.C: Likewise.
* g++.dg/torture/stackalign/eh-global-1.C: Likewise.
* g++.dg/torture/stackalign/eh-inline-1.C: Likewise.
* g++.dg/torture/stackalign/eh-inline-2.C: Likewise.
* g++.dg/torture/stackalign/eh-thiscall-1.C: Likewise.
* g++.dg/torture/stackalign/eh-vararg-1.C: Likewise.
* g++.dg/torture/stackalign/eh-vararg-2.C: Likewise.
* g++.dg/tree-ssa/pr45605.C: Likewise.
* g++.dg/warn/Wreturn-type-3.C: Likewise.
* g++.old-deja/g++.eh/badalloc1.C: Likewise.
* g++.old-deja/g++.eh/cleanup2.C: Likewise.
* g++.old-deja/g++.eh/spec1.C: Likewise.
* g++.old-deja/g++.eh/spec2.C: Likewise.
* g++.old-deja/g++.eh/spec3.C: Likewise.
* g++.old-deja/g++.eh/spec4.C: Likewise.
* g++.old-deja/g++.eh/spec6.C: Likewise.
* g++.old-deja/g++.eh/throw1.C: Likewise.
* g++.old-deja/g++.eh/throw2.C: Likewise.
* g++.old-deja/g++.eh/tmpl1.C: Likewise.
* g++.old-deja/g++.eh/tmpl3.C: Likewise.
* g++.old-deja/g++.mike/eh15.C: Likewise.
* g++.old-deja/g++.mike/eh25.C: Likewise.
* g++.old-deja/g++.mike/eh33.C: Likewise.
* g++.old-deja/g++.mike/eh34.C: Likewise.
* g++.old-deja/g++.mike/eh50.C: Likewise.
* g++.old-deja/g++.mike/eh51.C: Likewise.
* g++.old-deja/g++.mike/eh55.C: Likewise.
* g++.old-deja/g++.mike/p10416.C: Likewise.
* g++.old-deja/g++.other/crash28.C: Likewise.
* g++.old-deja/g++.other/crash30.C: Likewise.
* g++.old-deja/g++.other/new7.C: Likewise.
* g++.old-deja/g++.pt/ehspec1.C: Likewise.
* g++.old-deja/g++.robertl/eb123.C: Likewise.
* testsuite/util/testsuite_new_operators.h: Include testsuite_hooks.h.
(operator new): Use THROW macro.
From-SVN: r243429
2016-12-08 09:26:06 +01:00
François Dumont
352f824f09
2016-12-07 François Dumont <fdumont@gcc.gnu.org>
...
* include/bits/stl_tree.h
(_Rb_tree<>::_M_copy(_Const_Link_type, _Base_ptr)): Delete.
(_Rb_tree<>::_M_copy(const _Rb_tree&, _NodeGen&)): New.
(_Rb_tree<>::_M_copy(const _Rb_tree&)): New, use latter.
(_Rb_tree<>(const _Rb_tree&): Use latter.
(_Rb_tree<>(const _Rb_tree&, const allocator_type&)): Likewise.
(_Rb_tree<>::_M_move_data(_Rb_tree&, false_type)): Likewise.
(_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Likewise.
(_Rb_tree<>::operator=(const _Rb_tree&)): Likewise.
From-SVN: r243380
2016-12-07 21:16:24 +00:00
François Dumont
a4dec0d6de
stl_map.h (map(const map&)): Make default.
...
2016-12-07 François Dumont <fdumont@gcc.gnu.org>
* include/bits/stl_map.h (map(const map&)): Make default.
(map(map&&)): Likewise.
(~map()): Likewise.
(operator=(const map&)): Likewise.
* include/bits/stl_multimap.h (multimap(const multimap&)): Make default.
(multimap(multimap&&)): Likewise.
(~multimap()): Likewise.
(operator=(const multimap&)): Likewise.
* include/bits/stl_set.h (set(const set&)): Make default.
(set(set&&)): Likewise.
(~set()): Likewise.
(operator=(const set&)): Likewise.
* include/bits/stl_multiset.h (multiset(const multiset&)): Make default.
(multiset(multiset&&)): Likewise.
(~multiset()): Likewise.
(operator=(const multiset&)): Likewise.
* include/bits/stl_tree.h (_Rb_tree_key_compare<>): New.
(_Rb_tree_header): New.
(_Rb_tree_impl): Inherit from latters.
(_Rb_tree_impl()): Make default.
(_Rb_tree_impl(const _Rb_tree_impl&)): New.
(_Rb_tree<>(const _Rb_tree&): Use latter.
(_Rb_tree_impl(_Rb_tree_impl&&)): New, default.
(_Rb_tree_impl(const _Key_compare&, const _Node_allocator&)): Delete.
(_Rb_tree_impl::_M_reset): Move...
(_Rb_tree_header::_M_reset): ...here.
(_Rb_tree_impl::_M_initialize): Delete.
(_Rb_tree(_Rb_tree&&)): Make default.
(_Rb_tree_header::_M_move_data(_Rb_tree_header&)): New.
(_Rb_tree<>::_M_move_data(_Rb_tree&, true_type)): Use latter.
(_Rb_tree<>(_Rb_tree&&)): Make default.
From-SVN: r243379
2016-12-07 21:12:49 +00:00
Jonathan Wakely
435f434288
Replace uses of C++14 remove_cv_t alias in C++11 header
...
* include/experimental/bits/fs_path.h (path::_S_convert): Replace
uses of C++14 std::remove_cv_t alias template.
From-SVN: r243355
2016-12-07 15:23:01 +00:00
Jonathan Wakely
d71f5aa799
Replace use of C++14 std::exchange in C++11 testcase
...
* testsuite/28_regex/traits/char/user_defined.cc: Replace uses of
C++14 std::exchange function.
From-SVN: r243354
2016-12-07 15:22:57 +00:00
Jonathan Wakely
1f153a1d2a
Replace dynamic exception specifications in testsuite
...
* testsuite/util/testsuite_hooks.h (THROW): Define.
* testsuite/util/replacement_memory_operators.h: Include
testsuite_hooks.h and use THROW macro.
* testsuite/util/testsuite_tr1.h: Likewise.
* testsuite/20_util/allocator/1.cc: Use THROW macro.
* testsuite/22_locale/locale/cons/12352.cc: Likewise.
* testsuite/23_containers/vector/zero_sized_allocations.cc: Likewise.
* testsuite/30_threads/lock_guard/cons/1.cc: Replace dynamic exception
specification with noexcept-specifier.
* testsuite/ext/pool_allocator/allocate_chunk.cc: Include
testsuite_hooks.h and use THROW macro.
* testsuite/ext/profile/replace_new.cc: Likewise.
From-SVN: r243353
2016-12-07 15:22:51 +00:00
Jonathan Wakely
ba454dfbbe
Use _GLIBCXX_THROW macro in bitmap_allocator
...
* include/ext/bitmap_allocator.h (bitmap_allocator::_S_refill_pool)
(bitmap_allocator::_M_allocate_single_object)
(bitmap_allocator::_M_get): Use _GLIBCXX_THROW macro.
From-SVN: r243352
2016-12-07 15:22:44 +00:00
Jonathan Wakely
101ee3cc73
Disable test using std::set_unexcepted for C++17
...
* testsuite/18_support/bad_exception/59392.cc: Disable for C++17.
From-SVN: r243351
2016-12-07 15:22:37 +00:00
Jonathan Wakely
63915a91ab
Improve tests for contents of <new> header
...
* testsuite/18_support/headers/new/synopsis.cc: Add C++14 and C++17
declarations.
* testsuite/18_support/headers/new/synopsis_cxx98.cc: New test.
From-SVN: r243349
2016-12-07 15:22:24 +00:00
Felipe Magno de Almeida
f68963c092
Add #ifdef case for 16 bits in cow-stdexcept.cc
...
Added #ifdef case for when void* is 16 bits so it compiles in AVR
target.
2016-12-06 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
* src/c++11/cow-stdexcept.cc: Add special case for 16 bit pointers.
From-SVN: r243310
2016-12-06 17:58:10 +00:00
Felipe Magno de Almeida
6649ad7efd
Enable libstdc++ compilation on AVR targets
...
Enable libstdc++ compilation in AVR targets with AVR-Libc. Most
floating point math functions are already defined in AVR-Libc, so
defines are in place to avoid multiple definition of these functions.
2016-12-06 Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
* crossconfig.m4: Add avr target for cross-compilation.
* configure: Regenerate.
From-SVN: r243309
2016-12-06 17:58:05 +00:00
Jonathan Wakely
449a432129
Fix pretty-printer for std::variant
...
* python/libstdcxx/v6/printers.py (StdVariantPrinter): Update for new
data member name.
* testsuite/libstdc++-prettyprinters/cxx17.cc: Remove redundant test.
From-SVN: r243304
2016-12-06 14:36:07 +00:00
Jonathan Wakely
55037a694f
Fix debug mode assertion for std::shared_ptr<void>
...
* include/bits/shared_ptr_base.h
(__shared_ptr_access<T, L, false, true>::operator->()): Fix assertion.
From-SVN: r243303
2016-12-06 14:36:00 +00:00
Jonathan Wakely
505326670f
Fix libstdc++-v3/ChangeLog dates
...
From-SVN: r243299
2016-12-06 12:48:54 +00:00
Ville Voutilainen
1637d42545
Constrain optional's __constexpr_addressof in its return type and use a constexpr addressof for optional, if available.
...
Constrain optional's __constexpr_addressof in its return type
and use a constexpr addressof for optional, if available.
* include/experimental/optional (__constexpr_addressof):
Constrain in the return type instead of in a template parameter.
(_Has_addressof_mem)
(_Has_addressof_free, _Has_addressof, __constexpr_addressof):
Guard with #ifndef __cpp_lib_addressof_constexpr.
(operator->()): Use std::__addressof if it's constexpr.
From-SVN: r243298
2016-12-06 14:47:54 +02:00