Commit Graph

4262 Commits

Author SHA1 Message Date
Paolo Carlini c688bbdd63 stl_queue.h: Use noexcept per the FDIS.
2011-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_queue.h: Use noexcept per the FDIS.
	* include/bits/stl_stack.h: Likewise.

From-SVN: r174254
2011-05-26 00:36:35 +00:00
Jonathan Wakely e06745c110 mutex: Add doxygen comments.
2011-05-26  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/mutex: Add doxygen comments.

From-SVN: r174244
2011-05-26 00:49:11 +01:00
Ian Lance Taylor 2b4e07b814 re PR libstdc++/49060 (use of deleted memory in __gnu_cxx::hashtable::erase)
PR libstdc++/49060
	* include/backward/hashtable.h (hashtable::erase): Don't crash if
	erasing first and another element with a reference to the other
	element.
	* testsuite/backward/hash_set/49060.cc: New.

From-SVN: r174240
2011-05-25 23:09:14 +00:00
Paolo Carlini deaf34a90b random.h (random_device::min, max): Specify constexpr.
2011-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (random_device::min, max): Specify constexpr.

From-SVN: r174219
2011-05-25 17:55:40 +00:00
Paolo Carlini 7f0d79d514 thread: Use noexcept throughout per the FDIS.
2011-05-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/thread: Use noexcept throughout per the FDIS.
	* include/std/mutex: Likewise.

From-SVN: r174202
2011-05-25 14:32:06 +00:00
Paolo Carlini b850be9d50 re PR libstdc++/49151 ([C++0x][constexpr] chrono::duration has incorrect non-member operator semantics)
2011-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49151
	* include/std/chrono (operator+, operator-, operator*, operator/,
	operator&): Implement LWG 2020 [WP]; specify constexpr.
	* testsuite/20_util/duration/arithmetic/dr2020.cc: New.

From-SVN: r174150
2011-05-24 23:29:19 +00:00
Paolo Carlini 782378a6ae c++config (_GLIBCXX_NOTHROW): Update for noexcept.
2011-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/c++config (_GLIBCXX_NOTHROW): Update for noexcept.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
	line number.

From-SVN: r174107
2011-05-24 10:28:13 +00:00
Benjamin Kosnik a345e45d14 re PR libstdc++/37144 (A bug in include/ext/pb_ds/detail/pat_trie_/constructors_destructor_fn_imps.hpp)
2011-05-23  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/37144
	PR libstdc++/28457
	Interface changes for ext/pb_ds.
	PB_DS_BASE_C_DEC to unique PB_DS_*_BASE macros.
	* include/ext/pb_ds/assoc_container.hpp (container_base): Remove.
	(basic_hash_table, basic_branch, list_update): Derive from
	container_base_dispatch.
	* include/ext/pb_ds/list_update_policy.hpp (null_lu_metadata): Remove.
	(move_to_front_lu_policy): To lu_move_to_front_policy.
	(counter_lu_policy): To lu_counter_policy.
	* include/ext/pb_ds/tree_policy.hpp (null_tree_node_update): Remove.
	* include/ext/pb_ds/tag_and_trait.hpp (container_base_dispatch): Adjust
	template parameters, declare here.
	(null_mapped_type) Remove.
	(null_type): Just use this for template tricks everywhere.
	* include/ext/pb_ds/hash_policy.hpp (null_hash_fn, null_probe_fn):
	Remove.
	* include/ext/pb_ds/trie_policy.hpp (null_trie_node_update): Remove.
	(string_trie_e_access_traits): To trie_string_access_traits.
	* include/ext/pb_ds/priority_queue.hpp: Use container_base_dispatch.

	File changes.
	* include/Makefile.am (pb_headers): Removed and changed file names.
	* include/Makefile.in: Regenerated.
	* include/ext/pb_ds/detail/basic_types.hpp: Remove.
	* include/ext/pb_ds/detail/bin_search_tree_/
	  cond_dtor_entry_dealtor.hpp: Remove.
	* include/ext/pb_ds/detail/bin_search_tree_/
	  cond_key_dtor_entry_dealtor.hpp: Remove.
	* include/ext/pb_ds/detail/binary_heap_/const_point_iterator.hpp: Move..
	* include/ext/pb_ds/detail/binary_heap_/
	  point_const_iterator.hpp: ..here.
	* include/ext/pb_ds/detail/basic_tree_policy: Move to...
	* include/ext/pb_ds/detail/branch_policy: This.
	* include/ext/pb_ds/detail/branch_policy/
	  basic_tree_policy_base.hpp: Move...
	* include/ext/pb_ds/detail/branch_policy/branch_policy.hpp: ...here.
	* include/ext/pb_ds/detail/branch_policy/null_node_metadata.hpp: Add.
	* include/ext/pb_ds/detail/branch_policy/traits.hpp: Add.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	null_metadata.hpp: Remove.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	const_point_iterator.hpp: Move...
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	point_const_iterator.hpp: ...here.
	* include/ext/pb_ds/detail/list_update_policy/
	counter_lu_metadata.hpp: Move..
	* include/ext/pb_ds/detail/list_update_policy/
	lu_counter_metadata.hpp: ...here.
	* include/ext/pb_ds/detail/list_update_policy/
	counter_lu_policy_imp.hpp: Remove.
	* include/ext/pb_ds/detail/list_update_policy/
	mtf_lu_policy_imp.hpp: Remove.
	* include/ext/pb_ds/detail/trie_policy/
	string_trie_e_access_traits_imp.hpp: Move...
	* include/ext/pb_ds/detail/trie_policy/
	sample_trie_access_traits.hpp: ...here.
	* include/ext/pb_ds/detail/trie_policy/
	sample_trie_e_access_traits.hpp: Move...
	* include/ext/pb_ds/detail/trie_policy/
	trie_string_access_traits_imp.hpp: ...here.
	* include/ext/pb_ds/detail/trie_policy/null_node_update_imp.hpp: Remove.
	* include/ext/pb_ds/detail/tree_policy/null_node_update_imp.hpp: Remove.
	* include/ext/pb_ds/detail/ov_tree_map_/cond_dtor.hpp: Remove.
	* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: New, fold all
	types found in the following files into pat_trie_base.
	* include/ext/pb_ds/detail/pat_trie_/const_child_iterator.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/
	  cond_dtor_entry_dealtor.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/child_iterator.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/split_join_branch_bag.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/head.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/leaf.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/node_base.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/node_metadata_base.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/internal_node.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/node_iterators.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/point_iterators.hpp: Folded.
	* include/ext/pb_ds/detail/pat_trie_/synth_e_access_traits.hpp: Move...
	* include/ext/pb_ds/detail/pat_trie_/synth_access_traits.hpp: ...here.
	* include/ext/pb_ds/detail/unordered_iterator/
	const_point_iterator.hpp: Move...
	* include/ext/pb_ds/detail/unordered_iterator/
	point_const_iterator.hpp: ...here.


	Adjust for above changes.
	* include/ext/pb_ds/detail/resize_policy/sample_size_policy.hpp: Same.
	* include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp: Same.
	* include/ext/pb_ds/detail/resize_policy/
	  sample_resize_trigger.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/
	  binomial_heap_base_.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_base_/
	  split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/container_base_dispatch.hpp: Same. Adjust
	  for template parameter ordering change.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  erase_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  constructor_destructor_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/cmp_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  insert_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  resize_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  constructor_destructor_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  insert_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  entry_list_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  find_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  debug_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/resize_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  constructor_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  cond_key_dtor_entry_dealtor.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  debug_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  erase_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/size_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  resize_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	  standard_policies.hpp: Same.
	* include/ext/pb_ds/detail/tree_trace_base.hpp: Same.
	* include/ext/pb_ds/detail/unordered_iterator/iterator.hpp: Same.
	* include/ext/pb_ds/detail/unordered_iterator/const_iterator.hpp: Same.
	* include/ext/pb_ds/detail/unordered_iterator/point_iterator.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/r_erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/update_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/insert_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/pat_trie_.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/split_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/traits.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/rotate_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pat_trie_/iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/
	  policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/r_erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/rotate_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/bin_search_tree_.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/node_iterators.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/point_iterators.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/
	  split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/bin_search_tree_/iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_policy/
	  sample_update_policy.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  erase_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  constructor_destructor_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  insert_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  resize_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  constructor_destructor_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  insert_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  iterator_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  find_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  find_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  debug_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/resize_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  constructor_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  debug_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  erase_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  resize_no_store_hash_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	  standard_policies.hpp: Same.
	* include/ext/pb_ds/detail/standard_policies.hpp: Same.
	* include/ext/pb_ds/detail/types_traits.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/const_iterator.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/entry_cmp.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/entry_pred.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/resize_policy.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binary_heap_/iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/tree_policy/order_statistics_imp.hpp: Same.
	* include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp: Same.
	* include/ext/pb_ds/detail/tree_policy/
	  sample_tree_node_update.hpp: Same.
	* include/ext/pb_ds/detail/trie_policy/order_statistics_imp.hpp: Same.
	* include/ext/pb_ds/detail/trie_policy/
	  sample_trie_node_update.hpp: Same.
	* include/ext/pb_ds/detail/trie_policy/trie_policy_base.hpp: Same.
	* include/ext/pb_ds/detail/trie_policy/
	  prefix_search_node_update_imp.hpp: Same.
	* include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp: Same.
	* include/ext/pb_ds/detail/cond_dealtor.hpp: Same.
	* include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp: Same.
	  Adjust for template parameter change, fold into
	  container_base_dispatch.
	* include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/pairing_heap_.hpp: Same.
	* include/ext/pb_ds/detail/pairing_heap_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/binomial_heap_/binomial_heap_.hpp: Same.
	* include/ext/pb_ds/detail/constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/type_utils.hpp: Same.
	* include/ext/pb_ds/detail/eq_fn/hash_eq_fn.hpp: Same.
	* include/ext/pb_ds/detail/eq_fn/eq_by_less.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  left_child_next_sibling_heap_.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  const_iterator.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  node.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	  iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/thin_heap_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/policy_access_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/ov_tree_map_.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/node_iterators.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/traits.hpp: Same.
	* include/ext/pb_ds/detail/ov_tree_map_/iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/debug_map_base.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/ranged_probe_fn.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/sample_probe_fn.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/sample_ranged_probe_fn.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/sample_range_hashing.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/probe_fn_base.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/ranged_hash_fn.hpp: Same.
	* include/ext/pb_ds/detail/hash_fn/sample_ranged_hash_fn.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/node.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/splay_tree_.hpp: Same.
	* include/ext/pb_ds/detail/splay_tree_/traits.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/
	  entry_metadata_base.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/lu_map_.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/
	  constructor_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/list_update_map_/iterators_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/trace_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/
	  rc_binomial_heap_.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/rc.hpp: Same.
	* include/ext/pb_ds/detail/rc_binomial_heap_/
	  split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/find_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/insert_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/
	  constructors_destructor_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/debug_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/rb_tree_.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/node.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/split_join_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/info_fn_imps.hpp: Same.
	* include/ext/pb_ds/detail/rb_tree_map_/traits.hpp: Same.


	Documentation changes.
	* include/ext/pb_ds/*: Add doxygen markup.
	* doc/doxygen/user.cfg.in: Add details for extracting comments
	from pb_ds.
	* scripts/run_doxygen: Fixup __gnu_pb_ds::detail.
	* scripts/make_graph.py: Move to svg output. Re-format generated tables.

	* doc/Makefile.am (stamp-html-copy): New rule.
	(stamp-html): Use it to copy non-generated files into html docs.
	* doc/Makefile.in: Regenerated.

	* doc/html/ext/pb_ds/sample_trie_e_access_traits.html: Move...
	* doc/html/ext/pb_ds/trie_string_access_traits.html: ...here.
	* doc/html/ext/pb_ds/string_trie_e_access_traits.html: Move..
	* doc/html/ext/pb_ds/sample_trie_access_traits.html: ...here.

	* doc/html/ext/pb_ds/tree_text_lor_find_timing_test_local.png,
	hash_random_int_erase_mem_usage_test_local.png,
	multimap_text_insert_mem_usage_test_small_s2p_hash_local.png,
	tree_text_insert_timing_test_pat_trie_local.png ,
	multimap_text_insert_mem_usage_test_small_s2p_tree_local.png ,
	priority_queue_text_modify_down_timing_test_local.png,
	gp_hash_random_int_subscript_timing_test_find_local.png,
	text_find_timing_test_hash_local.png,
	multimap_text_insert_timing_test_small_s2p_hash_local.png,
	multimap_text_insert_timing_test_small_s2p_tree_local.png,
	multimap_text_insert_mem_usage_test_large_s2p_hash_local.png,
	multimap_text_insert_mem_usage_test_large_s2p_tree_local.png,
	multimap_text_insert_timing_test_large_s2p_hash_local.png,
	hash_zlob_random_int_find_timing_test_local.png,
	multimap_text_insert_timing_test_large_s2p_tree_local.png,
	binary_priority_queue_random_int_push_timing_test_local.png,
	priority_queue_text_pop_mem_usage_test_local.png,
	priority_queue_text_modify_down_timing_test_pairing_thin_local.png,
	tree_split_join_timing_test_local.png,
	multimap_text_find_timing_test_small_s2p_hash_local.png,
	ccgp_hash_random_int_subscript_timing_test_insert_local.png,
	priority_queue_random_int_push_pop_timing_test_local.png,
	multimap_text_find_timing_test_small_s2p_tree_local.png,
	gp_hash_random_int_subscript_timing_test_insert_local.png,
	priority_queue_text_push_timing_test_local.png,
	cc_hash_random_int_subscript_timing_test_find_local.png,
	tree_text_insert_timing_test_vector_tree_local.png,
	multimap_text_find_timing_test_large_s2p_hash_local.png,
	pairing_priority_queue_text_push_timing_test_local.png,
	tree_order_statistics_timing_test_local.png,
	priority_queue_text_push_pop_timing_test_local.png,
	text_find_timing_test_tree_like_local.png,
	multimap_text_find_timing_test_large_s2p_tree_local.png,
	priority_queue_text_modify_up_timing_test_pairing_thin_local.png,
	cc_hash_random_int_subscript_timing_test_insert_local.png,
	priority_queue_text_modify_up_timing_test_local.png,
	random_int_find_find_timing_test_tree_local.png,
	priority_queue_random_int_push_timing_test_local.png,
	tree_text_insert_timing_test_node_tree_local.png,
	pairing_priority_queue_text_push_pop_timing_test_local.png,
	gp_hash_random_int_find_timing_test_local.png,
	cc_hash_random_int_find_timing_test_local.png,
	priority_queue_text_join_timing_test_local.png: Update local pngs.


	Testsuite changes.
	* testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
	New.
	* testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
	New.
	* testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc: New.
	* testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc: New.

	* testsuite/ext/pb_ds/regression/list_update_data_map_rand.cc: Fix typo.

	* testsuite/ext/pb_ds/example/basic_set.cc: Update.
	* testsuite/ext/pb_ds/example/ranged_hash.cc: Same.
	* testsuite/ext/pb_ds/example/tree_order_statistics.cc: Same.
	* testsuite/ext/pb_ds/example/trie_prefix_search.cc: Same.
	* testsuite/ext/pb_ds/example/trie_dna.cc: Same.
	* testsuite/ext/pb_ds/example/tree_intervals.cc: Same.
	* testsuite/ext/pb_ds/example/basic_multimap.cc: Same.
	* testsuite/performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc:
	  Same.
	* testsuite/performance/ext/pb_ds/tree_split_join_timing.cc: Same.
	* testsuite/performance/ext/pb_ds/tree_order_statistics_timing.cc: Same.
	* testsuite/data/make_graph_test_infos.xml: Same.
	* testsuite/util/regression/common_type.hpp: Same.
	* testsuite/util/regression/trait/assoc/native_type_trait.hpp: Same.
	* testsuite/util/regression/trait/assoc/trait.hpp: Same.
	* testsuite/util/regression/trait/assoc/type_trait.hpp: Same.
	* testsuite/util/regression/rand/priority_queue/
	  rand_regression_test.hpp: Same.
	* testsuite/util/regression/rand/priority_queue/
	  container_rand_regression_test.tcc: Same.
	* testsuite/util/regression/rand/assoc/rand_regression_test.hpp: Same.
	* testsuite/util/regression/rand/assoc/container_rand_regression_test.h
	* testsuite/util/regression/rand/assoc/
	  container_rand_regression_test.tcc: Same.
	* testsuite/util/native_type/native_priority_queue.hpp: Same.
	* testsuite/util/native_type/native_multimap.hpp: Same.
	* testsuite/util/native_type/native_hash_multimap.hpp: Same.
	* testsuite/util/native_type/native_set.hpp: Same.
	* testsuite/util/native_type/native_map.hpp: Same.
	* testsuite/util/native_type/native_hash_set.hpp: Same.
	* testsuite/util/native_type/native_hash_map.hpp: Same.
	* testsuite/util/testsuite_containers.h
	* testsuite/util/common_type/priority_queue/common_type.hpp: Same.
	* testsuite/util/common_type/assoc/common_type.hpp: Same.
	* testsuite/util/common_type/assoc/string_form.hpp: Same.
	* testsuite/util/common_type/assoc/template_policy.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  trigger_policy_string_form.hpp: Same.
	* testsuite/util/common_type/assoc/detail/ds_string_form.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  size_policy_string_form.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  probe_fn_string_form.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  tree_supports_order_statistics.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  trie_supports_prefix_search.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  list_update_policy_string_form.hpp: Same.
	* testsuite/util/common_type/assoc/detail/
	  trie_supports_order_statistics.hpp: Same.
	* testsuite/util/common_type/assoc/native_set.hpp: Same.
	* testsuite/util/performance/assoc/timing/common_type.hpp: Same.
	* testsuite/util/performance/assoc/timing/multimap_find_test.hpp: Same.
	* testsuite/util/performance/assoc/multimap_common_type.hpp: Same.

From-SVN: r174100
2011-05-24 02:38:19 +00:00
Paolo Carlini 23e4c4eec2 streambuf_iterator.h: Use noexcept per the FDIS.
2011-05-23  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/streambuf_iterator.h: Use noexcept per the FDIS.
	(istreambuf_iterator<>::istreambuf_iterator(const
	istreambuf_iterator&),  ~istreambuf_iterator()): Add defaulted
	in C++0x mode.

From-SVN: r174094
2011-05-23 23:03:42 +00:00
Paolo Carlini 4702f095fa [multiple changes]
2011-05-22  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* testsuite/20_util/bind/cv_quals_2.cc: New.

2011-05-22  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49058
	* include/std/functional (_Bind<_Functor(_Bound_args...)>::
	operator()(_Args&&...)): Don't cv qualify _Functor directly
	in the default template argument, SFINAE doesn't apply when
	the functor has no arguments.
	* testsuite/20_util/bind/49058_1.cc: New.
	* testsuite/20_util/bind/49058_2.cc: Likewise.

From-SVN: r174048
2011-05-23 00:05:24 +00:00
Paolo Carlini 525fe1cf88 unique_ptr.h: Use noexcept per the FDIS.
2011-05-21  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/unique_ptr.h: Use noexcept per the FDIS.

From-SVN: r174004
2011-05-21 21:50:39 +00:00
Paolo Carlini 2789f415a1 char_traits.h: Use noexcept throughout.
2011-05-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/char_traits.h: Use noexcept throughout.
	* include/std/typeindex: Likewise.

	* include/std/tuple (_Tuple_impl<>_Tuple_impl(_Tuple_impl&&)): Use
	noexcept; adjust callers.
	* include/bits/stl_pair.h (pair<>::pair(pair<>&&)): Use noexcept.
	* testsuite/20_util/tuple/cons/noexcept_move_construct.cc: New.
	* testsuite/20_util/pair/cons/noexcept_move_construct.cc: Likewise.
	* testsuite/20_util/pair/noexcept_swap.cc: Likewise.
	* testsuite/20_util/pair/noexcept_move_assign.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
	line numbers.

From-SVN: r173986
2011-05-21 00:05:03 +00:00
Jason Merrill 94df301fa0 re PR c++/24163 (dependent Base class scope examined during unqualified name lookup in template)
PR c++/24163
	PR c++/29131
gcc/cp/
	* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Avoid repeating
	unqualified lookup.
	* semantics.c (perform_koenig_lookup): Add complain parm.
	* cp-tree.h: Adjust.
	* parser.c (cp_parser_postfix_expression): Adjust.
	(cp_parser_perform_range_for_lookup): Adjust.
libstdc++-v3/
	* include/ext/pb_ds/assoc_container.hpp: Explicitly qualify calls to
	functions from dependent bases.
	* include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rb_tree_map_/
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/splay_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/tree_policy/
	order_statistics_imp.hpp: Likewise.
	* include/ext/pb_ds/detail/trie_policy/
	prefix_search_node_update_imp.hpp: Likewise.
	* include/ext/rc_string_base.h: Likewise.
	* include/ext/rope: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* testsuite/util/exception/safety.h: Likewise.
	* testsuite/util/native_type/native_priority_queue.hpp: Likewise.
	* testsuite/util/testsuite_io.h: Likewise.
	* include/std/functional: Declare mem_fn earlier.
	* include/tr1/functional: Likewise.
	* include/tr1/exp_integral.tcc: Declare __expint_E1 earlier.

From-SVN: r173965
2011-05-20 14:01:22 -04:00
Paolo Carlini 664e12c126 tuple (tuple_element<__i, [...]): Add.
2011-05-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (tuple_element<__i, const _Tp>,
	tuple_element<__i, volatile _Tp>, tuple_element<__i,
	const volatile _Tp>, tuple_size<const _Tp>, tuple_size<volatile _Tp>,
	tuple_size<const volatile _Tp>): Add.
	* include/std/utility (tuple_size<std::pair<_Tp1, _Tp2>>): Tweak.
	* include/std/array (tuple_size<array<_Tp, _Nm>>): Likewise.
	* testsuite/20_util/tuple/cv_tuple_size.cc: New.
	* testsuite/20_util/tuple/cv_tuple_element.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Tweak dg-warning
	line number.

From-SVN: r173919
2011-05-19 20:48:39 +00:00
Paolo Carlini 173f26ae56 tuple (tuple<>::operator=(tuple&&)): Specify as noexcept.
2011-05-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple (tuple<>::operator=(tuple&&)): Specify as
        noexcept.
	(__get_helper): Likewise.
	(_Head_base<>::_M_head, _Tuple_impl<>::_M_head, _M_tail): Likewise.
	* include/bits/move.h (swap): Likewise.
	* include/bits/algorithmfwd.h (swap): Adjust.
	* include/bits/stl_pair.h (pair<>::operator=(pair&&)): Spec noexcept.
	* testsuite/util/testsuite_allocator.h (uneq_allocator): In C++0x
	mode, prefer delete to access control to make the type not copy
	assignable.
	* testsuite/util/testsuite_tr1.h: Add test classes.
	* testsuite/20_util/tuple/noexcept_swap.cc: New.
	* testsuite/20_util/tuple/noexcept_move_assign.cc: Likewise.
	* testsuite/25_algorithms/reverse/moveable.cc: Likewise, prefer
	delete to access control.
	* testsuite/25_algorithms/swap_ranges/moveable.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-warning
	line numbers.

From-SVN: r173917
2011-05-19 17:20:22 +00:00
Paolo Carlini f263981ac8 [multiple changes]
2011-05-19  Daniel Krugler  <daniel.kruegler@googlemail.com>

	* testsuite/util/testsuite_tr1.h: Add test classes.
	* testsuite/20_util/is_nothrow_assignable/value.cc: Add.

2011-05-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (is_assignable, is_copy_assignable,
	is_move_assignable, is_nothrow_assignable, is_nothrow_copy_assignable,
	is_nothrow_move_assignable): Add; minor tweaks elsewhere.
	(has_nothrow_copy_assign): Remove.
	* testsuite/util/testsuite_tr1.h: Add test classes.
	* testsuite/20_util/is_assignable/requirements/typedefs.cc: Add.
	* testsuite/20_util/is_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_assignable/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_assignable/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_move_assignable/value.cc: Likewise.
	* testsuite/20_util/is_move_assignable/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_move_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_copy_assignable/value.cc: Likewise.
	* testsuite/20_util/is_copy_assignable/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_copy_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_assignable/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_assignable/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_assignable/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_assignable/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_assignable/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r173899
2011-05-19 10:30:20 +00:00
Jonathan Wakely cf70f97b95 shared_ptr_base.h: Use noexcept.
2011-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/shared_ptr_base.h: Use noexcept. Define special member
	functions as defaulted/deleted.
	* include/bits/shared_ptr.h: Use noexcept.
	* 20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error line numbers.
	* 20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.

From-SVN: r173882
2011-05-18 23:59:17 +01:00
Paolo Carlini 5d861bf2cb initializer_list: Use noexcept specifier.
2011-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* libsupc++/initializer_list: Use noexcept specifier.
	(initializer_list<>::size, begin, end): Qualify as const.
	* include/bits/move.h (__addressof, forward, move, addressof): Specify
	as noexcept.
	* include/std/bitset: Use noexcept specifier throughout.
	* include/debug/bitset: Update.
	* include/profile/bitset: Likewise.

From-SVN: r173871
2011-05-18 18:05:17 +00:00
Paolo Carlini 1aa1114b63 tuple: Use noexcept where appropriate.
2011-05-17  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/tuple: Use noexcept where appropriate.
	(tuple<>::swap): Rework implementation.
	(_Head_base<>::_M_swap_impl): Remove.
	(get(std::tuple<>&&)): Add.
	* testsuite/20_util/tuple/element_access/get2.cc: New.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line number.

From-SVN: r173838
2011-05-18 00:12:58 +00:00
Paolo Carlini 7933dc2a80 utility: Simplify the last commit, the whole std::get code is C++0x only.
2011-05-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/utility: Simplify the last commit, the whole
	std::get code is C++0x only.

From-SVN: r173799
2011-05-16 18:24:01 +00:00
Paolo Carlini 18eeaec47b utility (get(std::pair<>&&)): Add.
2011-05-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/utility (get(std::pair<>&&)): Add.
	* include/bits/stl_pair.h (pair::swap(pair&),
	swap(pair<>&, pair<>&)): Use noexcept.
	* include/bits/random.h (discard_block_engine<>::base,
	independent_bits_engine<>::base, shuffle_order_engine<>::base,
	random_device::entropy): Use noexcept.
	* include/std/array: Use noexcept where appropriate.
	(get(array<>&&)): Add.
	* testsuite/23_containers/array/requirements/get.cc: New.
	* testsuite/20_util/pair/get.cc: Likewise.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Tweak dg-error
	line number.

From-SVN: r173798
2011-05-16 18:09:17 +00:00
Paolo Carlini 4d4cf1444d c++config (_GLIBCXX_NOEXCEPT, [...]): Add.
2011-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/c++config (_GLIBCXX_NOEXCEPT, _GLIBCXX_USE_NOEXCEPT):
	Add.
	* include/std/limits: Use the latter everywhere.
	(numeric_limits<char16_t>, numeric_limits<char32_t>): Simplify
	macro usages, the specializations exist only in C++0x mode.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error
	line number.

From-SVN: r173774
2011-05-15 18:21:03 +00:00
François Dumont cfca3f7267 hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
2011-05-11  François Dumont  <francois.cppdevs@free.fr>

        * include/ext/pb_ds/detail/resize_policy/
        hash_load_check_resize_trigger_imp.hpp (assert_valid): Replace
        _GLIBCXX_DEBUG_ASSERT calls with PB_DS_DEBUG_VERIFY.
        * include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
        find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
        constructors_destructor_fn_imps.hpp, split_join_fn_imps.hpp
        (PB_DS_ASSERT_VALID): Rename in PB_DS_ASSERT_VALID_COND.
        * include/ext/pb_ds/detail/debug_map_base.hpp,
        splay_tree_/splay_tree_.hpp, ov_tree_map_/ov_tree_map_.hpp,
        cc_hash_table_map_/cc_ht_map_.hpp, pat_trie_/pat_trie_.hpp,
        leaf.hpp, internal_node.hpp, gp_hash_table_map_/gp_ht_map_.hpp,
        bin_search_tree_/bin_search_tree_.hpp, list_update_map_/lu_map_.hpp,
        rb_tree_map_/rb_tree_.hpp (PB_DS_ASSERT_VALID, PB_DS_DEBUG_VERIFY,
        PB_DS_CHECK_KEY_EXISTS, PB_DS_CHECK_KEY_DOES_NOT_EXIST): Duplicate
        macro definitions move...
        * include/ext/pb_ds/detail/container_base_dispatch.hpp: ... here...
        * include/ext/pb_ds/detail/basic_tree_policy/traits.hpp: ... and here.
        * include/ext/pb_ds/detail/binary_heap_/binary_heap_.hpp,
        resize_policy.hpp, pairing_heap_/pairing_heap_.hpp,
        left_child_next_sibling_heap_/left_child_next_sibling_heap_.hpp,
        binomial_heap_/binomial_heap_.hpp, thin_heap_/thin_heap_.hpp,
        rc_binomial_heap_/rc_binomial_heap_.hpp, rc.hpp (PB_DS_ASSERT_VALID,
        PB_DS_DEBUG_VERIFY): Duplicate macro definitions move...
        * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
        ...here.

From-SVN: r173670
2011-05-11 19:29:02 +00:00
Paolo Carlini b04fa73811 re PR libstdc++/48933 (Infinite recursion in tr1/cmath functions with complex parameters)
2011-05-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48933
	* include/c_global/cmath (acosh, asinh, atanh, cbrt, copysign,
	erf, erfc, exp2, expm1, fdim, fma, fmax, hypot, ilogb, lgamma,
	llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
	nextafter, nexttoward, remainder, remquo, rint, round, scalbln,
	scalbn, tgamma, trunc): Use __enable_if on the return type.
	* include/tr1/cmath: Likewise.
	* testsuite/26_numerics/headers/cmath/overloads_c++0x_neg.cc: New.
	* testsuite/tr1/8_c_compatibility/cmath/overloads_neg.cc: Likewise.

From-SVN: r173574
2011-05-09 15:38:21 +00:00
François Dumont f5886803ed macro.h (_GLIBCXX_DEBUG_VERIFY_AT): New.
2011-05-07  François Dumont  <francois.cppdevs@free.fr>

	* include/debug/macro.h (_GLIBCXX_DEBUG_VERIFY_AT): New.
	(_GLICXX_DEBUG_VERIFY): Use latter.
	* include/ext/pb_ds/detail/resize_policy/
	hash_load_check_resize_trigger_imp.hpp: Emit assertion on the line
	containing the original assert call.
	* include/ext/pb_ds/detail/binomial_heap_base_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp, binomial_heap_base_.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/cc_hash_table_map_/
	erase_store_hash_fn_imps.hpp, insert_no_store_hash_fn_imps.hpp,
	find_fn_imps.hpp, insert_store_hash_fn_imps.hpp, debug_fn_imps.hpp,
	debug_no_store_hash_fn_imps.hpp, cc_ht_map_.hpp, resize_fn_imps.hpp,
	constructor_destructor_fn_imps.hpp, debug_store_hash_fn_imps.hpp,
	erase_no_store_hash_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pat_trie_/find_fn_imps.hpp,
	insert_join_fn_imps.hpp, pat_trie_/head.hpp, debug_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, pat_trie_.hpp, split_fn_imps.hpp,
	leaf.hpp, erase_fn_imps.hpp, node_base.hpp, internal_node.hpp:
	Likewise.
	* include/ext/pb_ds/detail/bin_search_tree_/find_fn_imps.hpp,
	r_erase_fn_imps.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, rotate_fn_imps.hpp, erase_fn_imps.hpp,
	bin_search_tree_.hpp, insert_fn_imps.hpp, split_join_fn_imps.hpp:
	Likewise.
	* include/ext/pb_ds/detail/gp_hash_table_map_/
	erase_store_hash_fn_imps.hpp, insert_no_store_hash_fn_imps.hpp,
	find_fn_imps.hpp, gp_ht_map_.hpp, insert_store_hash_fn_imps.hpp,
	debug_fn_imps.hpp, erase_fn_imps.hpp, debug_no_store_hash_fn_imps.hpp,
	resize_fn_imps.hpp, constructor_destructor_fn_imps.hpp,
	debug_store_hash_fn_imps.hpp, erase_no_store_hash_fn_imps.hpp:
	Likewise.
	* include/ext/pb_ds/detail/binary_heap_/find_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	erase_fn_imps.hpp, insert_fn_imps.hpp, binary_heap_.hpp,
	resize_policy.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/pairing_heap_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	pairing_heap_.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/binomial_heap_/
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	binomial_heap_.hpp: Likewise.
	* include/ext/pb_ds/detail/left_child_next_sibling_heap_/
	erase_fn_imps.hpp, left_child_next_sibling_heap_.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp,
	find_fn_imps.hpp, thin_heap_.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/ov_tree_map_/erase_fn_imps.hpp,
	ov_tree_map_.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, split_join_fn_imps.hpp, info_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/debug_map_base.hpp: Likewise.
	* include/ext/pb_ds/detail/splay_tree_/erase_fn_imps.hpp,
	find_fn_imps.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp,
	splay_fn_imps.hpp, split_join_fn_imps.hpp, splay_tree_.hpp: Likewise.
	* include/ext/pb_ds/detail/list_update_map_/erase_fn_imps.hpp,
	find_fn_imps.hpp, lu_map_.hpp, constructor_destructor_fn_imps.hpp,
	insert_fn_imps.hpp, debug_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rc_binomial_heap_/erase_fn_imps.hpp,
	rc_binomial_heap_.hpp, insert_fn_imps.hpp,
	constructors_destructor_fn_imps.hpp, debug_fn_imps.hpp, rc.hpp,
	split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/detail/rb_tree_map_/erase_fn_imps.hpp,
	insert_fn_imps.hpp, constructors_destructor_fn_imps.hpp,
	debug_fn_imps.hpp, rb_tree_.hpp, split_join_fn_imps.hpp: Likewise.
	* include/ext/pb_ds/hash_policy.hpp: Likewise.

From-SVN: r173529
2011-05-07 13:45:24 +00:00
Marc Glisse 91e4938b8c PR libstdc++/47913 (again)
2011-05-04  Marc Glisse  <marc.glisse@normalesup.org>

	PR libstdc++/47913 (again)
	* include/std/ratio (ratio_add, ratio_less): Rewrite.
	* testsuite/20_util/ratio/operations/47913.cc: Extend.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.

From-SVN: r173400
2011-05-04 23:23:54 +00:00
Paolo Carlini 8a3cabe30f re PR libstdc++/48848 ([C++0x] std::valarray<T> functions missing)
2011-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48848
	* include/std/valarray (valarray<>::valarray(valarray&&),
	valarray<>::operator=(valarray&&), valarray<>::swap): Add.
	* doc/xml/manual/status_cxx200x.xml: Update.
	* testsuite/26_numerics/valarray/moveable.cc: New.
	* testsuite/26_numerics/valarray/swap.cc: Likewise.

From-SVN: r173344
2011-05-03 22:25:24 +00:00
Paolo Carlini 0ecca7a6a6 re PR libstdc++/48750 (for_each_template_random_access_ed has unbalanced new/delete[])
2011-05-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48750
	* include/parallel/multiway_merge.h: Run _ValueType destructors.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/quicksort.h: Likewise.
	* include/parallel/random_shuffle.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/losertree.h: Run destructors; minor tweaks.
	* include/parallel/par_loop.h: Run destructors, fix memory
	allocations and deallocations.
	* testsuite/26_numerics/accumulate/48750.cc: New.

	* testsuite/ext/profile/mutex_extensions_neg.cc: Do not run in
	parallel-mode to avoid spurious multiple errors.

From-SVN: r173309
2011-05-03 14:20:45 +00:00
Jonathan Wakely 0f88da8d14 functional (bind): Remove from overload set when first argument type might be a socket file descriptor.
2011-05-03  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/functional (bind): Remove from overload set when first
	argument type might be a socket file descriptor.
	* testsuite/20_util/bind/socket.cc: New.

From-SVN: r173279
2011-05-03 01:03:38 +01:00
Ollie Wild 95c952c532 sso_string_base.h (__sso_string_base<>::_M_construct): Fix unqualified lookup.
* include/ext/sso_string_base.h (__sso_string_base<>::_M_construct):
	Fix unqualified lookup.
	(__sso_string_base<>::_M_construct): Likewise.
	(__sso_string_base<>::_M_construct): Likewise.
	(__sso_string_base<>::_M_assign): Likewise.
	(__sso_string_base<>::_M_reserve): Likewise.
	(__sso_string_base<>::_M_mutate): Likewise.
	(__sso_string_base<>::_M_erase): Likewise.
	* include/ext/vstring.h (__versa_string<>::replace): Likewise.
	(__versa_string<>::compare): Likewise.
	* include/ext/vstring.tcc (__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.
	(__versa_string<>::compare): Likewise.

From-SVN: r173257
2011-05-02 16:25:14 +00:00
Paolo Carlini 2c7a09d774 [multiple changes]
2011-04-30  Daniel Krugler  <daniel.kruegler@googlemail.com>

	* include/std/type_traits (__is_default_constructible_atom,
	__is_default_constructible_safe<, true>,
	__is_direct_constructible_new_safe,
	__is_base_to_derived_ref<,, true>, __is_lvalue_to_rvalue_ref<,, true>,
	__is_direct_constructible_ref_cast, __is_direct_constructible,
	__is_nary_constructible): Simplify; add comments throughout.

2011-04-30  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r173222
2011-04-30 19:40:06 +00:00
Doug Kwan d5e8e6a873 Makefile.am (install-freestanding-headers): Also install cxxabi_tweaks.h.
2011-04-30  Doug Kwan  <dougkwan@google.com>

	* include/Makefile.am (install-freestanding-headers): Also install
	cxxabi_tweaks.h.
	* include/Makefile.in: Regenerate.

From-SVN: r173220
2011-04-30 16:26:23 +00:00
Paolo Carlini df9cb15f7a 2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
Revert unintended changes to include/parallel files.

From-SVN: r173066
2011-04-28 10:55:56 +00:00
Paolo Carlini 9f1163b171 re PR libstdc++/48760 (std::complex constructor buggy in the face of NaN's)
2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48760
	* include/std/complex (complex<float>::complex(float, float),
	complex<double>::complex(double, double),
	complex<long double>::complex(long double, long double)): Use
	list-initialization in C++0x mode, initialize in the body in
	C++03 mode.
	* testsuite/26_numerics/complex/cons/48760.cc: New.
	* testsuite/26_numerics/complex/cons/48760_c++0x.cc: Likewise.

2011-04-28  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/bitset (_Base_bitset(unsigned long long)): Minor
	tweak, remove redundant round braces.

From-SVN: r173065
2011-04-28 10:52:17 +00:00
Paolo Carlini 1f428429c4 move.h (move_if_noexcept): Add.
2011-04-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/move.h (move_if_noexcept): Add.
	* testsuite/20_util/move_if_noexcept/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/move_if_noexcept/1.cc: Likewise.

From-SVN: r173044
2011-04-27 18:37:32 +00:00
Paolo Carlini a47407f631 type_traits (struct underlying_type): Add.
2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (struct underlying_type): Add.
	* testsuite/20_util/underlying_type/requirements/typedefs-1.cc: New.
	* testsuite/20_util/underlying_type/requirements/typedefs-2.cc:
	Likewise.
	* testsuite/20_util/underlying_type/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust dg-error
	line number.

From-SVN: r172944
2011-04-25 23:04:16 +00:00
Paolo Carlini 6b77089f40 multiway_merge.h: Uglify equally_split and equally_split_point throughout.
2011-04-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/parallel/multiway_merge.h: Uglify equally_split
	and equally_split_point throughout.
	* include/parallel/par_loop.h: Likewise.
	* include/parallel/equally_split.h: Likewise.
	* include/parallel/set_operations.h: Likewise.
	* include/parallel/unique_copy.h: Likewise.
	* include/parallel/multiway_mergesort.h: Likewise.
	* include/parallel/search.h: Likewise.
	* include/parallel/partial_sum.h: Likewise.
	* include/parallel/find.h: Likewise.

From-SVN: r172923
2011-04-24 23:51:49 +00:00
Jonathan Wakely be7f782278 re PR libstdc++/48521 ([C++0x] std::result_of doesn't work with pointer to member)
2011-04-19  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48521
	* include/std/type_traits (result_of): Handle pointer to member.
	* include/std/functional (__invoke): Likewise.
	(_Function_to_function_pointer): Remove.
	(_Reference_wrapper_base): Provide nested types independent of
	unary_function and binary_function.
	(reference_wrapper::operator()): DR 2017.
	(ref(const A&&), cref(const A&&): Define as deleted.
	* include/std/future (async): Simplify SFINAE and use result_of to
	support pointer to member.
	* testsuite/20_util/reference_wrapper/invoke.cc: Test pointer to 
	member.
	* testsuite/20_util/reference_wrapper/24803.cc: Likewise.
	* testsuite/20_util/reference_wrapper/typedefs.cc: Test for types
	instead of derivation from unary_function and binary_function.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/reference_wrapper/invoke-2.cc: New.
	* testsuite/20_util/reference_wrapper/ref_neg.c: New.
	* testsuite/20_util/reference_wrapper/typedefs-3.c: New.

From-SVN: r172709
2011-04-19 14:26:08 +01:00
Paolo Carlini 65cee9bdb7 type_traits (is_nothrow_default_constructible, [...]): Add.
2011-04-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/type_traits (is_nothrow_default_constructible,
	is_nothrow_copy_constructible, is_nothrow_move_constructible,
	is_copy_constructible, is_move_constructible): Add.
	(has_nothrow_default_constructor, has_nothrow_copy_constructor):
	Remove.
	(is_nothrow_constructible): Adjust.

	* testsuite/util/testsuite_tr1.h (ThrowDefaultClass,
	ThrowCopyConsClass, ThrowMoveConsClass, NoexceptDefaultClass,
	ExceptDefaultClass, NoexceptCopyConsClass, ExceptCopyConsClass,
	NoexceptMoveConsClass, ExceptMoveConsClass): Add in C++0x mode.

	* testsuite/20_util/has_nothrow_default_constructor: Remove.
	* testsuite/20_util/has_nothrow_copy_constructor: Likewise.

	* testsuite/20_util/is_nothrow_move_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_move_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_copy_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/value.cc:
	Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_nothrow_default_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_move_constructible/value.cc: Likewise.
	* testsuite/20_util/is_move_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_move_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_copy_constructible/value.cc: Likewise.
	* testsuite/20_util/is_copy_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_copy_constructible/requirements/
	explicit_instantiation.cc: Likewise.

	* testsuite/20_util/is_default_constructible/value.cc: Add tests.
	* testsuite/20_util/is_nothrow_constructible/value.cc: Likewise.

	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.

From-SVN: r172684
2011-04-19 00:10:53 +00:00
Daniel Krugler da8111a024 PR libstdc++/48635 (again)
2011-04-17  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48635 (again)
	* include/bits/unique_ptr.h (unique_ptr<>::unique_ptr(unique_ptr<>&&),
	unique_ptr<_Tp[]>::unique_ptr(unique_ptr<>&&),
	unique_ptr<>::operator=(unique_ptr<>&&),
	unique_ptr<_Tp[]>::operator=(unique_ptr<>&&)): Use forward<_Ep>, not
	forward<_Dp>, to forward the deleter.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: New.

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

From-SVN: r172619
2011-04-17 21:46:11 +00:00
Daniel Krugler d4610485cc re PR libstdc++/48631 ([C++0x] default_delete<T[]> accepts pointer conversions in function call operator)
2011-04-15  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48631
	* include/bits/unique_ptr.h (default_delete<_Tp[]>): Add deleted
	function call operator.
	* testsuite/20_util/default_delete/48631_neg.cc: New.
	* testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Adjust dg-error
	line numbers.

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

From-SVN: r172534
2011-04-16 02:02:29 +00:00
Daniel Krugler 2705a8d66e re PR libstdc++/48635 ([C++0x] unique_ptr<T, D&> moves the deleter instead of copying it)
2011-04-15  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48635
	* include/bits/unique_ptr.h (unique_ptr<>::operator=(unique_ptr&&),
	unique_ptr<>::operator=(unique_ptr<>&&),
	unique_ptr<_Tp[],>::operator=(unique_ptr&&),
	unique_ptr<_Tp[],>::operator=(unique_ptr<>&&)): Forward the deleter
	instead of moving it.
	* testsuite/20_util/unique_ptr/assign/48635.cc: New.

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

From-SVN: r172532
2011-04-16 00:55:43 +00:00
Paolo Carlini b3b66298b8 istream: Fix comments in the light of DR60 + N3168.
2011-04-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/istream: Fix comments in the light of DR60 + N3168.

From-SVN: r172500
2011-04-15 16:18:22 +00:00
Paolo Carlini 123c516a9e [multiple changes]
2011-04-13  Daniel Krugler  <daniel.kruegler@googlemail.com>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48526
	* include/std/type_traits (struct is_constructible): Re-implement,
	according to n3290.
	(struct is_default_constructible): Add.
	(struct is_destructible): Likewise.
	(struct __and_, __or_, __not_): Add and use throughout; reorder some
	facilities, other minor tweaks.
	* testsuite/util/testsuite_tr1.h: Add test types.
	* testsuite/20_util/is_constructible/value-2.cc: New.
	* testsuite/20_util/is_default_constructible/value.cc: Likewise.
	* testsuite/20_util/is_default_constructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_default_constructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_destructible/value.cc: Likewise.
	* testsuite/20_util/is_destructible/requirements/typedefs.cc:
	Likewise.
	* testsuite/20_util/is_destructible/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error line numbers.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
	Likewise.
	* testsuite/20_util/declval/requirements/1_neg.cc: Likewise.
	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Likewise.

2011-04-13  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/is_function/value.cc: Add, adapted from the tr
	testsuite. 
	* testsuite/20_util/is_function/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_function/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_function/24808.cc: Likewise.
	* testsuite/20_util/is_function/35637.cc: Likewise.
	* testsuite/20_util/is_object/value.cc: Likewise.
	* testsuite/20_util/is_object/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_object/requirements/explicit_instantiation.cc:
	: Likewise.
	* testsuite/20_util/is_object/24808.cc: Likewise.
	* testsuite/20_util/is_compound/value.cc: Likewise.
	* testsuite/20_util/is_compound/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_compound/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/requirements/
	typedefs.cc: Likewise.
	* testsuite/20_util/is_member_object_pointer/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_fundamental/value.cc: Likewise.
	* testsuite/20_util/is_fundamental/requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_fundamental/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_pointer/requirements/typedefs.cc: 
	Likewise.
	* testsuite/20_util/is_member_pointer/requirements/
	explicit_instantiation.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/value.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/
	requirements/typedefs.cc: Likewise.
	* testsuite/20_util/is_member_function_pointer/requirements/
	explicit_instantiation.cc: Likewise.

	* testsuite/20_util/is_convertible/value.cc: Minor tweak, adjust
	Copyright years.

From-SVN: r172401
2011-04-13 22:52:45 +00:00
Takaya Saito 78a869ec74 re PR libstdc++/48476 ([C++0x] conversion between std::tuple which have reference member is rejected)
2011-04-12  Takaya Saito  <gintensubaru@gmail.com>

	PR libstdc++/48476
	* include/std/tuple (_Tuple_impl<>::_Tuple_impl(_Tuple_impl<>&&),
	_Tuple_impl<>::operator=(_Tuple_impl&&), _Tuple_impl<>::operator=
	(_Tuple_impl<>&&), tuple_cat): Use std::forward where appropriate.
	* testsuite/20_util/tuple/cons/48476.cc: New.
	* testsuite/20_util/tuple/48476.cc: Likewise.
	* testsuite/20_util/tuple/creation_functions/48476.cc: Likewise.

From-SVN: r172309
2011-04-12 10:31:33 +00:00
Jonathan Wakely 3e49fb0379 re PR libstdc++/48541 (std::function(std::_Function_base) should use std::addressof)
2011-04-10  Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/48541
	* include/std/functional (_Base_manager::_M_get_pointer): Use
	addressof.
	* testsuite/20_util/function/48541.cc: New.

From-SVN: r172244
2011-04-10 17:35:58 +01:00
Jeffrey Yasskin 7c16382a3a In C++0x mode, import iota and is_sorted from namespace std into namespace __gnu_cxx to avoid ambiguous call errors.
In C++0x mode, import iota and is_sorted from namespace std into
namespace __gnu_cxx to avoid ambiguous call errors.  copy_n would be a
good candidate for this too, except it was standardized with a
different return type.

Tested:
  `make -k check-c++` on x86_64-unknown-linux-gnu.

libstdc++-v3/ChangeLog:

2011-04-06  Jeffrey Yasskin  <jyasskin@google.com>

        * include/ext/algorithm (is_sorted): In C++0x mode import from
        namespace std.
        * include/ext/numeric (iota): In C++0x mode import from
        namespace std.
        * testsuite/ext/is_sorted/cxx0x.cc: New.
        * testsuite/ext/iota/cxx0x.cc: New.

From-SVN: r172073
2011-04-07 04:11:12 +00:00
Jonathan Wakely 0569d07d16 re PR libstdc++/48398 ([C++0x] std::unique_ptr<T, D> is broken when D::pointer is not T*)
2011-04-02  Jonathan Wakely  <redi@gcc.gnu.org>

	PR libstdc++/48398
	* include/bits/unique_ptr.h (__tuple_type): Store pointer type.
	* testsuite/20_util/unique_ptr/modifiers/48398.cc: New.
	* testsuite/20_util/unique_ptr/requirements/pointer_type.cc: Remove
	unused parameter name.

From-SVN: r171894
2011-04-02 20:32:15 +01:00
Paolo Carlini 246428c2d4 re PR libstdc++/48382 (ctype_noninline.h should not be installed)
2011-03-31  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/48382
	* src/ctype.cc: Do not include <bits/ctype_noninline.h>.
	* src/Makefile.am: Add ctype_configure_char.cc to host_sources.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am: Remove ctype_noninline.h from host_headers.
	* include/Makefile.in: Regenerate.
	* doc/xml/manual/internals.xml: Update.
	* config/os/newlib/ctype_noninline.h: Fixup and rename to...
	* config/os/newlib/ctype_configure_char.cc: ... this.
	* config/os/aix/ctype_noninline.h: Likewise.
	* config/os/aix/ctype_configure_char.cc: Likewise.
	* config/os/vxworks/ctype_noninline.h: Likewise.
	* config/os/vxworks/ctype_configure_char.cc
	* config/os/hpux/ctype_noninline.h: Likewise.
	* config/os/hpux/ctype_configure_char.cc: Likewise.
	* config/os/gnu-linux/ctype_noninline.h: Likewise.
	* config/os/gnu-linux/ctype_configure_char.cc: Likewise.
	* config/os/mingw32/ctype_noninline.h: Likewise.
	* config/os/mingw32/ctype_configure_char.cc: Likewise.
	* config/os/tpf/ctype_noninline.h: Likewise.
	* config/os/tpf/ctype_configure_char.cc: Likewise.
	* config/os/uclibc/ctype_noninline.h: Likewise.
	* config/os/uclibc/ctype_configure_char.cc: Likewise.
	* config/os/bionic/ctype_noninline.h: Likewise.
	* config/os/bionic/ctype_configure_char.cc: Likewise.
	* config/os/djgpp/ctype_noninline.h: Likewise.
	* config/os/djgpp/ctype_configure_char.cc: Likewise.
	* config/os/qnx/qnx6.1/ctype_noninline.h: Likewise.
	* config/os/qnx/qnx6.1/ctype_configure_char.cc: Likewise.
	* config/os/bsd/netbsd/ctype_noninline.h: Likewise.
	* config/os/bsd/netbsd/ctype_configure_char.cc: Likewise.
	* config/os/bsd/darwin/ctype_noninline.h: Likewise.
	* config/os/bsd/darwin/ctype_configure_char.cc: Likewise.
	* config/os/bsd/freebsd/ctype_noninline.h: Likewise.
	* config/os/bsd/freebsd/ctype_configure_char.cc: Likewise.
	* config/os/irix/irix6.5/ctype_noninline.h: Likewise.
	* config/os/irix/irix6.5/ctype_configure_char.cc: Likewise.
	* config/os/generic/ctype_noninline.h: Likewise.
	* config/os/generic/ctype_configure_char.cc: Likewise.
	* config/os/solaris/solaris2.7/ctype_noninline.h: Likewise.
	* config/os/solaris/solaris2.7/ctype_configure_char.cc: Likewise.

From-SVN: r171790
2011-03-31 16:06:12 +00:00
Jonathan Wakely e3e08a1db5 future (future::share): Add.
2011-03-25  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/future (future::share): Add.
	(packaged_task::result_type): Remove as per LWG 2030.
	(packaged_task::packaged_task): Remove redundant constructors, as per
	LWG 1514.
	* testsuite/30_threads/future/members/share.cc: New.
	* testsuite/30_threads/packaged_task/requirements/typedefs.cc: Remove.

From-SVN: r171531
2011-03-25 23:16:09 +00:00