Commit Graph

6126 Commits

Author SHA1 Message Date
Paolo Carlini 1a9e603e52 2009-06-20 Paolo Carlini <paolo.carlini@oracle.com>
* Revert last Change.

From-SVN: r148756
2009-06-21 00:57:56 +00:00
Paolo Carlini 2271f9c260 re PR libstdc++/40497 ([C++0x] troubles with std::next / std::prev declarations)
2009-06-20  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40497
	* include/bits/stl_iterator_base_funcs.h (next, prev): Fix the
	signature per the current C++1x draft (N2857).
	* testsuite/24_iterators/operations/40497.cc: Add.

From-SVN: r148751
2009-06-20 22:27:04 +00:00
Paolo Carlini 9b88236b34 random.h (_Adaptor): Simplify for _DInputType always a floating point type.
2009-06-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.h (_Adaptor): Simplify for _DInputType always
	a floating point type.
	(uniform_int_distribution<>::uniform_int_distribution(_IntType,
	_IntType)): Fix second default argument.
	(uniform_int_distribution<>::_M_call): Remove.
	(uniform_int_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Only declare.
	* include/bits/random.tcc (uniform_int_distribution<>::_M_call(
	_UniformRandomNumberGenerator&, result_type, result_type, true_type):
	Remove.
	uniform_int_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&): Define here.
	(geometric_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&), discrete_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&), 
	piecewise_constant_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&),
	piecewise_linear_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&)): Use double as
	the second template argument of _Adaptor.
	* testsuite/26_numerics/random/uniform_int_distribution/cons/
	default.cc: Adjust.

From-SVN: r148720
2009-06-19 17:49:31 +00:00
Paolo Carlini f8dd9e0de0 random.tcc (discrete_distribution<>::param_type:: param_type(size_t, double, double, _Func), [...]): Tidy.
2009-06-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (discrete_distribution<>::param_type::
      	param_type(size_t, double, double, _Func),
	discrete_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Tidy.
	(piecewise_constant_distribution<>::param_type::_M_initialize):
	Use reserve, fix.
	(piecewise_constant_distribution<>::param_type::
	param_type(initializer_list<>, _Func),
	piecewise_constant_distribution<>::param_type::
	param_type(size_t, _RealType, _RealType, _Func),
       	piecewise_linear_distribution<>::param_type::
	param_type(initializer_list<>, _Func),
       	piecewise_linear_distribution<>::param_type::
	param_type(size_t, _RealType, _RealType, _Func)): Use reserve, tidy.
	(piecewise_constant_distribution<>::param_type::
	param_type(_InputIteratorB, _InputIteratorB, _InputIteratorW),
	piecewise_constant_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&),
      	piecewise_linear_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&)): Fix.
	(operator>>(std::basic_istream<>&,
	piecewise_constant_distribution<>&),
	operator>>(std::basic_istream<>&, piecewise_linear_distribution<>&)):
	Use reserve.
	* include/bits/random.h: Minor cosmetic changes.

From-SVN: r148719
2009-06-19 17:17:14 +00:00
Benjamin Kosnik a9a51750b9 check_construct_destroy.h: New.
2009-06-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/list/check_construct_destroy.h: New.
	Move test logic here.
	* testsuite/23_containers/list/moveable.h: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.h: Same.
	* testsuite/23_containers/list/modifiers/1.h: Same.
	* testsuite/23_containers/list/modifiers/2.h: Same.
	* testsuite/23_containers/list/modifiers/3.h: Same.
	* testsuite/23_containers/list/modifiers/swap/1.h: Same.
	* testsuite/23_containers/list/modifiers/swap/2.h: Same.
	* testsuite/23_containers/list/modifiers/swap/3.h: Same.
	* testsuite/23_containers/list/operations/1.h: Same.
	* testsuite/23_containers/list/operations/2.h: Same.
	* testsuite/23_containers/list/operations/3.h: Same.
	* testsuite/23_containers/list/operations/4.h: Same.
	* testsuite/23_containers/list/operations/5.h: Same.
	* testsuite/23_containers/list/capacity/1.h: Same.
	* testsuite/23_containers/list/init-list.h: Same.
	* testsuite/23_containers/list/cons/1.h: Same.
	* testsuite/23_containers/list/cons/2.h: Same.
	* testsuite/23_containers/list/cons/3.h: Same.
	* testsuite/23_containers/list/cons/4.h: Same.
	* testsuite/23_containers/list/cons/5.h: Same.
	* testsuite/23_containers/list/cons/6.h: Same.
	* testsuite/23_containers/list/cons/7.h: Same.
	* testsuite/23_containers/list/cons/8.h: Same.
	* testsuite/23_containers/list/cons/9.h: Same.
	* testsuite/23_containers/list/cons/clear_allocator.h: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.cc: Include test
	header.
	* testsuite/23_containers/list/modifiers/1.cc: Same.
	* testsuite/23_containers/list/modifiers/2.cc: Same.
	* testsuite/23_containers/list/modifiers/3.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/1.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/2.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/3.cc: Same.
	* testsuite/23_containers/list/operations/1.cc: Same.
	* testsuite/23_containers/list/operations/2.cc: Same.
	* testsuite/23_containers/list/operations/3.cc: Same.
	* testsuite/23_containers/list/operations/4.cc: Same.
	* testsuite/23_containers/list/operations/5.cc: Same.
	* testsuite/23_containers/list/capacity/1.cc: Same.
	* testsuite/23_containers/list/init-list.cc: Same.
	* testsuite/23_containers/list/cons/1.cc: Same.
	* testsuite/23_containers/list/cons/2.cc: Same.
	* testsuite/23_containers/list/cons/3.cc: Same.
	* testsuite/23_containers/list/cons/4.cc: Same.
	* testsuite/23_containers/list/cons/5.cc: Same.
	* testsuite/23_containers/list/cons/6.cc: Same.
	* testsuite/23_containers/list/cons/7.cc: Same.
	* testsuite/23_containers/list/cons/8.cc: Same.
	* testsuite/23_containers/list/cons/9.cc: Same.
	* testsuite/23_containers/list/cons/clear_allocator.cc: Same.
	* testsuite/23_containers/list/check_construct_destroy.cc: Same.
	* testsuite/23_containers/list/moveable.cc: Same.

From-SVN: r148644
2009-06-18 01:40:44 +00:00
Tom Tromey 6ba49852d8 hook.in: Do not fail when there is no current objfile.
* python/hook.in: Do not fail when there is no current objfile.
	Use os.path.normpath.

From-SVN: r148626
2009-06-17 20:06:27 +00:00
Jonathan Wakely 9fdcbf4031 exception_ptr.h (exception_ptr::swap(exception_ptr&&)): Remove.
2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* libsupc++/exception_ptr.h (exception_ptr::swap(exception_ptr&&)):
	Remove.
	(exception_ptr::operator=(exception_ptr&&)): Cast source to
	rvalue-reference so that move constructor is called.
	* testsuite/18_support/exception_ptr/move.cc: New.

From-SVN: r148555
2009-06-16 22:24:41 +01:00
Jonathan Wakely cd3b0fafaa thread (~thread(), [...]): Call terminate if joinable.
2009-06-16  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/thread (~thread(), operator=(thread&&)): Call terminate
	if joinable.

From-SVN: r148552
2009-06-16 21:34:43 +01:00
Tom Tromey ee47095bb4 printers.py (StdMapPrinter.__init__): Don't set self.iter.
* python/libstdcxx/v6/printers.py (StdMapPrinter.__init__): Don't
	set self.iter.
	(StdMapPrinter.to_string): Make a new iterator.
	(StdMapPrinter.children): Likewise.
	(StdSetPrinter.__init__): Don't set self.iter.
	(StdSetPrinter.to_string): Make a new iterator.
	(StdSetPrinter.children): Likewise.

From-SVN: r148506
2009-06-15 20:54:22 +00:00
Paolo Carlini f9b09dec19 random.tcc (negative_binomial_distribution<>::operator() (_UniformRandomNumberGenerator&, const param_type&): Tweak to use a class member gamma_distribution.
2009-06-11  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc
	(negative_binomial_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Tweak to use a
	class member gamma_distribution.
	(negative_binomial_distribution<>::operator()
	(_UniformRandomNumberGenerator&)): Implement out of line here.
	(operator<<(basic_ostream<>&, negative_binomial_distribution<>),
	operator>>(basic_ostream<>&, negative_binomial_distribution<>): Adjust.
	(student_t_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Move inline,
	simplify.
	(operator<<(basic_ostream<>&, student_t_distribution<>),
	operator>>(basic_ostream<>&, student_t_distribution<>): Adjust.
	(chi_squared_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Move inline,
	tweak to use a class member gamma_distribution.
	(operator<<(basic_ostream<>&, chi_squared_distribution<>),
	operator>>(basic_ostream<>&, chi_squared_distribution<>): Adjust.
	(fisher_f_distribution<>::operator() (_UniformRandomNumberGenerator&,
	const param_type&): Move inline, tweak to use class member
	gamma_distributions.
	(operator<<(basic_ostream<>&, fisher_f_distribution<>),
	operator>>(basic_ostream<>&, fisher_f_distribution<>): Adjust.
	* include/bits/random.h: Adjust, minor tweaks.

From-SVN: r148393
2009-06-11 18:32:30 +00:00
Tom Tromey 3af622115b printers.py (lookup_function): Remove extra ';'.
* python/libstdcxx/v6/printers.py (lookup_function): Remove extra
	';'.
	(build_libstdcxx_dictionary): Accept shortened form of
	basic_string names.
	(StdStringPrinter.to_string): Remove reference to WideEncoding.

From-SVN: r148358
2009-06-10 22:59:01 +00:00
Tom Tromey 35204bbe76 re PR libstdc++/40289 (share/libstdc++/python/ pollutes common namespace)
PR libstdc++/40289:
	* python/Makefile.in: Rebuild.
	* python/hook.in: Compute module path relative to objfile.
	* python/Makefile.am (pythondir): Redefine.
	(gdb.py): Subst toolexeclibdir.
	(install-data-local): Rewrite.

From-SVN: r148357
2009-06-10 22:58:22 +00:00
Benjamin Kosnik fd9380a6cd move.h: Doxygen group fixes.
2009-06-09  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/move.h: Doxygen group fixes.

From-SVN: r148337
2009-06-10 02:14:32 +00:00
Paolo Carlini b01630bb3d random.tcc (gamma_distribution<>::operator() (_UniformRandomNumberGenerator&, const param_type&): Redo, using the Marsaglia/Tsang algorithm.
2009-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (gamma_distribution<>::operator()
	(_UniformRandomNumberGenerator&, const param_type&): Redo, using
	the Marsaglia/Tsang algorithm.
	(gamma_distribution<>::param_type::_M_initialize): Adjust.
	(operator<<(basic_ostream<>&, gamma_distribution<>),
	operator>>(basic_ostream<>&, gamma_distribution<>): Likewise.

	* include/bits/random.tcc(student_t_distribution<>::_M_gaussian):
	Remove, just use normal_distribution.
	(operator<<(basic_ostream<>&, student_t_distribution<>),
	operator>>(basic_ostream<>&, student_t_distribution<>): Adjust.
	(linear_congruential_engine<>::operator()()): Move inline.
	(lognormal_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Move inline, just use normal_distribution.
	(operator<<(basic_ostream<>&, lognormal_distribution<>),
	operator>>(basic_ostream<>&, lognormal_distribution<>): Adjust.
	(weibull_distribution<>::operator()(_UniformRandomNumberGenerator&,
	const param_type&)): Move here, out of line.
	(piecewise_constant_distribution<>::param_type::param_type()): Move
	inline.
	* include/bits/random.h: Adjust, minor tweaks.

From-SVN: r148276
2009-06-08 14:38:48 +00:00
Benjamin Kosnik ca462c38d1 aggregate.cc: Remove xfail.
2009-06-05  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/29_atomics/atomic_address/cons/aggregate.cc: Remove xfail.

From-SVN: r148222
2009-06-05 18:37:00 +00:00
Benjamin Kosnik 5580c6e729 throw_allocator.h: Rework.
2009-06-04  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/throw_allocator.h: Rework.
	* include/ext/pb_ds/detail/debug_map_base.hpp: Adjust usage.
	* include/ext/pb_ds/detail/gp_hash_table_map_/resize_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_/ov_tree_map_.hpp: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.cc: Same.
	* testsuite/util/regression/rand/priority_queue/
	container_rand_regression_test.tcc: Inline functions.
	* testsuite/util/regression/rand/assoc/
	container_rand_regression_test.tcc: Same.

From-SVN: r148204
2009-06-05 08:45:26 +00:00
Benjamin Kosnik b49e9f7a3d 6.cc: Adjust test name.
2009-06-03  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/list/cons/6.cc: Adjust test name.

From-SVN: r148140
2009-06-03 17:44:43 +00:00
Paolo Carlini 110a123aae re PR libstdc++/40296 ([C++0x] std::exception_ptr comparisons)
2009-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40296
	* libsupc++/exception_ptr.h (exception_ptr::operator!,
	exception_ptr::operator __safe_bool): Only declare when
	_GLIBCXX_EH_PTR_COMPAT is undefined.
	* libsupc++/eh_ptr.cc: Define _GLIBCXX_EH_PTR_COMPAT before including
	exception_ptr.
	* testsuite/18_support/exception_ptr/40296.cc: New.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: Adjust.
	* testsuite/18_support/nested_exception/cons.cc: Likewise.
	* testsuite/18_support/nested_exception/nested_ptr.cc: Likewise.
	* testsuite/18_support/exception_ptr/current_exception.cc: Likewise.

From-SVN: r148122
2009-06-03 10:37:20 +00:00
Richard Sandiford 70ed7339f7 crossconfig.m4 (GLIBCXX_CROSSCONFIG): Handle AIX targets.
libstdc++-v3/
	* crossconfig.m4 (GLIBCXX_CROSSCONFIG): Handle AIX targets.
	* configure: Regenerate.

From-SVN: r148098
2009-06-02 19:15:03 +00:00
Paolo Carlini a67b92c3d7 re PR libstdc++/40299 (Rope + C++0x mode = build error)
2009-06-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40299
	* include/ext/memory: Fully qualify calls with __gnu_cxx.
	* testsuite/ext/rope/40299.cc: New.

From-SVN: r148081
2009-06-02 09:06:31 +00:00
Tom Tromey 4185041973 Makefile.in, [...]: New files.
2009-05-28  Tom Tromey  <tromey@redhat.com>
	    Phil Muldoon  <pmuldoon@redhat.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	* python/Makefile.in, , python/libstdcxx/__init__.py,
	python/libstdcxx/v6/__init__.py, python/libstdcxx/v6/printers.py,
	python/hook.in, python/Makefile.am: New files.
	* configure, Makefile.in: Rebuild.
	* acinclude.m4 (glibcxx_SUBDIRS): Add python.
	* Makefile.am (SUBDIRS): Add python.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>
Co-Authored-By: Phil Muldoon <pmuldoon@redhat.com>

From-SVN: r147958
2009-05-28 17:14:18 +00:00
Benjamin Kosnik daa159291b testsuite_allocator.h (check_new, [...]): Move to ...
2009-05-28  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/util/testsuite_allocator.h (check_new, check_delete): Move
	to ...
	* testsuite/util/replacement_memory_operators.h: ...here. New.
	* testsuite/util/testsuite_hooks.h (counter): To object_counter.
	* testsuite/util/testsuite_hooks.cc: Same.

	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Use
	replacement_memory_operators.h.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/check_delete.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-5.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local_thread-7.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-6.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_local-8.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-2.cc: Same.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Same.
	* testsuite/ext/mt_allocator/check_new.cc: Same.
	* testsuite/ext/debug_allocator/check_delete.cc: Same.
	* testsuite/ext/debug_allocator/check_new.cc: Same.
	* testsuite/ext/new_allocator/deallocate_global.cc: Same.
	* testsuite/ext/new_allocator/check_delete.cc: Same.
	* testsuite/ext/new_allocator/check_new.cc: Same.
	* testsuite/ext/new_allocator/deallocate_local.cc: Same.
	* testsuite/ext/throw_allocator/deallocate_global.cc: Same.
	* testsuite/ext/throw_allocator/check_delete.cc: Same.
	* testsuite/ext/throw_allocator/check_new.cc: Same.
	* testsuite/ext/throw_allocator/deallocate_local.cc: Same.
	* testsuite/ext/malloc_allocator/deallocate_global.cc: Same.
	* testsuite/ext/malloc_allocator/check_delete.cc: Same.
	* testsuite/ext/malloc_allocator/check_new.cc: Same.
	* testsuite/ext/malloc_allocator/deallocate_local.cc: Same.
	* testsuite/ext/pool_allocator/check_delete.cc: Same.
	* testsuite/ext/pool_allocator/check_new.cc: Same.
	* testsuite/ext/bitmap_allocator/check_delete.cc: Same.
	* testsuite/ext/bitmap_allocator/check_new.cc: Same.
	* testsuite/ext/array_allocator/check_delete.cc: Same.
	* testsuite/ext/array_allocator/check_new.cc: Same.
	* testsuite/23_containers/deque/cons/1.cc: Same.
	* testsuite/23_containers/deque/cons/2.cc: Same.

From-SVN: r147937
2009-05-28 00:17:00 +00:00
Jason Merrill c5adc4275c call.c (implicit_conversion): Handle conversion from initializer-list to scalar.
* call.c (implicit_conversion): Handle conversion from
	initializer-list to scalar.
	(convert_like_real): Likewise.  Avoid crashing on list
	initialization with bad conversions.
	(can_convert): Use LOOKUP_EXPLICIT.
	(can_convert_arg_bad): Add flags parm.
	* cp-tree.h: Adjust.
	* typeck.c (convert_for_assignment): Pass flags.

From-SVN: r147933
2009-05-27 18:23:41 -04:00
Benjamin Kosnik eaf4cf4fdc initializer_list: Format.
2009-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	* libsupc++/initializer_list: Format.
	* testsuite/18_support/initializer_list/requirements/typedefs.cc: New.
	* testsuite/18_support/initializer_list/requirements/
	explicit_instantiation.cc: New.

From-SVN: r147931
2009-05-27 21:17:49 +00:00
Benjamin Kosnik 626e0599af re PR libstdc++/40273 ([C++0x] Invalid conversion to bool is reported)
2009-05-27  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/40273
	* include/tr1_impl/functional: Add explicit cast.
	* testsuite/20_util/function/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/function/null_pointer_comparisons.cc: New.

From-SVN: r147930
2009-05-27 20:32:30 +00:00
Eelis van der Weegen ffa52e113d initializer_list (initializer_list): Add missing typedefs.
2009-05-24  Eelis van der Weegen  <eelis@eelis.net>
	
	* libsupc++/initializer_list (initializer_list): Add missing typedefs.

From-SVN: r147828
2009-05-24 04:44:50 +00:00
Benjamin Kosnik e4c29fbc9e re PR bootstrap/40221 (Powerpc bootstrap is broken in building libstdc++)
2009-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	PR libstdc++/40221
	* include/tr1_impl/functional: Add explicit cast.

From-SVN: r147794
2009-05-22 07:19:37 +00:00
Paolo Carlini aaf19a5069 re PR libstdc++/40094 (FAIL: ext/throw_allocator/deallocate_global.cc execution test)
2009-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
	
	PR libstdc++/40094
	Revert:
	2009-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
	* include/ext/throw_allocator.h (throw_allocator_base): Avoid
	out of line member functions definitions.
	(throw_allocator_base::_S_g, _S_map, _S_throw_prob, _S_label):
	Remove, use static locals instead.
	(throw_allocator_base::do_check_allocated, print_to_string): Declare.
	* src/throw_allocator.cc: New.
	* src/Makefile.am: Add.
	* config/abi/pre/gnu.ver: Add exports.
	* src/Makefile.in: Regenerate.

From-SVN: r147789
2009-05-22 01:32:49 +00:00
Paolo Carlini e2792913bd re PR libstdc++/40094 (FAIL: ext/throw_allocator/deallocate_global.cc execution test)
2009-05-21  Paolo Carlini  <paolo.carlini@oracle.com>
	
	PR libstdc++/40094
	Revert:
	2009-05-07  Paolo Carlini  <paolo.carlini@oracle.com>
	* include/ext/throw_allocator.h (throw_allocator_base): Avoid
	out of line member functions definitions.
	(throw_allocator_base::_S_g, _S_map, _S_throw_prob, _S_label):
	Remove, use static locals instead.
	(throw_allocator_base::do_check_allocated, print_to_string): Declare.
	* src/throw_allocator.cc: New.
	* src/Makefile.am: Add.
	* config/abi/pre/gnu.ver: Add exports.
	* src/Makefile.in: Regenerate.

From-SVN: r147788
2009-05-22 01:28:50 +00:00
Benjamin Kosnik d29d4507b2 functional (function): Use explicit operator bool.
2009-05-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/tr1_impl/functional (function): Use explicit operator bool.
	* include/bits/shared_ptr.h (__shared_ptr): Same.
	* include/bits/unique_ptr.h (unique_ptr): Same.
	* include/std/mutex (unique_lock): Same.
	* include/std/system_error (error_code): Same.
	(error_condition): Same.
	* include/std/ostream (sentry): Same.
	* include/std/istream (sentry): Same.
	* testsuite/19_diagnostics/error_condition/operators/bool.cc: Adjust.
	* testsuite/19_diagnostics/error_condition/operators/bool_neg.cc: Same.
	* testsuite/19_diagnostics/error_code/operators/bool.cc: Same.
	* testsuite/19_diagnostics/error_code/operators/bool_neg.cc: Same.
	* testsuite/20_util/unique_ptr/modifiers/reset_neg.cc: Same.
	* testsuite/20_util/unique_ptr/assign/assign_neg.cc: Same.
	* testsuite/20_util/shared_ptr/observers/bool_conv.cc: Same.

From-SVN: r147756
2009-05-21 01:12:00 +00:00
Benjamin Kosnik 875d0f10a6 14340.cc: Abstract list type.
2009-05-19  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/list/14340.cc: Abstract list type.
	* testsuite/23_containers/list/init-list.cc: Same.
	* testsuite/23_containers/list/pthread5.cc: Same.
	* testsuite/23_containers/list/invalidation/1.cc: Same.
	* testsuite/23_containers/list/invalidation/2.cc: Same.
	* testsuite/23_containers/list/invalidation/3.cc: Same.
	* testsuite/23_containers/list/invalidation/4.cc: Same.
	* testsuite/23_containers/list/modifiers/insert/25288.cc: Same.
	* testsuite/23_containers/list/modifiers/1.cc: Same.
	* testsuite/23_containers/list/modifiers/2.cc: Same.
	* testsuite/23_containers/list/modifiers/3.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/1.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/2.cc: Same.
	* testsuite/23_containers/list/modifiers/swap/3.cc: Same.
	* testsuite/23_containers/list/cons/1.cc: Same.
	* testsuite/23_containers/list/cons/2.cc: Same.
	* testsuite/23_containers/list/cons/3.cc: Same.
	* testsuite/23_containers/list/cons/4.cc: Same.
	* testsuite/23_containers/list/cons/5.cc: Same.
	* testsuite/23_containers/list/cons/6.cc: Same.
	* testsuite/23_containers/list/cons/7.cc: Same.
	* testsuite/23_containers/list/cons/clear_allocator.cc: Same.
	* testsuite/23_containers/list/cons/8.cc: Same.
	* testsuite/23_containers/list/cons/9.cc: Same.
	* testsuite/23_containers/list/operations/1.cc: Same.
	* testsuite/23_containers/list/operations/2.cc: Same.
	* testsuite/23_containers/list/operations/3.cc: Same.
	* testsuite/23_containers/list/operations/4.cc: Same.
	* testsuite/23_containers/list/operations/5.cc: Same.
	* testsuite/23_containers/list/requirements/citerators.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/insert_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Same.
	* testsuite/23_containers/list/requirements/dr438/constructor.cc: Same.
	* testsuite/23_containers/list/requirements/
	partial_specialization/1.cc: Same.
	* testsuite/23_containers/list/23781.cc: Same.
	* testsuite/23_containers/list/pthread1.cc: Same.
	* testsuite/23_containers/list/capacity/1.cc: Same.
	* testsuite/23_containers/list/capacity/29134.cc: Same.
	* testsuite/23_containers/list/check_construct_destroy.cc: Same.
	* testsuite/23_containers/list/moveable.cc: Same.

	* testsuite/util/common_type/assoc/common_type.hpp: Re-break lines.

From-SVN: r147728
2009-05-20 04:05:21 +00:00
Paolo Carlini c8036448d1 re PR libstdc++/40184 (locale(const char* std_name) can create invalid facets for nonuniform locale)
2009-05-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40184
	* include/bits/locale_classes.h (locale::facet::_S_lc_ctype_c_locale):
	Declare...
	* config/locale/gnu/c_locale.cc: ... and define.
	* config/locale/generic/c_locale.cc: Define.
	* src/localename.cc (locale::_Impl::_Impl(const char*, size_t)):
	Use it.
	* testsuite/22_locale/locale/cons/40184.cc: New.

From-SVN: r147714
2009-05-19 18:20:47 +00:00
Paolo Carlini cf0e6fff1d re PR c++/40192 (Unable to use std::vector with typedef'd array types)
2009-05-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40192
	* include/bits/stl_construct.h (struct _Destroy_aux): Add.
	(_Destroy(_ForwardIterator, _ForwardIterator)): Use the latter.
	* testsuite/23_containers/vector/40192.cc: New.

From-SVN: r147680
2009-05-18 23:16:20 +00:00
Jonathan Wakely ff74fd1325 stl_pair.h (swap): Do not swap rvalues.
2009-05-18  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/stl_pair.h (swap): Do not swap rvalues.
	* include/bits/stl_deque.h (swap): Likewise.
	* include/bits/stl_list.h (swap): Likewise.
	* include/bits/stl_vector.h (swap): Likewise.
	* include/bits/stl_bvector.h (swap): Likewise.
	* include/bits/stl_queue.h (swap): Likewise.
	* include/bits/stl_stack.h (swap): Likewise.
	* include/bits/stl_tree.h (swap): Likewise.
	* include/bits/stl_map.h (swap): Likewise.
	* include/bits/stl_multimap.h (swap): Likewise.
	* include/bits/stl_set.h (swap): Likewise.
	* include/bits/stl_multiset.h (swap): Likewise.
	* include/bits/forward_list.h (swap): Likewise.
	* include/bits/unique_ptr.h (swap): Likewise.
	* include/debug/deque (swap): Likewise.
	* include/debug/list (swap): Likewise.
	* include/debug/vector (swap): Likewise.
	* include/debug/map.h (swap): Likewise.
	* include/debug/multimap.h (swap): Likewise.
	* include/debug/set.h (swap): Likewise.
	* include/debug/multiset.h (swap): Likewise.
	* include/debug/unordered_map (swap): Likewise.
	* include/debug/unordered_set (swap): Likewise.
	* include/ext/vstring.h (swap): Likewise.
	* include/tr1_impl/unordered_map (swap): Likewise.
	* include/tr1_impl/hashtable (swap): Likewise.
	* include/tr1_impl/unordered_set (swap): Likewise.
	* include/std/tuple (swap): Likewise.
	* include/std/mutex (swap): Likewise.
	* include/std/thread (swap): Likewise.
	(operator<<): Only output to lvalue streams.
	* testsuite/20_util/shared_ptr/modifiers/swap_rvalue.cc: Remove.
	* testsuite/23_containers/headers/forward_list/synopsis.cc: Adjust.
	* testsuite/23_containers/deque/requirements/dr438/
	assign_neg.cc: Adjust line numbers.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	assign_neg.cc: Likewise.
	* 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.
	* testsuite/30_threads/thread/swap/1.cc: Swap with lvalue and also
	test non-member swap.
	* testsuite/30_threads/thread/swap/2.cc: Remove.

From-SVN: r147678
2009-05-18 23:15:56 +01:00
Jonathan Wakely 5c64575096 mutex: Move std::lock_error to ...
2009-05-13  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/std/mutex: Move std::lock_error to ...
	* src/compatibility.cc: Here.
	* src/mutex.cc: Likewise.
	* testsuite/30_threads/headers/mutex/types_std_c++0x.cc: Add checks
	for lock types and remove std::lock_error check.

From-SVN: r147609
2009-05-16 11:09:02 +01:00
Paolo Carlini 6dd0fec22f 40160.cc: Remove spurious double include.
2009-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/21_strings/basic_string/40160.cc: Remove spurious
	double include.

From-SVN: r147600
2009-05-15 23:31:59 +00:00
Paolo Carlini 0f136367bc re PR libstdc++/40160 (-fno-rtti vs _GLIBCXX_DEBUG)
2009-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40160
	* include/debug/formatter.h (_Parameter::_Parameter): Don't use
	typeid when __GXX_RTTI is undefined.
	* src/debug.cc (_Error_formatter::_Parameter::_M_print_field): Adjust
	for null _M_variant._M_iterator._M_type,
	_M_variant._M_iterator._M_seq_type, _M_variant._M_sequence._M_type.
	* testsuite/21_strings/basic_string/40160.cc: New.

From-SVN: r147599
2009-05-15 22:25:24 +00:00
Paolo Carlini 934432b66c num_xbound_fun.cc: Minor tweaks.
2009-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/26_numerics/random/discrete_distribution/cons/
	num_xbound_fun.cc: Minor tweaks.
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	cons/initlist_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_constant_distribution/
	cons/num_xbound_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	cons/initlist_fun.cc: Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/
	cons/num_xbound_fun.cc: Likewise

From-SVN: r147567
2009-05-15 10:02:38 +00:00
David Billinghurst 602feda58d re PR libstdc++/36211 (__iconv_adaptor chooses char** where const char** is required)
2009-05-15  David Billinghurst <billingd@gcc.gnu.org>

	PR libstdc++/36211
	* testsuite/lib/libstdc++.exp(v3_target_compile):  Add
	cxxldflags to additional_flags rather than cxx_final.

From-SVN: r147565
2009-05-15 09:23:58 +00:00
David Billinghurst d05db9ccfa num_xbound_fun.cc: Replace non-standard macro M_PI with constant pi.
2009-05-15  David Billinghurst <billingd@gcc.gnu.org>

	* testsuite/26_numerics/random/discrete_distribution/cons/num_xbound_fun.cc:
	Replace non-standard macro M_PI with constant pi.
	* testsuite/26_numerics/random/piecewise_constant_distribution/cons/initlist_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_constant_distribution/cons/num_xbound_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/cons/initlist_fun.cc:
	Likewise
	* testsuite/26_numerics/random/piecewise_linear_distribution/cons/num_xbound_fun.cc:
	Likewise

From-SVN: r147564
2009-05-15 09:20:01 +00:00
Paolo Carlini 6855fe452e re PR libstdc++/40123 (Revision 147395 failed libstc++ tests)
2009-05-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40123
	* random.tcc (independent_bits_engine<>::operator()()): Use
	result_type(1), not 1UL.

	* random.tcc (independent_bits_engine<>::operator()()): Use _M_b.max()
	and _M_b.min(), instead of this->max() and this->min().

	* random.h (_ShiftMin1): Remove, adjust everywhere.

	* random.tcc: Minor cosmetic changes.

From-SVN: r147538
2009-05-14 17:56:17 +00:00
Paolo Carlini e1a0296342 random.tcc (cauchy_distribution<>:: operator()(_UniformRandomNumberGenerator&, const param_type&)): Avoid M_PI, a glibc extension.
2009-05-14  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/random.tcc (cauchy_distribution<>::
	operator()(_UniformRandomNumberGenerator&, const param_type&)): 
	Avoid M_PI, a glibc extension.

From-SVN: r147521
2009-05-14 08:14:54 +00:00
Ben Elliston d68646978c Makefile.am (PCHFLAGS): Remove -Winvalid-pch.
* include/Makefile.am (PCHFLAGS): Remove -Winvalid-pch.
	* include/Makefile.in: Likewise.

From-SVN: r147459
2009-05-13 10:17:09 +10:00
Ben Elliston 420162073c compatibility.cc (_ZTIe, [...]): Change type to const void * const.
* src/compatibility.cc (_ZTIe, _ZTIPe, _ZTIPKe): Change type to
	const void * const.

From-SVN: r147455
2009-05-13 10:16:08 +10:00
Edward Smith-Rowland 1195342643 status_cxx200x.xml: Note missing constexpr for random number engines...
2009-05-12  Edward Smith-Rowland  <3dw4rd@verizon.net>

        * doc/xml/manual/status_cxx200x.xml: Note missing constexpr for
	random number engines, complex, bitset, array, time utilities, and
	char_traits.

From-SVN: r147449
2009-05-12 22:16:52 +00:00
Jonathan Wakely 182da14a62 exception: Include nested_exception.h in C++0x mode.
2009-05-12  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* libsupc++/exception: Include nested_exception.h in C++0x mode.
	* libsupc++/nested_exception.h: New.
	* libsupc++/Makefile.am: Add new header.
	* libsupc++/Makefile.in: Regenerate.
	* testsuite/18_support/nested_exception/rethrow_nested.cc: New.
	* testsuite/18_support/nested_exception/throw_with_nested.cc: New.
	* testsuite/18_support/nested_exception/cons.cc: New.
	* testsuite/18_support/nested_exception/nested_ptr.cc: New.
	* testsuite/18_support/nested_exception/rethrow_if_nested.cc: New.
	* doc/xml/manual/status_cxx200x.xml: Adjust.

From-SVN: r147446
2009-05-12 22:08:00 +01:00
Paolo Carlini 29e357fd7c throw_allocator.h: Remove redundante include.
2009-05-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/throw_allocator.h: Remove redundante include.

From-SVN: r147265
2009-05-08 00:49:35 +00:00
Paolo Carlini 9fcf9c24a1 throw_allocator.h (throw_allocator_base): Avoid out of line member functions definitions.
2009-05-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/throw_allocator.h (throw_allocator_base): Avoid
	out of line member functions definitions.
	(throw_allocator_base::_S_g, _S_map, _S_throw_prob, _S_label):
	Remove, use static locals instead.
	(throw_allocator_base::do_check_allocated, print_to_string): Declare.
	* src/throw_allocator.cc: New.
	* src/Makefile.am: Add.
	* config/abi/pre/gnu.ver: Add exports.
	* src/Makefile.in: Regenerate.

From-SVN: r147264
2009-05-08 00:39:28 +00:00
Paolo Carlini 262118b947 configure.ac: Bump libtool_VERSION to 6:12:0.
2009-05-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* configure.ac: Bump libtool_VERSION to 6:12:0.
	* configure: Regenerate.

From-SVN: r147228
2009-05-07 10:22:46 +00:00
Matthias Klose 76104d42a4 re PR libstdc++/40038 (symbols ceill@GLIBCXX_3.4.3 not exported)
2009-05-07  Matthias Klose  <doko@ubuntu.com>

	PR libstdc++/40038
	* src/math_stubs_long_double.cc: Add ceill.

From-SVN: r147217
2009-05-07 06:55:15 +00:00