Commit Graph

4652 Commits

Author SHA1 Message Date
Steven Bosscher 1b5be39ffc Makefile.am: Fix regexp broken by previous commit.
* include/Makefile.am: Fix regexp broken by previous commit.
	* include/Makefile.in: Likewise.

From-SVN: r194152
2012-12-04 15:52:52 +00:00
Benjamin Kosnik cef1bc586c standard_policies.hpp: Remove.
2012-12-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp:
	Remove.
	* include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp:
	Remove.
 	* include/Makefile.am (pb_headers): Remove include files.
	* include/Makefile.in: Regenerated.

From-SVN: r194107
2012-12-03 23:23:52 +00:00
Jonathan Wakely b1c2b51b66 functional (_Mem_fn): Constrain function call operators to avoid ambiguities.
* include/std/functional (_Mem_fn): Constrain function call operators
	to avoid ambiguities. Use perfect forwarding.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: Additional
	tests.
	* testsuite/20_util/function_objects/mem_fn/forward.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r193879
2012-11-28 01:42:25 +00:00
Ollie Wild 29f696491c Fix incorrect @headername Doxygen macro invocation.
Format is @headername{hdr1,hdr2} not @headername{hdr1 or hdr2}.

2012-11-27  Ollie Wild  <aaw@google.com>

	* include/bits/stl_tree.h (@headername): Fix incorrect Doxygen macro
	invocation.

From-SVN: r193869
2012-11-27 20:52:02 +00:00
Jonathan Wakely 5895a897b5 functional (__is_socketlike): Change from class template to alias template.
* include/std/functional (__is_socketlike): Change from class
	template to alias template.

From-SVN: r193832
2012-11-26 23:53:36 +00:00
Jonathan Wakely 5127244e4b re PR libstdc++/55463 (Result of std::mem_fn doesn't accept rvalues)
PR libstdc++/55463
	* include/std/functional (_Mem_fn): Handle rvalue objects. Add
	noexcept-specifications.
	* testsuite/20_util/function_objects/mem_fn/55463.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r193831
2012-11-26 23:53:29 +00:00
Jonathan Wakely aa66b299c8 re PR libstdc++/52680 (std::this_thread::sleep_for #ifdef'd out by _GLIBCXX_USE_NANOSLEEP)
PR libstdc++/52680
	* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for usleep and
	sleep if nanosleep is not available. Bump libtool revision.
	* config.h.in: Regenerate.
	* configure: Likewise.
	* config/abi/pre/gnu.ver (GLIBCXX_3.4.18): Add __sleep_for.
	* include/std/thread (this_thread::__sleep_for): Add.
	(this_thread::yield, this_thread::sleep_until, this_thread::sleep_for):
	Declare unconditionally.
	* src/c++11/thread.cc (this_thread::__sleep_for): Define.
	* testsuite/lib/libstdc++.exp (check_v3_target_nanosleep): Rename to
	check_v3_target_sleep.
	* testsuite/lib/dg-options.exp (dg-require-nanosleep): Rename to
	dg-require-sleep.
	* testsuite/30_threads/condition_variable_any/53830.cc: Update.
	* testsuite/30_threads/this_thread/2.cc: Likewise.
	* testsuite/30_threads/this_thread/3.cc: Likewise.
	* testsuite/30_threads/this_thread/4.cc: Likewise.
	* testsuite/30_threads/async/54297.cc: Likewise.

From-SVN: r193769
2012-11-23 22:11:23 +00:00
Paolo Carlini 25caa91e99 re PR libstdc++/55413 ([LTO] hashtable.h:1648 '__bbegin_bkt' may be used uninitialized in this function [-Werror=maybe-uninitialized])
2012-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55413
	* include/bits/hashtable.h (_Hashtable<>::_M_rehash_aux): Initialize
	__bbegin_bkt and __prev_bkt to avoid uninitialized warnings.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: Adjust
	dg-error line number.

From-SVN: r193663
2012-11-20 14:54:11 +00:00
Matthias Klose 3263c9a3a7 2012-11-20 Matthias Klose <doko@ubuntu.com>
* doc/doxygen/user.cfg.in (ALIASES). Escape sharp braces.
        * include/bits/allocator.h: Escape sharp braces in comment.
        * include/profile/impl/profiler_algos.h: Likewise.

From-SVN: r193662
2012-11-20 13:48:28 +00:00
Jonathan Wakely 6b1328eb3c array_allocator.h: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
* include/ext/array_allocator.h: Replace uses of
	__GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.

From-SVN: r193644
2012-11-20 00:24:18 +00:00
Jonathan Wakely 1b5dc776ca stl_algo.h (reverse_copy): Update comment per DR 2074.
* include/bits/stl_algo.h (reverse_copy): Update comment per DR 2074.
	* include/bits/unordered_map.h: Apply DR 2005 resolution.
	* doc/xml/manual/status_cxx2011.xml: Update per DR 2048.
	* include/bits/allocator.h (allocator): Apply DR 2103 resolution.
	* include/ext/array_allocator.h: Likewise.
	* include/ext/bitmap_allocator.h: Likewise.
	* include/ext/malloc_allocator.h: Likewise.
	* include/ext/mt_allocator.h: Likewise.
	* include/ext/new_allocator.h: Likewise.
	* include/ext/pool_allocator.h: Likewise.
	* include/ext/throw_allocator.h: Likewise.
	* include/ext/alloc_traits.h (__allocator_always_compares_equal): Add
	additional specializations.
	* include/std/functional: Add comment about DR resolution.
	* include/std/future: Likewise.
	* include/std/scoped_allocator: Likewise.
	* include/std/thread: Likewise.
	* testsuite/20_util/allocator/requirements/typedefs.cc: New.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.

From-SVN: r193638
2012-11-19 22:28:00 +00:00
Jonathan Wakely 207585a63d hashtable.h: Improve comments.
* include/bits/hashtable.h: Improve comments.
	* include/bits/hashtable_policy.h: Likewise.

From-SVN: r193636
2012-11-19 21:33:52 +00:00
Paolo Carlini 741aacafff re PR libstdc++/55363 (tuple_size is not a class template)
2012-11-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55363
	* include/std/array (tuple_size, tuple_element): Move out
	NAMESPACE_CONTAINER.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Likewise.

From-SVN: r193584
2012-11-17 12:09:58 +00:00
François Dumont d4a7f7a15c hashtable_policy.h (_Prime_rehash_policy): Remove automatic shrink.
2012-11-16  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (_Prime_rehash_policy): Remove
	automatic shrink.
	(_Prime_rehash_policy::_M_bkt_for_elements): Do not call
	_M_next_bkt anymore.
	(_Prime_rehash_policy::_M_next_bkt): Move usage of
	_S_growth_factor ...
	(_Prime_rehash_policy::_M_need_rehash): ... here.
	* include/bits/hashtable.h (_Hashtable<>): Adapt.
	* testsuite/performance/23_containers/insert_erase/41975.cc: Add
	_USE_TR1 to force build using std::tr1 container.
	* testsuite/performance/23_containers/insert/unordered_set.cc:
	Likewise.
	* testsuite/performance/23_containers/insert/54075.cc: New.

From-SVN: r193576
2012-11-16 21:28:44 +00:00
Jonathan Wakely c25639b1a3 re PR libstdc++/53841 ([C++11] condition_variable::wait_until() fails with high resolution clocks)
PR libstdc++/53841
	* include/std/condition_variable (condition_variable::wait_until):
	Handle clocks with higher resolution than __clock_t.
	(condition_variable::__wait_until_impl): Remove unnecessary _Clock
	parameter.
	* testsuite/30_threads/condition_variable/members/53841.cc: New.

From-SVN: r193523
2012-11-15 01:38:17 +00:00
Jonathan Wakely 99ace34a31 re PR libstdc++/55320 (Invalid delete with throwing copy-c'tor passed to std::function)
PR libstdc++/55320
	* include/std/functional (function::function(F)): Set _M_manager after
	operations that could throw.
	(_Function_base::_Ref_manager::_M_init_functor): Use addressof.
	* include/tr1/functional
	(_Function_base::_Ref_manager::_M_init_functor): Use addressof.
	(_Function_base::_Base_manager::_M_get_pointer): Likewise.
	* testsuite/20_util/function/cons/55320.cc: New.
	* testsuite/20_util/function/cons/addressof.cc: New.
	* testsuite/20_util/function/cons/callable.cc: Remove header.
	* testsuite/20_util/bind/ref_neg.cc: Adjust dg-error line numbers.
	* testsuite/tr1/3_function_objects/function/10.cc: New.

From-SVN: r193514
2012-11-14 23:33:01 +00:00
Jonathan Wakely 0ad9f93083 future (atomic_future): Remove declaration of non-standard name.
* include/std/future (atomic_future): Remove declaration of
	non-standard name.

From-SVN: r193457
2012-11-12 23:00:41 +00:00
Jason Merrill 7a3a9e6821 * include/std/complex (real, imag): Add ABI tag in C++11 mode.
From-SVN: r193445
2012-11-12 12:51:26 -05:00
Jason Merrill 734f50238f * many: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
From-SVN: r193392
2012-11-10 12:27:22 -05:00
François Dumont ecf07a67d0 re PR libstdc++/54075 ([4.7.1] unordered_map insert still slower than 4.6.2)
2012-11-08  François Dumont  <fdumont@gcc.gnu.org>

	PR libstdc++/54075
	* include/bits/hashtable.h (_Hashtable<>::rehash): Reset hash
	policy state if no rehash.
	* testsuite/23_containers/unordered_set/modifiers/reserve.cc
	(test02): New.

From-SVN: r193339
2012-11-08 20:16:04 +00:00
Jonathan Wakely 800ac749de iterator_tracker.h (operator++): Fix returning dangling reference.
* include/profile/iterator_tracker.h (operator++): Fix returning
	dangling reference.
	(operator--): Likewise.

From-SVN: r193323
2012-11-08 09:15:43 +00:00
Paolo Carlini 54ba39f599 array (_GLIBCXX_THROW_OR_ABORT): Move...
2012-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/debug/array (_GLIBCXX_THROW_OR_ABORT): Move...
	* include/bits/c++config: ... here.
	* include/bits/shared_ptr_base.h (__throw_bad_weak_ptr): Use it.
	* include/ext/pb_ds/exception.hpp: Likewise.
	* include/ext/throw_allocator.h (__throw_forced_error): Likewise.
	* include/ext/concurrence.h (__throw_concurrence_lock_error,
	__throw_concurrence_unlock_error, __throw_concurrence_broadcast_error,
	__throw_concurrence_wait_error): Likewise.
	* include/tr1/shared_ptr.h (__throw_bad_weak_ptr): Likewise.
	* include/tr1/functional (function<_Res(_ArgTypes...)>::operator()
	(_ArgTypes...)): Likewise.
	* libsupc++/eh_aux_runtime.cc (__cxxabiv1::__cxa_bad_cast,
	__cxxabiv1::__cxa_bad_typeid): Likewise.
	* libsupc++/vec.cc (compute_size): Likewise.
	* libsupc++/new_op.cc (operator new (std::size_t)): Likewise.
	* src/c++11/functexcept.cc: Likewise.
	* testsuite/util/io/illegal_input_error.hpp
	(__throw_illegal_input_error): Likewise.
	* libsupc++/eh_personality.cc: Avoid warning with -fno-exceptions.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line
	numbers.
	* testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/
	tuple_element_debug_neg.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
	Likewise.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.

From-SVN: r193295
2012-11-07 13:20:33 +00:00
Jonathan Wakely d720a22b6e stl_vector.h (vector(size_type)): Add missing allocator parameter.
* include/bits/stl_vector.h (vector(size_type)): Add missing allocator
	parameter.
	* include/bits/stl_bvector.h: Likewise.
	* include/debug/vector (vector(size_type)): Likewise.
	* include/profile/vector (vector(size_type)): Likewise. Pass allocator
	to base constructor.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.

From-SVN: r193284
2012-11-07 09:17:42 +00:00
Paolo Carlini 0611ce440a re PR libstdc++/51850 (debug mode for std::array and tr1::array)
2012-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51850
	* include/debug/array: New, debug-mode implementation.
	* include/profile/array: New.
	* include/std/array: Adjust.
	* include/std/tuple: Just include <array>.
	* include/Makefile.am: Add.
	* include/Makefile.in: Regenerate.
	* testsuite/23_containers/array/debug/front1_neg.cc: New.
	* testsuite/23_containers/array/debug/
	square_brackets_operator1_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/
	square_brackets_operator2_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/back1_neg.cc: Likewise.
	* testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Tweak
	to run only in normal-mode.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: New.
	* testsuite/23_containers/array/tuple_interface/
	tuple_element_debug_neg.cc: Likewise.

From-SVN: r193278
2012-11-07 00:42:19 +00:00
Paolo Carlini c4ae987730 atomic_base.h: Don't include <cstddef>, use nullptr.
2012-11-06  Paolo Carlini  <paolo.carlini@oracle.com>
  
	* include/bits/atomic_base.h: Don't include <cstddef>, use nullptr.
	* include/std/atomic: Likewise.
	* include/tr2/dynamic_bitset: Likewise.

	* libsupc++/vec.cc (compute_size(std::size_t, std::size_t,
	std::size_t)): Fix for -fno-exceptions.

From-SVN: r193232
2012-11-06 11:03:45 +00:00
Jonathan Wakely 31828bd36a * include/profile/map.h (map::emplace_hint): Add missing return.
From-SVN: r193202
2012-11-06 00:19:57 +00:00
Jonathan Wakely 3c7d8b035a deque: Constrain InputIterator parameters.
* include/profile/deque: Constrain InputIterator parameters.
	* include/profile/forward_list: Likewise.
	* include/profile/list: Likewise.
	* include/profile/map.h: Likewise.
	* include/profile/multimap.h: Likewise.
	* include/profile/set.h: Likewise.
	* include/profile/multiset.h: Likewise.
	* include/profile/vector: Likewise.

From-SVN: r193196
2012-11-06 00:06:42 +00:00
Jonathan Wakely e77c9aedcd forward_list: Update to meet allocator-aware requirements.
* include/profile/forward_list: Update to meet allocator-aware
	requirements.
	* include/debug/forward_list: Likewise.
	* include/debug/vector: Verify allocators are swapped or equal.
	* include/debug/macros.h (__glibcxx_check_equal_allocs): Define.
	* include/debug/formatter.h: Add new debug message.
	* src/c++11/debug.cc: Likewise.
	* testsuite/23_containers/forward_list/allocator/swap.cc: Do not
	swap containers with non-propagating, non-equal allocators.
	* testsuite/23_containers/vector/allocator/swap.cc: Likewise.

From-SVN: r193186
2012-11-05 21:10:27 +00:00
François Dumont 51bf1e805e throw_allocator.h (__throw_value_base): Add move semantic, not throwing.
2012-10-05  François Dumont  <fdumont@gcc.gnu.org>

	* include/ext/throw_allocator.h (__throw_value_base): Add move
	semantic, not throwing.
	(__throw_value_limit): Likewise.
	(__throw_value_random): Likewise.
	* testsuite/util/exception/safety.h: Add validation of C++11
	methods emplace/emplace_front/emplace_back/emplace_hint.
	* testsuite/util/testsuite_container_traits.h: Signal emplace
	support on deque, forward_list, list and vector.
	* testsuite/23_containers/deque/requirements/exception/
	propagation_consistent.cc: Remove dg-do run fail.

From-SVN: r193184
2012-11-05 20:58:35 +00:00
Paolo Carlini 935ec36fdd re PR libstdc++/55215 (Constructor seeding is broken for Mersenne twister)
2012-11-05  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55215
	* include/bits/random.tcc (mersenne_twister_engine<>::seed(_Sseq&)):
	Assign state_size to _M_p.
	* testsuite/26_numerics/random/mersenne_twister_engine/cons/55215.cc:
	New.
	* testsuite/26_numerics/random/independent_bits_engine/cons/55215.cc:
	Likewise.
	* testsuite/26_numerics/random/shuffle_order_engine/cons/55215.cc:
	Likewise.
	* testsuite/26_numerics/random/subtract_with_carry_engine/cons/
	55215.cc: Likewise.
	* testsuite/26_numerics/random/discard_block_engine/cons/55215.cc:
	Likewise.
	* testsuite/26_numerics/random/linear_congruential_engine/cons/
	55215.cc: Likewise.

From-SVN: r193181
2012-11-05 19:25:20 +00:00
Paolo Carlini 5bcb3b4d80 re PR libstdc++/55169 (std::discrete_distribution::operator(generator&) makes unnecessary copy of parameter vector)
2012-11-02  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55169
	* include/bits/random.h: Remove all uses of param().
	(chi_squared_distribution<>::__generate_impl(_ForwardIterator,
	_ForwardIterator, _UniformRandomNumberGenerator&): Declare
	* include/bits/random.tcc: ... define.
	* include/ext/random: Remove all uses of param().

From-SVN: r193092
2012-11-02 10:45:25 +00:00
Jonathan Wakely 50799846a5 forward_list.h (forward_list(size_type)): Add missing allocator parameter.
* include/bits/forward_list.h (forward_list(size_type)): Add missing
	allocator parameter.
	(_Fwd_list_node_base): Use NSDMI and define constructor as defaulted.
	(_Fwd_list_node::_M_value): Replace with uninitialized storage.
	(_Fwd_list_node::_M_valptr()): Define functions to access storage.
	(_Fwd_list_iterator, _Fwd_list_const_iterator): Use _M_valptr.
	(_Fwd_list_base::_M_create_node): Only use allocator to construct the
	element not the node.
	* include/bits/forward_list.tcc (_Fwd_list_base::_M_erase_after): Only
	use allocator to destroy the element not the node.
	* testsuite/23_containers/forward_list/cons/11.cc: Remove unused
	headers.
	* testsuite/23_containers/forward_list/cons/12.cc: Likewise.
	* testsuite/23_containers/forward_list/cons/13.cc: New.
	* testsuite/23_containers/forward_list/cons/14.cc: New.

From-SVN: r193086
2012-11-02 01:29:00 +00:00
François Dumont 0dd4969120 hashtable_policy.h (__details::_Before_begin<>): New, combine a base node instance and an allocator.
2012-11-01  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h (__details::_Before_begin<>):
	New, combine a base node instance and an allocator.
	* include/bits/hashtable.h (_Hashtable<>::_M_node_allocator): Remove.
	(_Hashtable<>::_M_before_begin): Rename into _M_bbegin and type
	modified to __detail::_Before_begin<>.
	(_Hashtable<>::_M_node_allocator()): New, get the node allocator
	part of _M_bbegin.
	(_Hashtable<>::_M_before_begin()): New, get the before begin node
	part of _M_bbegin.
	(_Hashtable<>): Adapt to use latter.

From-SVN: r193068
2012-11-01 20:55:51 +00:00
Jonathan Wakely 362261e71f forward_list.h (forward_list::assign): Dispatch to new functions based on assignability of elements.
* include/bits/forward_list.h (forward_list::assign): Dispatch to new
	functions based on assignability of elements.
	(forward_list::_M_assign): Add overloaded functions for assigning
	via assignment or via clearing and insertion.
	(forward_list::_M_assign_val): Likewise.
	(forward_list::_M_move_assign(forward_list&&, false_type)): Do not
	erase elements that are not moved.
	* include/bits/forward_list.tcc (forward_list::operator=): Call
	assign() to copy elements.
	* testsuite/23_containers/forward_list/cons/10.cc: New.
	* testsuite/23_containers/forward_list/cons/11.cc: New.
	* testsuite/23_containers/forward_list/cons/12.cc: New.

From-SVN: r193057
2012-11-01 01:30:34 +00:00
Jonathan Wakely b0b4a25308 forward_list.h (forward_list): Adjust comments.
* include/bits/forward_list.h (forward_list): Adjust comments.
	(forward_list(const forward_list&, const _Alloc&)): Use
	_M_range_initialize to copy elements.
	(forward_list(forward_list&&, const _Alloc&)): Add exception
	specification.
	(_Fwd_list_base(const _Fwd_list_base&, const _Node_alloc_type&)):
	Remove.
	* include/bits/forward_list.tcc (_Fwd_list_base(const _Fwd_list_base&,
	const _Node_alloc_type&)): Remove.
	(_Fwd_list_base(_Fwd_list_base&&, const _Node_alloc_type&)): Fix
	memory leak when allocators are not equal.

From-SVN: r193009
2012-10-31 01:09:59 +00:00
Jonathan Wakely 1ea58d3499 re PR libstdc++/55123 ([C++11] Construction of shared_ptr<const T> from unique_ptr<const T> fails)
PR libstdc++/55123
	* include/bits/shared_ptr_base.h (__shared_count::_S_create_from_up):
	Do not instantiate allocator with element_type.
	* testsuite/20_util/shared_ptr/cons/55123.cc: New.

From-SVN: r192964
2012-10-29 21:49:19 +00:00
François Dumont 099e644e2d unordered_map.h (unordered_map<>): Prefer aggregation to inheritance with _Hashtable.
2012-10-27  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/unordered_map.h (unordered_map<>): Prefer
	aggregation to inheritance with _Hashtable.
	(unordered_multimap<>): Likewise.
	* include/bits/unordered_set.h
	(unordered_set<>(const unordered_set&)):  Use default
	implementation.
	(unordered_set<>(unordered_set&&)): Likewise.
	(unordered_set<>::operator=(const unordered_set&)): Likewise.
	(unordered_set<>::operator=(unordered_set&&)): Likewise.
	(unordered_multiset<>(const unordered_multiset&)): Likewise.
	(unordered_multiset<>(unordered_multiset&&)): Likewise.
	(unordered_multiset<>::operator=(const unordered_multiset&)):
	Likewise.
	(unordered_multiset<>::operator=(unordered_multiset&&)): Likewise.
	* include/debug/unordered_map (operator==): Adapt.
	* include/profile/unordered_map (operator==): Adapt.

From-SVN: r192876
2012-10-27 12:20:18 +00:00
Daniel Kruegler 6c5173c05f type_traits (common_type): Implement LWG 2141.
2012-10-24  Daniel Krugler  <daniel.kruegler@gmail.com>

	* include/std/type_traits (common_type): Implement LWG 2141.
	* testsuite/20_util/duration/requirements/sfinae_friendly_1.cc:
	Update.
	* testsuite/20_util/common_type/requirements/typedefs-1.cc: Likewise.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
	Likewise.
	* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
	Likewise.
	* testsuite/20_util/common_type/requirements/typedefs-2.cc: Likewise.

From-SVN: r192780
2012-10-24 20:37:05 +00:00
Haakan Younes c2d9083df2 re PR libstdc++/55047 (operator() in std::exponential_distribution may call log(0))
2012-10-24   Haakan Younes  <hyounes@google.com>
	     Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/55047
	* include/bits/random.h (exponential_distribution<>::operator):
	Fix formula to std::log(result_type(1) - __aurng()).
	* include/bits/random.tcc: Likewise, everywhere.

Co-Authored-By: Paolo Carlini <paolo.carlini@oracle.com>

From-SVN: r192762
2012-10-24 12:20:19 +00:00
François Dumont 637fd8b3be unordered_set.h (unordered_set<>): Prefer aggregation to inheritance with _Hashtable.
2012-10-22  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/unordered_set.h (unordered_set<>): Prefer
	aggregation to inheritance with _Hashtable.
	(unordered_multiset<>): Likewise.
	* include/debug/unordered_set (operator==): Adapt.
	* include/profile/unordered_set (operator==): Adapt.

From-SVN: r192695
2012-10-22 19:53:38 +00:00
François Dumont 0a011b17ee map.h (map::emplace_hint): Remove invalid parenthesis.
2012-10-21  François Dumont  <fdumont@gcc.gnu.org>

	* include/profile/map.h (map::emplace_hint): Remove invalid
	parenthesis.

From-SVN: r192656
2012-10-21 19:06:47 +00:00
Jonathan Wakely ae40b500d2 * include/std/scoped_allocator: Avoid badname.
From-SVN: r192629
2012-10-20 03:08:37 +01:00
Jonathan Wakely 644b2e4c0d scoped_allocator (__outermost_alloc_traits): Define.
* include/std/scoped_allocator (__outermost_alloc_traits): Define.
	(scoped_allocator_adaptor::destroy): Use it.
	(scoped_allocator_adaptor::construct): Likewise. Overload for
	piecewise construction of std::pair objects.
	* testsuite/20_util/scoped_allocator/2.cc: New.
	* doc/xml/manual/status_cxx2011.xml: Update.

From-SVN: r192613
2012-10-19 17:16:11 +01:00
Jonathan Wakely 7aad1ae2b2 forward_list.h: Add C++11 allocator support.
* include/bits/forward_list.h: Add C++11 allocator support.
	* include/bits/forward_list.tcc: Likewise.
	* doc/xml/manual/status_cxx2011.xml: Update.
	* testsuite/23_containers/forward_list/allocator/copy.cc: New.
	* testsuite/23_containers/forward_list/allocator/copy_assign.cc: New.
	* testsuite/23_containers/forward_list/allocator/minimal.cc: New.
	* testsuite/23_containers/forward_list/allocator/move_assign.cc: New.
	* testsuite/23_containers/forward_list/allocator/noexcept.cc: New.
	* testsuite/23_containers/forward_list/allocator/swap.cc: New.

From-SVN: r192588
2012-10-18 22:06:21 +01:00
François Dumont 14cbb5d84c formatter.h (_Debug_msg_id): Add __msg_valid_load_factor.
2012-10-18  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/formatter.h (_Debug_msg_id): Add
	__msg_valid_load_factor.
	* include/debug/macros.h (__glibcxx_check_max_load_factor): New.
	* include/debug/unordered_set
	(unordered_set<>::max_load_factor(float)): Check max load factor
	is positive.
	(unordered_multiset<>::max_load_factor(float)): Likewise.
	* include/debug/unordered_map
	(unordered_map<>::max_load_factor(float)): Likewise.
	(unordered_multimap<>::max_load_factor(float)): Likewise.
	* testsuite/23_containers/unordered_map/debug/max_load_factor_neg.cc:
	New.
	* testsuite/23_containers/unordered_multimap/debug/
	max_load_factor_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/max_load_factor_neg.cc:
	New.
	* testsuite/23_containers/unordered_multiset/debug/
	max_load_factor_neg.cc: New.

From-SVN: r192575
2012-10-18 19:50:37 +00:00
Benjamin Kosnik a9ba8ba56c move.h (move_if_noexcept): Mark constexpr.
2012-10-17  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/move.h (move_if_noexcept): Mark constexpr.
	* include/std/array (front, back): Same.
	* include/std/chrono: Add comment.
	* include/std/tuple (__tuple_compare): Mark __eq, __less constexpr.
	(operator ==, <, >, !=, <=, >=): Same.
	* testsuite/20_util/forward/c_neg.cc: Adjust line numbers.
	* testsuite/20_util/forward/f_neg.cc: Same.
	* testsuite/20_util/move_if_noexcept/constexpr.cc: New.
	* testsuite/20_util/tuple/comparison_operators/constexpr.cc: New.
	* testsuite/20_util/tuple/creation_functions/constexpr.cc: Add.
	* testsuite/23_containers/array/element_access/
	constexpr_element_access.cc: Same.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust
	line numbers.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Same.

	* testsuite/20_util/tuple/comparison_operators/35480_neg.cc:
          Temporarily add dg-excess-errors.

From-SVN: r192556
2012-10-18 08:36:06 +00:00
François Dumont 7181e991b5 formatter.h (_Debug_msg_id): Add __msg_bucket_index_oob.
2012-10-16  François Dumont  <fdumont@gcc.gnu.org>

	* include/debug/formatter.h (_Debug_msg_id): Add
	__msg_bucket_index_oob.
	* include/debug/macros.h (__glibcxx_check_bucket_index): New.
	* include/debug/unordered_set (unordered_set<>::begin(size_type)):
	Add check on bucket index.
	(unordered_set<>::begin(size_type) const): Likewise.
	(unordered_set<>::cbegin(size_type) const): Likewise.
	(unordered_set<>::end(size_type)): Likewise.
	(unordered_set<>::end(size_type) const): Likewise.
	(unordered_set<>::cend(size_type) const): Likewise.
	(unordered_set<>::bucket_size(size_type)): Likewise.
	(unordered_multiset<>::begin(size_type)): Likewise.
	(unordered_multiset<>::begin(size_type) const): Likewise.
	(unordered_multiset<>::cbegin(size_type) const): Likewise.
	(unordered_multiset<>::end(size_type)): Likewise.
	(unordered_multiset<>::end(size_type) const): Likewise.
	(unordered_multiset<>::cend(size_type) const): Likewise.
	(unordered_multiset<>::bucket_size(size_type)): Likewise.
	* include/debug/unordered_map (unordered_map<>::begin(size_type)):
	Likewise.
	(unordered_map<>::begin(size_type) const): Likewise.
	(unordered_map<>::cbegin(size_type) const): Likewise.
	(unordered_map<>::end(size_type)): Likewise.
	(unordered_map<>::end(size_type) const): Likewise.
	(unordered_map<>::cend(size_type) const): Likewise.
	(unordered_map<>::bucket_size(size_type)): Likewise.
	(unordered_multimap<>::begin(size_type)): Likewise.
	(unordered_multimap<>::begin(size_type) const): Likewise.
	(unordered_multimap<>::cbegin(size_type) const): Likewise.
	(unordered_multimap<>::end(size_type)): Likewise.
	(unordered_multimap<>::end(size_type) const): Likewise.
	(unordered_multimap<>::cend(size_type) const): Likewise.
	(unordered_multimap<>::bucket_size(size_type)): Likewise.
	* testsuite/23_containers/unordered_map/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_map/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_map/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_multimap/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_multimap/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_set/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_set/debug/cend_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/bucket_size_neg.cc:
	New.
	* testsuite/23_containers/unordered_multiset/debug/begin1_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/begin2_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/cbegin_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/end1_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/end2_neg.cc: New.
	* testsuite/23_containers/unordered_multiset/debug/cend_neg.cc: New.

From-SVN: r192512
2012-10-16 19:57:03 +00:00
Pavel Chupin 1183dc2cd8 gthr.m4: New.
* config/gthr.m4: New. Define GCC_AC_THREAD_HEADER.
	    * libgcc/configure: Regenerate.
	    * libgcc/configure.ac: Replace code with GCC_AC_THREAD_HEADER use.
	    * libstdc++-v3/Makefile.in: Regenerate.
	    * libstdc++-v3/acinclude.m4: Replace code with GCC_AC_THREAD_HEADER use.
	    * libstdc++-v3/configure: Regenerate.
	    * libstdc++-v3/doc/Makefile.in: Regenerate.
	    * libstdc++-v3/include/Makefile.am: Regenerate.
	    * libstdc++-v3/include/Makefile.in: Rename variable.
	    * libstdc++-v3/libsupc++/Makefile.in: Regenerate.
	    * libstdc++-v3/po/Makefile.in: Regenerate.
	    * libstdc++-v3/python/Makefile.in: Regenerate.
	    * libstdc++-v3/src/Makefile.in: Regenerate.
	    * libstdc++-v3/src/c++11/Makefile.in: Regenerate.
	    * libstdc++-v3/src/c++98/Makefile.in: Regenerate.
	    * libstdc++-v3/testsuite/Makefile.in: Regenerate.

From-SVN: r192458
2012-10-15 13:10:30 +00:00
Edward Smith-Rowland 500602220a dd the Hoyt and the arcsine distributions as extensions.
From-SVN: r192403
2012-10-12 15:15:21 +00:00
Kirill Yukhin 3b06f98418 Revert r192297.
From-SVN: r192394
2012-10-12 10:57:06 +00:00