Commit Graph

644 Commits

Author SHA1 Message Date
Jonathan Wakely ace4c2f060 PR65122 extended alignment support in allocators
PR libstdc++/65122
	* include/ext/malloc_allocator.h (malloc_allocator::allocate): Use
	aligned_alloc for types with extended alignment if available,
	otherwise throw bad_alloc if malloc doesn't return a suitable value.
	* include/ext/bitmap_allocator.h (bitmap_allocator::allocate)
	(bitmap_allocator::deallocate): Use aligned new/delete for types with
	extended alignment.
	* include/ext/mt_allocator.h (__mt_alloc::allocate)
	(__mt_alloc::deallocate): Likewise.
	* include/ext/new_allocator.h (new_allocator::allocate)
	(new_allocator::deallocate): Likewise.
	* include/ext/pool_allocator.h (__pool_alloc::allocate)
	(__pool_alloc::deallocate): Likewise.
	* testsuite/20_util/allocator/overaligned.cc: New test.
	* testsuite/ext/bitmap_allocator/overaligned.cc: New test.
	* testsuite/ext/malloc_allocator/overaligned.cc: New test.
	* testsuite/ext/mt_allocator/overaligned.cc: New test.
	* testsuite/ext/new_allocator/overaligned.cc: New test.
	* testsuite/ext/pool_allocator/overaligned.cc: New test.

From-SVN: r241158
2016-10-14 13:03:47 +01:00
Jonathan Wakely 1319041924 Avoid reallocation for basic_string::clear()
PR libstdc++/56166
	PR libstdc++/77582
	* include/bits/basic_string.h (basic_string::clear()): Drop reference
	and use empty rep.
	* include/ext/rc_string_base.h (__rc_string_base::_M_clear()):
	Likewise.
	* testsuite/21_strings/basic_string/56166.cc: New.
	* testsuite/ext/vstring/modifiers/clear/56166.cc: New.

From-SVN: r240447
2016-09-23 18:25:34 +01:00
Georeth Chow a837417c79 Fix missing qualification in <ext/rope>
2016-07-25  Georeth Chow  <georeth2010@gmail.com>

	* include/ext/ropeimpl.h (rope<>::_S_dump(_RopeRep*, int)): Qualify
	_S_concat enumerator.
	* testsuite/ext/rope/6.cc: New test.

From-SVN: r238711
2016-07-25 13:56:12 +01:00
Jonathan Wakely 4f5f9962c8 Replace references to C++0x with C++11 in comments
* include/bits/algorithmfwd.h: Change C++0x to C++11 in comments.
	* include/bits/move.h: Likewise.
	* include/bits/postypes.h: Likewise.
	* include/debug/bitset: Likewise.
	* include/ext/pb_ds/detail/type_utils.hpp: Likewise.
	* include/ext/string_conversions.h: Change C++0x to __cxx11 in
	comment.
	* testsuite/27_io/fpos/14320-1.cc: Change C++0x to C++11 in comment.
	* testsuite/util/thread/all.h: Likewise.

From-SVN: r238402
2016-07-15 21:23:08 +01:00
Jonathan Wakely 8dc1e574ae Avoid -Wsign-compare warnings in std::to_string()
* include/ext/string_conversions.h (__stoa): Avoid -Wsign-compare
        warnings.

From-SVN: r235151
2016-04-18 16:43:50 +01:00
Jason Merrill 9f285ccb77 Revert empty class parameter passing ABI changes.
From-SVN: r234977
2016-04-14 12:23:06 -04:00
Jonathan Wakely a6297ab587 Adjust for new empty class parameter passing ABI.
* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
	_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
	* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
	of functions taking empty structs by value. Add a template parameter
	to overloads without hints. Rename overloads with hints to
	_M_emplace_hint.
	(_Hashtable::_M_erase(true_type, const_iterator),
	_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
	by reordering parameters.
	* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
	_M_emplace_hint instead of _M_emplace.
	* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
	shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
	* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
	__shared_ptr): Likewise.
	* include/bits/stl_algo.h (replace_if): Likewise.
	* include/bits/stl_pair.h (piecewise_construct_t,
	piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
	* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
	__uses_alloc0): Likewise.
	* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
	* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
	* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
	* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.

From-SVN: r234964
2016-04-13 23:00:50 +01:00
Jonathan Wakely ab56cbed60 libstdc++/69406 Fix test to check for supported headers
PR libstdc++/69406
	* include/bits/cpp_type_traits.h: Ensure C++ language linkage.
	* include/ext/type_traits.h: Likewise.
	* testsuite/17_intro/headers/c++2011/linkage.cc: Check autoconf macros
	for presence of C headers.
	* testsuite/ext/type_traits/add_unsigned_floating_neg.cc: Adjust
	dg-error line number.
	* testsuite/ext/type_traits/add_unsigned_integer_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_floating_neg.cc: Likewise.
	* testsuite/ext/type_traits/remove_unsigned_integer_neg.cc: Likewise.

From-SVN: r232672
2016-01-21 13:33:27 +00:00
Steve Ellcey cebeb718fe random.tcc: Use __builtin_isfinite instead of std::isfinite.
2016-01-15  Steve Ellcey  <sellcey@imgtec.com>

	* include/ext/random.tcc: Use __builtin_isfinite instead of
	std::isfinite.

From-SVN: r232452
2016-01-15 22:26:02 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jonathan Wakely 6b4f890601 Improve generated libstdc++ API docs
* doc/doxygen/user.cfg.in: Use EXTENSION_MAPPING tag. Add new headers
	to INPUT. Remove obsolete XML_SCHEMA and XML_DTD tags. Update
	PREDEFINED macros. Set BRIEF_MEMBER_DESC for man-pages.
	* include/backward/strstream: Correct @file comment.
	* include/bits/forward_list.h: Improve Doxygen comments.
	* include/bits/locale_facets_nonio.h: Likewise.
	* include/bits/mutex.h: Likewise.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/debug/vector (_Safe_vector): Add @brief section to comment.
	* include/experimental/bits/fs_dir.h: Correct @file comment.
	* include/experimental/bits/fs_fwd.h: Likewise.
	* include/experimental/bits/fs_ops.h: Likewise.
	* include/experimental/bits/fs_path.h: Likewise.
	* include/experimental/bits/string_view.tcc: Likewise.
	* include/experimental/optional: Document experimental status.
	* include/experimental/string_view: Correct @file comment.
	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Reduce
	whitespace to avoid Doxygen bug.
	* include/std/bitset: Remove redundant @class Doxygen command. Add
	parentheses to avoid Doxygen bug.
	* include/std/mutex: Improve Doxygen comments.
	* include/tr2/dynamic_bitset: Add missing @param documentation.
	* scripts/run_doxygen: Rename man pages for std::experimental types.

From-SVN: r231512
2015-12-10 14:02:52 +00:00
Jonathan Wakely 356510acd9 PR libstdc++/68353 fix _GLIBCXX_USE_C99_WCHAR test
PR libstdc++/68353
	* include/bits/basic_string.h: Test value of _GLIBCXX_USE_C99_WCHAR
	not whether it is defined.
	* include/ext/vstring.h: Likewise.

From-SVN: r230395
2015-11-15 11:15:08 +00:00
Jennifer Yao 23c64853c8 More fine-grained autoconf checks for C99 library
2015-11-13  Jennifer Yao  <jenny.hyphen.fa@gmail.com>
	    Jonathan Wakely  <jwakely@redhat.com>

	PR libstdc++/58393
	PR libstdc++/61580
	* acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
	-std=c++11 as well as -std=c++98, and define separate macros for each.
	Cache the results of checking for complex math and wide character
	functions. Reformat for readability.
	* config.h.in: Regenerate.
	* include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
	either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
	language standard in use.
	* config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
	* config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
	* config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
	_GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
	* configure: Regenerate.
	* include/bits/basic_string.h: Make numeric conversion functions
	depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
	_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
	* include/ext/vstring.h: Likewise.
	* include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
	Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
	Likewise.
	* include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_MATH.
	* include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.
	* include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_WCHAR.
	* include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDLIB.
	* src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
	Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
	(test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stof.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoi.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stol.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stold.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoll.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoul.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	stoull.cc: Likewise.
	* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
	to_wstring.cc: Likewise.
	* testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
	Change preprocessor #if conditional so that it uses
	_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
	_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
	* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
	* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
	* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
	* testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise.
	* testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace
	_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
	* testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with
	_GLIBCXX_USE_C99_STDIO.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>

From-SVN: r230324
2015-11-13 14:51:25 +00:00
Nathan Froyd 141aa58b53 opt_random.h: Include pmmintrin.h instead of x86intrin.h, and only do so when __SSE3__
* config/cpu/i486/opt/bits/opt_random.h: Include pmmintrin.h instead
	of x86intrin.h, and only do so when __SSE3__
	* include/ext/random: Include emmintrin.h instead of x86intrin.h

From-SVN: r228786
2015-10-13 20:55:44 +00:00
Jonathan Wakely 783aa06e9b Use noexcept instead of _GLIBCXX_NOEXCEPT
* include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
	(basic_string::front() const, basic_string::back() const): Use
	noexcept instead of _GLIBCXX_NOEXCEPT macro.
	(__versa_string::front, __versa_string::back): Likewise.

From-SVN: r228434
2015-10-02 23:13:12 +01:00
Jonathan Wakely f14decafae Save-and-restore errno more carefully in libstdc++
* doc/xml/manual/diagnostics.xml: Document use of errno.
	* doc/html/*: Regenerate.
	* config/locale/generic/c_locale.cc (_Save_errno): New helper.
	(__convert_to_v): Use _Save_errno.
	* include/ext/string_conversions.h (__stoa): Only restore errno when
	it isn't set to non-zero.

From-SVN: r228328
2015-10-01 12:23:39 +01:00
Jonathan Wakely 6d60110654 Leave errno unchanged by successful std::stoi etc
* include/ext/string_conversions.h (__stoa): Save and restore errno.
	* testsuite/21_strings/basic_string/numeric_conversions/char/errno.cc:
	New.

From-SVN: r228249
2015-09-29 16:15:39 +01:00
Jonathan Wakely 7215aaedd6 Fix errors due to extra includes in extc++.h
* include/precompiled/extc++.h: Fix bootstrap error due to
	unconditional inclusion of <ext/enc_filebuf.h>.
	* include/ext/random: Check for definition of UINT32_C.

From-SVN: r227902
2015-09-18 12:21:05 +01:00
Jonathan Wakely 2f1e8e7c47 Enable lightweight checks with _GLIBCXX_ASSERTIONS.
* doc/xml/manual/using.xml (_GLIBCXX_ASSERTIONS): Document.
	* doc/html/manual/using_macros.html: Regenerate.
	* include/bits/c++config: Define _GLIBCXX_ASSERTIONS when
	_GLIBCXX_DEBUG is defined. Disable std::string extern templates when
	(_GLIBCXX_EXTERN_TEMPLATE, __glibcxx_assert): Depend on
	_GLIBCXX_ASSERTIONS instead of _GLIBCXX_DEBUG.
	* include/debug/debug.h [!_GLIBCXX_DEBUG]: Define
	__glibcxx_requires_non_empty_range and __glibcxx_requires_nonempty.
	* include/backward/auto_ptr.h (auto_ptr::operator*,
	auto_ptr::operator->): Replace _GLIBCXX_DEBUG_ASSERT with
	__glibcxx_assert.
	* include/bits/basic_string.h (basic_string::operator[],
	basic_string::front, basic_string::back, basic_string::pop_back):
	Likewise.
	* include/bits/random.h
	(uniform_int_distribution::param_type::param_type,
	uniform_real_distribution::param_type::param_type,
	normal_distribution::param_type::param_type,
	gamma_distribution::param_type::param_type,
	bernoulli_distribution::param_type::param_type,
	binomial_distribution::param_type::param_type,
	geometric_distribution::param_type::param_type,
	negative_binomial_distribution::param_type::param_type,
	poisson_distribution::param_type::param_type,
	exponential_distribution::param_type::param_type): Likewise.
	* include/bits/regex.h (match_results::operator[],
	match_results::prefix, match_results::suffix): Likewise.
	* include/bits/regex.tcc (format, regex_iterator::operator++):
	Likewise.
	* include/bits/regex_automaton.tcc (_StateSeq::_M_clone): Likewise.
	* include/bits/regex_compiler.tcc (_Compiler::_Compiler,
	_Compiler::_M_insert_character_class_matcher): Likewise.
	* include/bits/regex_executor.tcc (_Executor::_M_dfs): Likewise.
	* include/bits/regex_scanner.tcc (_Scanner::_M_advance,
	_Scanner::_M_scan_normal): Likewise.
	* include/bits/shared_ptr_base.h (__shared_ptr::_M_reset,
	__shared_ptr::operator*): Likewise.
	* include/bits/stl_iterator_base_funcs.h (__advance): Likewise.
	* include/bits/unique_ptr.h (unique_ptr::operator*,
	unique_ptr::operator[]): Likewise.
	* include/experimental/fs_path.h (path::path(string_type, _Type),
	path::iterator::operator++, path::iterator::operator--,
	path::iterator::operator*): Likewise.
	* include/experimental/string_view (basic_string_view::operator[],
	basic_string_view::front, basic_string_view::back,
	basic_string_view::remove_prefix): Likewise.
	* include/ext/random (beta_distribution::param_type::param_type,
	normal_mv_distribution::param_type::param_type,
	rice_distribution::param_type::param_type,
	pareto_distribution::param_type::param_type,
	k_distribution::param_type::param_type,
	arcsine_distribution::param_type::param_type,
	hoyt_distribution::param_type::param_type,
	triangular_distribution::param_type::param_type,
	von_mises_distribution::param_type::param_type,
	hypergeometric_distribution::param_type::param_type,
	logistic_distribution::param_type::param_type): Likewise.
	* include/ext/vstring.h (__versa_string::operator[]): Likewise.
	* include/std/complex (polar): Likewise.
	* include/std/mutex [!_GTHREAD_USE_MUTEX_TIMEDLOCK]
	(timed_mutex::~timed_mutex, timed_mutex::unlock,
	(recursive_timed_mutex::~timed_mutex, recursive_timed_mutex::unlock):
	Likewise.
	* include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
	(__shared_mutex_pthread::__shared_mutex_pthread,
	__shared_mutex_pthread::~__shared_mutex_pthread): Likewise.
	(__shared_mutex_pthread::lock, __shared_mutex_pthread::try_lock,
	__shared_mutex_pthread::unlock, __shared_mutex_pthread::lock_shared,
	__shared_mutex_pthread::try_lock_shared): Likewise.
	(__shared_mutex_cv::~__shared_mutex_cv, __shared_mutex_cv::unlock,
	__shared_mutex_cv::unlock_shared): Likewise.
	(shared_timed_mutex::try_lock_until,
	shared_timed_mutex::try_lock_shared_until): Likewise.
	* include/std/valarray (valarray::valarray(const _Tp*, size_t),
	valarray::operator=, valarray::sum, valarray::min, valarray::max,
	_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT, _DEFINE_BINARY_OPERATOR):
	Likewise.

From-SVN: r227595
2015-09-09 18:12:47 +01:00
Jonathan Wakely 4a88769c96 re PR libstdc++/65049 (Undefined behaviour with std::char_traits<char>)
PR libstdc++/65049
	* include/bits/char_traits.h (char_traits<char>::compare,
	char_traits<char>::find, char_traits<char>::move,
	char_traits<char>::copy, char_traits<char>::assign): Check for zero
	length.
	(char_traits<wchar_t>::compare, char_traits<wchar_t>::find,
	char_traits<wchar_t>::move, char_traits<wchar_t>::copy,
	char_traits<wchar_t>::assign): Likewise.
	(char_traits<char16_t>::move, char_traits<char16_t>::copy): Likewise.
	(char_traits<char32_t>::move, char_traits<char32_t>::copy): Likewise.
	* include/ext/pod_char_traits.h (char_traits<character<>>::move,
	char_traits<character<>>::copy): Likewise.
	* testsuite/21_strings/char_traits/requirements/char/65049.cc: New.
	* testsuite/21_strings/char_traits/requirements/char16_t/65049.cc:
	New.
	* testsuite/21_strings/char_traits/requirements/char32_t/65049.cc:
	New.
	* testsuite/21_strings/char_traits/requirements/wchar_t/65049.cc:
	New.

From-SVN: r227127
2015-08-24 14:43:54 +01:00
DJ Delorie 8161e0c343 functional_hash.h: Add specializations for __intN types.
* include/bits/functional_hash.h: Add specializations for __intN
types.

* include/ext/pb_ds/detail/thin_heap_/thin_heap_.hpp (__gnu_pbds):
Guard against values that might exceed size_t's precision.

From-SVN: r226117
2015-07-23 13:57:34 -04:00
Jonathan Wakely c5d9ec5670 c++config (_GLIBCXX_NOEXCEPT_IF): Define.
* include/bits/c++config (_GLIBCXX_NOEXCEPT_IF): Define.
	* include/bits/forward_list.h (forward_list::swap): Make noexcept
	unconditional.
	* include/bits/hashtable.h (_Hashtable::swap): Do not use
	_S_nothrow_swap().
	* include/bits/stl_bvector.h (vector<bool>::swap): Make noexcept
	unconditional.
	* include/bits/stl_deque.h (deque::swap): Likewise.
	(swap(deque&, deque&)): Use _GLIBCXX_NOEXCEPT_IF.
	* include/bits/stl_list.h (list::swap): Make noexcept unconditional.
	(swap(list&, list&)): Use _GLIBCXX_NOEXCEPT_IF.
	* include/bits/stl_map.h (map::swap, swap(map&, map&)): Use
	_GLIBCXX_NOEXCEPT_IF, do not depend on _S_nothrow_swap.
	* include/bits/stl_multimap.h (multimap::swap,
	swap(multimap&, multimap&)): Likewise.
	* include/bits/stl_multiset.h (multiset::swap,
	swap(multiset&, multiset&)): Likewise.
	* include/bits/stl_set.h (set::swap, swap(set&, set&)): Likewise.
	* include/bits/stl_tree.h (_Rb_tree::swap,
	swap(_Rb_tree&, _Rb_tree&)): Likewise.
	* include/bits/stl_vector.h (vector::swap): Make noexcept
	unconditional.
	(swap(vector&, vector&)): Use _GLIBCXX_NOEXCEPT_IF.
	* include/debug/deque (deque::swap, swap): Likewise.
	* include/debug/forward_list (swap): Add noexcept.
	* include/debug/list (list::swap, swap): Use _GLIBCXX_NOEXCEPT_IF.
	* include/debug/map.h (map::swap, swap): Likewise.
	* include/debug/multimap.h (multimap::swap, swap): Likewise.
	* include/debug/multiset.h (multiset::Swap, swap): Likewise.
	* include/debug/set.h (set::swap, swap): Likewise.
	* include/debug/unordered_map (unordered_map::swap,
	unordered_multimap::swap, swap): Likewise.
	* include/debug/unordered_set (unordered_set::swap,
	unordered_multiset::swap, swap): Likewise.
	* include/debug/vector (vector::swap, swap): Likewise.
	* include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()):
	Remove.
	* include/profile/deque (deque::swap, swap): Use _GLIBCXX_NOEXCEPT_IF.
	* include/profile/forward_list (swap): Add noexcept.
	* include/profile/list (list::swap, swap) : Use _GLIBCXX_NOEXCEPT_IF.
	* include/profile/map.h (map::swap, swap): Likewise.
	* include/profile/multimap.h (multimap::swap, swap): Likewise.
	* include/profile/multiset.h (multiset::swap, swap): Likewise.
	* include/profile/set.h (set::swap, swap): Likewise.
	* include/profile/unordered_map (swap): Likewise.
	* include/profile/unordered_set (swap): Likewise.
	* include/profile/vector (vector::swap, swap): Likewise. Remove
	overloads for swapping rvalues.
	* testsuite/23_containers/deque/allocator/noexcept.cc: Update tests
	for noexcept on swap.
	* testsuite/23_containers/forward_list/allocator/noexcept.cc:
	Likewise.
	* testsuite/23_containers/list/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/map/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/multimap/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/multiset/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/set/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/unordered_map/allocator/noexcept.cc:
	Likewise.
	* testsuite/23_containers/unordered_multimap/allocator/noexcept.cc:
	Likewise.
	* testsuite/23_containers/unordered_multiset/allocator/noexcept.cc:
	Likewise.
	* testsuite/23_containers/unordered_set/allocator/noexcept.cc:
	Likewise.
	* testsuite/23_containers/vector/allocator/noexcept.cc: Likewise.
	* testsuite/23_containers/vector/bool/allocator/noexcept.cc: Likewise.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line
	number.

From-SVN: r225744
2015-07-13 18:15:48 +01:00
Jonathan Wakely a2b5fdcbdb Implement N4258 (Cleaning-up noexcept in the Library rev 3)
* doc/xml/manual/intro.xml: Document LWG 2108 status.
	* include/bits/alloc_traits.h (allocator_traits::is_always_equal):
	Define.
	* include/bits/allocator.h (allocator::is_always_equal): Likewise.
	* include/bits/forward_list.h
	(forward_list::operator=(forward_list&&)): Use __bool_constant.
	(forward_list::swap(forward_list&)): Add noexcept.
	* include/bits/hashtable.h (_Hashtable::operator=(_Hashtable&&)):
	Likewise.
	(_Hashtable::swap(_Hashtable&)): Likewise.
	* include/bits/stl_deque.h (_Deque_base::_Deque_base(_Deque_base&&)):
	Use _Alloc_traits::is_always_equal.
	(deque::operator=(deque&&)): Likewise.
	(deque::_M_move_assign1(deque&&, false_type)): Add comment and use
	__bool_constant.
	(swap(deque&, deque&)): Add noexcept.
	* include/bits/stl_list.h (list::operator=(list&&)): Use
	__bool_constant.
	(swap(list&, list&)): Add noexcept.
	* include/bits/stl_map.h (map::swap(map&)): Include _Compare in
	noexcept.
	(swap(map&, map&)): Add noexcept.
	* include/bits/stl_multimap.h (multimap::swap(multimap&)): Include
	_Compare in noexcept.
	(swap(multimap&, multimap&)): Add noexcept.
	* include/bits/stl_multiset.h (multiset::swap(multiset&)): Include
	_Compare in noexcept.
	(swap(multiset&, multiset&)): Add noexcept.
	* include/bits/stl_set.h (set::swap(set&)): Include _Compare in
	noexcept.
	(swap(set&, set&)): Add noexcept.
	* include/bits/stl_tree.h (_Rb_tree::operator=(_Rb_tree&&)): Include
	_Compare in noexcept.
	(_Rb_tree::_Rb_tree(_Rb_tree&&, _Node_alloc_type&&)): Use
	is_always_equal.
	* include/bits/stl_vector.h (vector::operator=(vector&&)): Use
	__bool_constant.
	(swap(vector&, vector&)): Add noexcept.
	* include/bits/unordered_map.h (swap(unordered_map&, unordered_map&),
	swap(unordered_multimap& unordered_multimap&)): Add noexcept.
	* include/bits/unordered_set.h (swap(unordered_set&, unordered_set&),
	swap(unordered_multiset& unordered_multiset&)): Add noexcept.
	* include/ext/alloc_traits.h (__allocator_always_compares_equal):
	Remove.
	(__alloc_traits::_S_always_equal()): Use is_always_equal instead of
	__allocator_always_compares_equal.
	* include/ext/array_allocator.h (array_allocator::is_always_equal):
	Define.
	* include/std/scoped_allocator (__any_of, __propagate_on_copy,
	__propagate_on_move, __propagate_on_swap): Remove.
	(scoped_allocator_adaptor::propagate_on_container_copy_assignment,
	scoped_allocator_adaptor::propagate_on_container_move_assignment,
	scoped_allocator_adaptor::propagate_on_container_swap): Define with
	__and_ instead of __any_of.
	(scoped_allocator_adaptor::is_always_equal): Define.
	* testsuite/20_util/allocator_traits/members/is_always_equal.cc: New.
	* testsuite/20_util/scoped_allocator/propagation.cc: Make traits
	derive from true_type or false_type.
	* testsuite/23_containers/deque/allocator/move_assign-2.cc: Add
	is_always_equal member and remove the trait specialization.
	* testsuite/23_containers/vector/52591.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* 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/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.

From-SVN: r225081
2015-06-26 21:10:24 +01:00
Jonathan Wakely c92334d4c5 alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use __is_nothrow_swappable.
* include/ext/alloc_traits.h (__alloc_traits::_S_nothrow_swap()): Use
	__is_nothrow_swappable.

From-SVN: r224552
2015-06-17 11:51:46 +01:00
Ramana Radhakrishnan 57e6d9be77 Use atomics in guard.cc.
This provides proper definitions for _GLIBCXX_READ_MEM_BARRIER and
_GLIBCXX_WRITE_MEM_BARRIER, rewrites the guards in terms of proper
atomic extensions and removes internal uses of
_GLIBCXX_READ_MEM_BARRIER and _GLIBCXX_WRITE_MEM_BARRIER and replaces
them with equivalent atomics.

2015-06-12  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/66200
	PR c++/66192
	* * config/cpu/generic/atomic_word.h (_GLIBCXX_READ_MEM_BARRIER): Define
        (_GLIBCXX_WRITE_MEM_BARRIER): Likewise
        * include/bits/shared_ptr_base.h: Use ACQ_REL barrier.
        * include/ext/atomicity.h: Likewise.
        * include/tr1/shared_ptr.h: Likewise.
        * libsupc++/guard.cc (__test_and_acquire): Rewrite with atomics.
        Update comment.
        (__set_and_release): Likewise.
        * testsuite/20_util/shared_ptr/cons/43820_neg.cc (test01): Adjust for
	line numbers.
        * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
        * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
	Likewise.

From-SVN: r224411
2015-06-12 09:49:41 +00:00
Jonathan Wakely 2097b5b029 re PR libstdc++/66017 (Undefined behaviour in std::set<long long>)
PR libstdc++/66017
	* include/bits/stl_tree.h (_Rb_tree_node): Use __aligned_membuf.
	(_Rb_tree_iterator, _Rb_tree_const_iterator): Support construction
	from _Base_ptr.
	(_Rb_tree_const_iterator::_M_const_cast): Remove static_cast.
	(_Rb_tree::begin, _Rb_tree::end): Remove static_cast.
	* include/ext/aligned_buffer.h (__aligned_membuf): New type using
	alignment of _Tp as a member subobject, not as a complete object.
	* python/libstdcxx/v6/printers.py (StdRbtreeIteratorPrinter): Lookup
	_Link_type manually as it might not be in the debug info.

From-SVN: r223745
2015-05-27 12:18:37 +01:00
Jonathan Wakely df6d9c7f6a c++config (__gnu_cxx::__cxx11): Define new namespace.
* include/bits/c++config (__gnu_cxx::__cxx11): Define new namespace.
	* include/ext/codecvt_specializations.h (encoding_state,
	encoding_char_traits): Remove abi-tag and use inline namespace.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust dg-error line.

From-SVN: r221533
2015-03-20 13:26:55 +00:00
Jonathan Wakely 168ad5f5e3 re PR c++/65046 (-Wabi-tag doesn't warn about variables or function return types)
PR c++/65046
	* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs,
	get_catalogs): Add abi-tag.
	* include/ext/codecvt_specializations.h (encoding_state,
	encoding_char_traits): Likewise.
	* src/c++11/cxx11-ios_failure.cc (io_error_category): Likewise.
	* src/c++11/cxx11-shim_facets.cc (__any_string::operator basic_string,
	numpunct_shim, collate_shim, time_get_shim, moneypunct_shim,
	money_get_shim, money_put_shim, messages_shim): Likewise.
	* src/c++11/future.cc (future_error_category::message): Likewise.
	* src/c++11/system_error.cc (generic_error_category::message,
	system_error_category::message): Likewise.
	(__sso_string): Disable -Wabi-tag warnings.

From-SVN: r221497
2015-03-18 18:08:29 +00:00
Jonathan Wakely 85d44192f6 atomic_base.h: Use __always_inline__ instead of always_inline.
* include/bits/atomic_base.h: Use __always_inline__ instead of
	always_inline.
	* include/bits/atomic_futex.h: Likewise.
	* include/bits/c++config: Use __abi_tag__ instead of abi_tag.
	* include/ext/pb_ds/detail/gp_hash_table_map_/gp_ht_map_.hpp: Use
	__packed__ instead of packed.
	* include/std/shared_mutex: Use __unused__ instead of unused.
	* testsuite/17_intro/headers/c++1998/all_attributes.cc: New.
	* testsuite/17_intro/headers/c++200x/all_attributes.cc: New.
	* testsuite/17_intro/headers/c++2014/all_attributes.cc: New.

From-SVN: r220243
2015-01-29 12:47:20 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Jonathan Wakely 0f3d27f01a re PR libstdc++/64276 (would be better to use __cpp_exceptions rather than __EXCEPTIONS to determine whether exceptions are available)
PR libstdc++/64276
	* doc/doxygen/user.cfg.in: Define __cpp_exceptions and __cpp_rtti.
	* doc/html/manual/using_exceptions.html: Regenerate.
	* doc/xml/manual/using_exceptions.xml: Use SD-6 feature-testing
	macros, __cpp_exceptions and __cpp_rtti, instead of __EXCEPTIONS and
	__GXX_RTTI.
	* include/bits/c++config: Likewise.
	* include/bits/locale_classes.tcc: Likewise.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/shared_ptr_base.h: Likewise.
	* include/debug/formatter.h: Likewise.
	* include/experimental/any: Likewise.
	* include/ext/rope: Likewise.
	* include/ext/ropeimpl.h: Likewise.
	* include/std/functional: Likewise.
	* include/tr1/functional: Likewise.
	* include/tr1/shared_ptr.h: Likewise.
	* libsupc++/eh_call.cc: Likewise.
	* libsupc++/eh_personality.cc: Likewise.
	* libsupc++/exception_defines.h: Likewise.
	* libsupc++/exception_ptr.h: Likewise.
	* libsupc++/guard.cc: Likewise.
	* libsupc++/pbase_type_info.cc: Likewise.
	* libsupc++/pointer_type_info.cc: Likewise.
	* libsupc++/vterminate.cc: Likewise.
	* src/c++11/thread.cc: Likewise.

From-SVN: r218679
2014-12-12 15:58:49 +00:00
Jason Merrill 5f7282e2cb re PR c++/33911 (attribute deprecated vs. templates)
PR c++/33911
gcc/cp/
	* call.c (build_call_a): Don't warn_deprecated_use here.
	(build_over_call): Or here.
	* decl2.c (mark_used): Do it here.
	(is_late_template_attribute): Attribute deprecated is not deferred.
	(cplus_decl_attributes): Propagate TREE_DEPRECATED out to the template.
	* parser.c (cp_parser_template_name): Warn about deprecated template.
	(cp_parser_template_argument): Likewise.
libstdc++-v3/
	* include/backward/binders.h: Suppress -Wdeprecated-declarations.
	* include/ext/array_allocator.h: Likewise.

From-SVN: r217677
2014-11-17 17:09:27 -05:00
Jonathan Wakely 9b81754858 Make streams movable and swappable.
PR libstdc++/54316
	PR libstdc++/53626
	* config/abi/pre/gnu.ver: Add new exports.
	* config/io/basic_file_stdio.h (__basic_file): Support moving and
	swapping.
	* include/bits/basic_ios.h (basic_ios::move, basic_ios::swap):
	Likewise.
	* include/bits/ios_base.h (ios_base::_M_move, ios_base::_M_swap):
	Likewise.
	* include/bits/fstream.tcc (basic_filebuf): Likewise.
	* include/bits/move.h (__exchange): Define for C++11 mode.
	* include/ext/stdio_filebuf.h (stdio_filebuf): Support moving and
	swapping.
	* include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf): Likewise.
	* include/std/fstream (basic_filebuf, basic_ifstream, basic_ofstream,
	basic_fstream): Likewise.
	* include/std/ios: Remove whitespace.
	* include/std/istream (basic_istream, basic_iostream): Support moving
	and swapping.
	* include/std/ostream (basic_ostream): Likewise.
	* include/std/sstream (basic_stringbuf, basic_istringstream,
	basic_ostringstream, basic_stringstream): Likewise.
	* include/std/streambuf (basic_streambuf): Do not default copy
	constructor and assignment on first declaration.
	* include/std/utility (exchange): Forward to __exchange.
	* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
	* src/c++11/Makefile.am: Add stream-related files.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++11/ext11-inst.cc (stdio_filebuf, stdio_sync_filebuf):
	New file for explicit instantiation definitions.
	* src/c++11/ios.cc: Move from src/c++98 to here.
	(ios_base::_M_move, ios_base::_M_swap): Define.
	* src/c++11/ios-inst.cc: Move from src/c++98 to here.
	* src/c++11/iostream-inst.cc: Likewise.
	* src/c++11/istream-inst.cc: Likewise.
	* src/c++11/ostream-inst.cc: Likewise.
	* src/c++11/sstream-inst.cc: Likewise.
	* src/c++11/streambuf-inst.cc: Likewise.
	* src/c++98/Makefile.am: Remove stream-related files.
	* src/c++98/Makefile.in: Regenerate.
	* src/c++98/ext-inst.cc (stdio_filebuf): Remove explicit
	instantiations.
	* src/c++98/misc-inst.cc (stdio_sync_filebuf): Likewise.
	* src/c++98/ios-inst.cc: Move to src/c++11/.
	* src/c++98/ios.cc: Move to src/c++11/.
	* src/c++98/iostream-inst.cc: Likewise.
	* src/c++98/istream-inst.cc: Likewise.
	* src/c++98/ostream-inst.cc: Likewise.
	* src/c++98/sstream-inst.cc: Likewise.
	* src/c++98/streambuf-inst.cc: Likewise.
	* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
	* testsuite/27_io/basic_fstream/cons/move.cc: New.
	* testsuite/27_io/basic_fstream/assign/1.cc: New.
	* testsuite/27_io/basic_ifstream/cons/move.cc: New.
	* testsuite/27_io/basic_ifstream/assign/1.cc: New.
	* testsuite/27_io/basic_istringstream/assign/1.cc: New.
	* testsuite/27_io/basic_istringstream/cons/move.cc: New.
	* testsuite/27_io/basic_ofstream/cons/move.cc: New.
	* testsuite/27_io/basic_ofstream/assign/1.cc: New.
	* testsuite/27_io/basic_ostringstream/assign/1.cc: New.
	* testsuite/27_io/basic_ostringstream/cons/move.cc: New.
	* testsuite/27_io/basic_stringstream/assign/1.cc: New.
	* testsuite/27_io/basic_stringstream/cons/move.cc: New.

From-SVN: r215463
2014-09-22 14:34:09 +01:00
Paolo Carlini 429e4fdebf 2014-08-13 Paolo Carlini <paolo.carlini@oracle.com>
* Fix thinko in the last commit.

From-SVN: r213908
2014-08-13 11:56:45 +00:00
Paolo Carlini a3ee88517c re PR libstdc++/62118 (cases under libstdc++-v3/testsuite/ext/ failed on aarch64/arm)
2014-08-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/62118
	* include/ext/random.tcc (uniform_on_sphere_helper<2, _RealType>::
	operator()): Use std::hypot only when _GLIBCXX_USE_C99_MATH_TR1.

From-SVN: r213906
2014-08-13 11:24:35 +00:00
Ulrich Drepper 83a4216dd2 random.tcc (uniform_on_sphere_helper): Define.
* include/ext/random.tcc (uniform_on_sphere_helper): Define.
        (uniform_on_sphere_distribution::operator()): Use the new helper
        class for the implementation.

        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        equal.cc: Remove bogus part of comment.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        inequal.cc: Likewise.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        serialize.cc: Add check to verify result of serialzation and
        deserialization.
        * testsuite/ext/random/uniform_on_sphere_distribution/operators/
        generate.cc: New file.

From-SVN: r213779
2014-08-09 17:56:57 +00:00
Paolo Carlini 6a6bdc3d09 invoke.texi ([Wnarrowing]): Update for non-constants in C++11.
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* doc/invoke.texi ([Wnarrowing]): Update for non-constants in C++11.

gcc/cp
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck2.c (check_narrowing): Add tsubst_flags_t parameter, change
	return type to bool; in C++11 for constants give errors, not pedwarns.
	* cp-tree.h (check_narrowing): Adjust declaration.
	* call.c (convert_like_real): Update calls.
	* semantics.c (finish_compound_literal): Likewise.

gcc/testsuite
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/cpp0x/Wnarrowing1.C: Adjust for errors.
	* g++.dg/cpp0x/enum29.C: Adjust.

/libstdc++-v3
2014-08-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pod_char_traits.h (char_traits<__gnu_cxx::
	character<_Value, _Int, _St> >::eof): Fix vs narrowing conversion.

From-SVN: r213776
2014-08-09 08:58:33 +00:00
Jonathan Wakely aec20dcf39 re PR libstdc++/61946 (rope construction, passing allocator referenct without const)
PR libstdc++/61946
	* include/ext/rope (rope::rope(char_producer<_CharT>*, size_t, bool,
	const allocator_type&)): Pass non-const allocator to
	_S_new_RopeFunction.
	* testsuite/ext/rope/61946.cc: New.

From-SVN: r213220
2014-07-29 18:30:25 +01:00
Ed Smith-Rowland 1c4ff014fe PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
2014-07-29  Ed Smith-Rowland  <3dw4rd@verizon.net>

	PR libstdc++/60037 - SIGFPE in std::generate_canonical<unsigned int...>
	* include/bits/random.h (_Adaptor): static_assert for non floating-point
	result type.
	* include/bits/random.tcc (generate_canonical): Ditto.
	* include/ext/random.tcc (hypergeometric_distribution::operator()):
	Use double as a rng result type.
	* testsuite/26_numerics/random/pr60037-neg.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/pr60037.cc: New.

From-SVN: r213207
2014-07-29 14:56:45 +00:00
Paolo Carlini 026ae646e7 random: Minor formatting and cosmetic tweaks.
2014-07-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/random: Minor formatting and cosmetic tweaks.
	(uniform_on_sphere_distribution<>::operator==
	(const uniform_on_sphere_distribution&,
	const uniform_on_sphere_distribution&)): Compare the _M_nds.
	(uniform_on_sphere_distribution<>::reset): Reset _M_nd.
	(operator!=(const uniform_on_sphere_distribution&,
	const uniform_on_sphere_distribution&)): Adjust.
	* include/ext/random.tcc: Minor cosmetc tweaks.

From-SVN: r212674
2014-07-16 15:47:26 +00:00
Ulrich Drepper b40d9361f9 random.tcc: Unfortunately more fixes for operator>> and operator<< for...
* include/ext/random.tcc: Unfortunately more fixes for
	operator>> and operator<< for uniform_on_sphere_distribution.

From-SVN: r212517
2014-07-14 12:09:30 +00:00
Ulrich Drepper 5c8efaf2fb random.tcc: Fix operator>> and operator<< for uniform_on_sphere_distribution.
* include/ext/random.tcc: Fix operator>> and operator<< for
	uniform_on_sphere_distribution.

From-SVN: r212496
2014-07-13 16:43:01 +00:00
Ulrich Drepper 863a2c7ecc random: Add uniform_on_sphere_distribution definition.
2014-07-12  Ulrich Drepper  <drepper@gmail.com>

	* include/ext/random: Add uniform_on_sphere_distribution definition.
	* include/ext/random.tcc: Add out-of-band member function definitions
	for uniform_on_sphere_distribution.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	cons/default.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/equal.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/inequal.cc: New file.
	* testsuite/ext/random/uniform_on_sphere_distribution/
	operators/serialize.cc: New file.

From-SVN: r212492
2014-07-13 11:07:44 +00:00
Edward Smith-Rowland 8daac7749f Add the logistic_distribution as an extension.
2014-07-11  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Add the logistic_distribution as an extension.
	* include/ext/random: Add the logistic_distribution.
	* include/ext/random.tcc: Add the logistic_distribution.
	* testsuite/ext/random/logistic_distribution/cons/parms.cc: New.
	* testsuite/ext/random/logistic_distribution/cons/default.cc: New.
	* testsuite/ext/random/logistic_distribution/requirements/typedefs.cc:
	New.
	* testsuite/ext/random/logistic_distribution/operators/inequal.cc: New.
	* testsuite/ext/random/logistic_distribution/operators/equal.cc: New.
	* testsuite/ext/random/logistic_distribution/operators/serialize.cc:
	New.

From-SVN: r212476
2014-07-12 01:32:20 +00:00
Jonathan Wakely 484dc5996f alloc_traits.h (__alloc_rebind): Define alias template.
* include/bits/alloc_traits.h (__alloc_rebind): Define alias template.
	* include/bits/forward_list.h (_Fwd_list_base): Use __alloc_rebind.
	* include/bits/hashtable_policy.h (_Insert_base, _Hashtable_alloc):
	Likewise.
	* include/ext/alloc_traits.h: Fix comment.

From-SVN: r211995
2014-06-25 21:54:34 +01:00
Jonathan Wakely 3fa591d4b4 functexcept.h (__throw_out_of_range_fmt): Change attribute to __gnu_printf__ archetype to prevent warnings for "%zu".
* include/bits/functexcept.h (__throw_out_of_range_fmt): Change
	attribute to __gnu_printf__ archetype to prevent warnings for "%zu".
	* include/bits/locale_facets_nonio.tcc (time_get::do_get_weekday):
	Remove unused typedef.
	(time_get::do_get_monthname): Likewise.
	* include/bits/stl_tree.h: Add system_header pragma.
	* include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf::file): Remove
	redundant const-qualifier.
	* include/std/complex (complex::__rep): Use _GLIBCXX_CONSTEXPR macro
	instead of _GLIBCXX_USE_CONSTEXPR.

From-SVN: r211951
2014-06-24 16:44:17 +01:00
Jonathan Wakely 10d43d2fb4 api.xml: Link to more recent API docs.
* doc/xml/api.xml: Link to more recent API docs.
	* include/bits/allocator.h: Fix link in doxygen comment.
	* include/bits/char_traits.h: Likewise.
	* include/bits/ios_base.h: Likewise.
	* include/bits/stl_map.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_set.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/ext/mt_allocator.h: Likewise.
	* include/std/fstream: Likewise.
	* include/std/iosfwd: Likewise.
	* include/std/ostream: Likewise.
	* include/std/sstream: Likewise.
	* include/std/streambuf: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r211671
2014-06-14 21:22:10 +01:00
Jonathan Wakely e8043fa674 status_cxx2014.xml: Update Fundamentals TS status.
* doc/xml/manual/status_cxx2014.xml: Update Fundamentals TS status.
	* include/Makefile.am: Add new header.
	* include/Makefile.in: Regenerate.
	* include/experimental/any: New.
	* include/ext/aligned_buffer.h (__aligned_buffer(nullptr_t)): New
	constructor.
	* testsuite/experimental/any/assign/1.cc: New.
	* testsuite/experimental/any/assign/2.cc: New.
	* testsuite/experimental/any/cons/1.cc: New.
	* testsuite/experimental/any/cons/2.cc: New.
	* testsuite/experimental/any/cons/3.cc: New.
	* testsuite/experimental/any/misc/any_cast.cc: New.
	* testsuite/experimental/any/misc/any_cast_neg.cc: New.
	* testsuite/experimental/any/misc/any_cast_no_rtti.cc: New.
	* testsuite/experimental/any/misc/swap.cc: New.
	* testsuite/experimental/any/modifiers/1.cc: New.
	* testsuite/experimental/any/observers/type.cc: New.

From-SVN: r211669
2014-06-14 17:00:56 +01:00
Jonathan Wakely 060269c481 re PR libstdc++/61390 (error in nested template parameter in ext/pb_ds header file)
PR libstdc++/61390
	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp
	(bin_search_tree_traits): Do not redeclare template-parameters.
	* testsuite/util/testsuite_iterators.h (test_container): Likewise.

From-SVN: r211421
2014-06-10 19:09:18 +01:00
Jonathan Wakely d530142ddb re PR libstdc++/21609 (array_allocator vs rebind & templated constructor)
PR libstdc++/21609
	* include/ext/array_allocator.h: Add deprecated attribute.

From-SVN: r207280
2014-01-29 20:43:44 +00:00
Jonathan Wakely 200674232e alloc_traits.h (allocator_traits::_S_allocate): Do not use varargs when argument could be non-POD.
* include/bits/alloc_traits.h (allocator_traits::_S_allocate): Do
	not use varargs when argument could be non-POD.
	(__alloctr_rebind_helper): Eliminate static const bool member by
	using true_type and false_type.
	(allocator_traits::__allocate_helper): Likewise.
	(allocator_traits::__construct_helper): Likewise.
	(allocator_traits::__destroy_helper): Likewise.
	(allocator_traits::__maxsize_helper): Likewise.
	(allocator_traits::__select_helper): Likewise.
	* include/bits/ptr_traits.h (__ptrtr_rebind_helper): Likewise.
	* include/bits/stl_tree.h (_Rb_tree::operator=(const _Rb_tree&)):
	Remove redundant condition.
	* include/bits/stl_vector.h (vector::operator=(const vector&)):
	Likewise.
	(_Vector_impl::_M_allocate, _Vector_impl::_M_deallocate): Use
	indirection through __alloc_traits.
	* include/ext/alloc_traits.h (__allocator_always_compares_equal):
	Eliminate static const bool members by using true_type and false_type.
	(__gnu_cxx::__alloc_traits::__is_custom_pointer): Optimize.
	* testsuite/util/testsuite_allocator.h (PointerBase): Define.
	* testsuite/20_util/allocator_traits/members/allocate_hint_nonpod.cc:
	New.
	* testsuite/20_util/allocator_traits/requirements/typedefs2.cc: New.

From-SVN: r207240
2014-01-29 14:57:35 +00:00
Richard Sandiford aa118a03c4 Update copyright years in libstdc++-v3/
From-SVN: r206301
2014-01-02 22:30:10 +00:00
Jonathan Wakely 237c8b9d2f re PR libstdc++/59247 (Bootstrap fails due to errors in libstdc++ sources with `--enable-symvers=gnu-versioned-namespace')
PR libstdc++/59247
	* include/bits/c++config (_GLIBCXX_INLINE_VERSION): Declare namespace
	std::experimental::__7 as inline.
	* include/bits/regex.h (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Do not
	enclose namespace __detail.
	* include/bits/regex.tcc (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Likewise.
	* include/std/iomanip (_GLIBCXX_BEGIN_NAMESPACE_VERSION): Likewise.
	* include/ext/pb_ds/tag_and_trait.hpp (detail): Fix comment.
	* testsuite/ext/profile/mutex_extensions_neg.cc: Adjust line number.

From-SVN: r205277
2013-11-22 16:59:25 +00:00
Edward Smith-Rowland d2ae7b11b5 Implement __gnu_cxx::hypergeometric_distribution.
2013-11-21  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement __gnu_cxx::hypergeometric_distribution.
	* include/ext/random: Add hypergeometric_distribution.
	* include/ext/random.tcc: Add hypergeometric_distribution.
	* testsuite/util/testsuite_random.h (hypergeometric_pdf): New pdf
	for the hypergeometric discreet distribution;
	(lbincoef): New supporting function for binomial coefficients.
	* testsuite/ext/random/hypergeometric_distribution/operators/
	serialize.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/operators/
	equal.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/operators/
	inequal.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/operators/
	values.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/cons/parms.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/cons/default.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/requirements/
	explicit_instantiation/1.cc: New.
	* testsuite/ext/random/hypergeometric_distribution/requirements/
	typedefs.cc: New.

From-SVN: r205212
2013-11-21 12:27:02 +00:00
Jonathan Wakely f8c370af2c re PR c++/59173 (Alias template in partial specialization finds name from primary template)
PR c++/59173
	* include/ext/pointer.h (pointer_traits<>::rebind<>): Add template
	keyword in nested name.

From-SVN: r205114
2013-11-20 13:39:33 +00:00
Ondřej Bílka 64e1ab1168 build_hacking.xml: Fix documentation typos.
2013-11-15  Ondřej Bílka <neleai@seznam.cz>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	* doc/xml/manual/build_hacking.xml: Fix documentation typos.
	* doc/xml/manual/configure.xml: Likewise.
	* include/bits/atomic_base.h: Fix typos in comments.
	* include/bits/random.h: Likewise.
	* include/ext/cast.h: Likewise.
	* libsupc++/cxxabi.h: Likewise.
	* testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Likewise.
	* testsuite/tr1/5_numerical_facilities/special_functions/testcase.h:
	Likewise.
	* testsuite/util/exception/safety.h: Likewise.
	* testsuite/util/testsuite_containers.h: Likewise.
	* testsuite/util/testsuite_hooks.cc: Likewise.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r204850
2013-11-15 16:33:59 +00:00
Marc Glisse b62c62f4b0 re PR libstdc++/59087 (Issues including complex.h in C++11/1y mode because of C's complex.h)
2013-11-13  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/59087
	* include/ext/pod_char_traits.h: Uglify V, I and S.

From-SVN: r204750
2013-11-13 15:47:04 +00:00
Paul Pluzhnikov 9779c871af Print additional info when various out-of-range conditions are detected.
2013-09-21  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* include/bits/functexcept.h (__throw_out_of_range_fmt): New.
	* src/c++11/functexcept.cc (__throw_out_of_range_fmt): New.
	* src/c++11/snprintf_lite.cc: New.
	* src/c++11/Makefile.am: Add snprintf_lite.cc.
	* src/c++11/Makefile.in: Regenerate.
	* config/abi/pre/gnu.ver: Add _ZSt24__throw_out_of_range_fmtPKcz.
	* include/std/array (at): Use __throw_out_of_range_fmt.
	* include/debug/array (at): Likewise.
	* include/profile/array (at): Likewise.
	* include/std/bitset (_M_check_initial_position, _M_check): New.
	(bitset::bitset): Use _M_check_initial_position.
	(set, reset, flip, test): Use _M_check.
	* include/ext/vstring.h (_M_check, at): Use __throw_out_of_range_fmt.
	* include/bits/stl_vector.h (_M_range_check): Likewise.
	* include/bits/stl_bvector.h (_M_range_check): Likewise.
	* include/bits/stl_deque.h (_M_range_check): Likewise.
	* include/bits/basic_string.h (_M_check, at): Likewise.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc: Adjust.
	* testsuite/23_containers/vector/requirements/dr438/insert_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/deque/requirements/dr438/assign_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/insert_neg.cc: Likewise.
	* 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/array/tuple_interface/tuple_element_neg.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc:
	Likewise.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Likewise.
	* testsuite/23_containers/array/tuple_interface/get_debug_neg.cc: Likewise.
	* testsuite/util/exception/safety.h (generate): Use __throw_out_of_range_fmt.

From-SVN: r202818
2013-09-21 19:04:13 -07:00
Marc Glisse 0e1a966a86 re PR libstdc++/58338 (Add noexcept to functions with a narrow contract)
2013-09-19  Marc Glisse  <marc.glisse@inria.fr>

	PR libstdc++/58338
	* include/bits/stl_tree.h (_Rb_tree_node_base) [_S_minimum, _S_maximum]:
	Mark as noexcept.
	(_Rb_tree_iterator) [_Rb_tree_iterator, operator*, operator->,
	operator++, operator--, operator==, operator!=]: Likewise.
	(_Rb_tree_const_iterator) [_Rb_tree_const_iterator, _M_const_cast,
	operator*, operator->, operator++, operator--, operator==, operator!=]:
	Likewise.
	(operator==(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&),
	operator!=(const _Rb_tree_iterator&, const _Rb_tree_const_iterator&)):
	Likewise.
	(_Rb_tree) [_M_put_node, _M_destroy_node, _M_root, _M_leftmost,
	_M_rightmost, _M_begin, _M_end, _S_left, _S_right, _S_minimum,
	_S_maximum]: Likewise.
	* include/debug/string (basic_string) [basic_string(const _Allocator&),
	shrink_to_fit, operator[], pop_back]: Likewise.
	* include/ext/vstring.h (__versa_string) [_M_limit, _M_disjunct,
	_M_ibegin, _M_iend, __versa_string(const _Alloc&),
	operator=(__versa_string&&), shrink_to_fit, operator[], front,
	back, assign(__versa_string&&), swap]: Likewise.
	(__versa_string) [__versa_string(), __versa_string(const _Alloc&)]:
	Merge.

From-SVN: r202737
2013-09-19 11:40:29 +00:00
Paolo Carlini 4f03875418 re PR libstdc++/58415 (__sso_string_base move constructor does not null terminate local data when moving from empty string)
2013-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/58415
	* include/ext/sso_string_base.h (__sso_string_base<>::
	__sso_string_base(__sso_string_base&&)): Fix thinkos about
	_M_length vs _M_set_length.
	* testsuite/ext/vstring/cons/58415-1.cc: New.
	* testsuite/ext/vstring/cons/58415-2.cc: Likewise.

From-SVN: r202574
2013-09-13 18:32:42 +00:00
Paolo Carlini 56b5d3b48b re PR libstdc++/58163 ([C++11] Pedantic assert on str[str.size()] is wrong in C++11)
2013-08-14  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/58163
	* include/bits/basic_string.h (basic_string<>::operator[]): Fix
	_GLIBCXX_DEBUG_PEDASSERT check vs C++11.
	* include/ext/vstring.h: Likewise.
	* testsuite/21_strings/basic_string/element_access/char/58163.cc:
	New.
	* testsuite/21_strings/basic_string/element_access/wchar_t/58163.cc:
	Likewise.
	* testsuite/ext/vstring/element_access/char/58163.cc: Likewise.
	* testsuite/ext/vstring/element_access/wchar_t/58163.cc: Likewise.

From-SVN: r201755
2013-08-15 00:15:12 +00:00
Paolo Carlini aeb1f2be12 atomicity.h: Add #pragma GCC system_header.
2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/atomicity.h: Add #pragma GCC system_header.

From-SVN: r201567
2013-08-07 14:26:15 +00:00
Paolo Carlini a803975d9c re PR libstdc++/58098 (wrong return value of normal_distribution::min())
2013-08-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/58098
	* include/bits/random.h (cauchy_distribution<>::min,
	extreme_value_distribution<>::min, normal_distribution<>::min,
	student_t_distribution<>::min): Fix.
	* include/ext/random (normal_mv_distribution<>::min): Likewise.
	* testsuite/26_numerics/random/cauchy_distribution/cons/parms.cc:
	Adjust.
	testsuite/26_numerics/random/cauchy_distribution/cons/default.cc:
	Likewise.
	* testsuite/26_numerics/random/extreme_value_distribution/cons/
	parms.cc: Likewise.
	testsuite/26_numerics/random/extreme_value_distribution/cons/
	default.cc: Likewise.
	* testsuite/26_numerics/random/normal_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/normal_distribution/cons/default.cc:
	Likewise.
	* testsuite/26_numerics/random/student_t_distribution/cons/parms.cc:
	Likewise.
	* testsuite/26_numerics/random/student_t_distribution/cons/default.cc:
	Likewise.
	* testsuite/ext/random/normal_mv_distribution/cons/parms.cc: Likewise.
	* testsuite/ext/random/normal_mv_distribution/cons/default.cc: Likewise.

	* testsuite/26_numerics/random/exponential_distribution/cons/parms.cc:
	Minor tweak.
	* testsuite/26_numerics/random/exponential_distribution/cons/default.cc:
	Likewise.

	* testsuite/ext/von_mises_distribution/*: Move to...
	* testsuite/ext/random/von_mises_distribution/*: ... here.
	* testsuite/ext/triangular_distribution/*: Move to...
	* testsuite/ext/random/triangular_distribution/*: ... here.

From-SVN: r201562
2013-08-07 11:41:30 +00:00
Paolo Carlini 019fdb7923 stl_list.h (list<>::insert(iterator, size_type, const value_type&), [...]): Adjust C++11 signatures to take const_iterator(s).
2013-07-01  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_list.h (list<>::insert(iterator,
	size_type, const value_type&), list<>::insert(iterator,
	initializer_list<>), list<>::insert(iterator, _InputIterator,
	_InputIterator), list<>::splice(iterator, list&&),
	list<>::splice(iterator, list&), list<>::splice(iterator, list&&,
	iterator), list<>::splice(iterator, list&, iterator),
	list<>::splice(iterator, list&&, iterator, iterator),
	list<>::splice(iterator, list&, iterator, iterator)): Adjust C++11
	signatures to take const_iterator(s).
	* include/bits/list.tcc (list<>::insert(const_iterator, size_type,
	const value_type&), list<>::insert(const_iterator, _InputIterator,
	_InputIterator)): Define.
	* include/ext/vstring.h (__versa_string<>::insert(iterator,
	size_type, _CharT), __versa_string<>::insert(iterator,
	_InputIterator, _InputIterator), __versa_string<>::insert(iterator,
	std::initializer_list<>), __versa_string<>::replace(iterator,
	iterator, _InputIterator, _InputIterator), __versa_string<>::
	replace(iterator, iterator, std::initializer_list<>)): Adjust C++11
	signatures to take const_iterator(s).
	(__versa_string<>::_M_replace_dispatch): Take const_iterators.
	* include/ext/vstring.tcc: Likewise.
	* include/debug/list: Adjust.
	* include/profile/list: Likewise.
	* testsuite/23_containers/list/operations/splice/const_iterator.cc:
	New.
	* testsuite/23_containers/list/modifiers/insert/const_iterator.cc:
	Extend.
	* testsuite/ext/vstring/modifiers/insert/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/insert/wchar_t/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/wchar_t/const_iterator.cc:
	Likewise.

	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* 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.

From-SVN: r200580
2013-07-01 16:17:46 +00:00
Paolo Carlini 7b61c5a9cb stl_deque.h (deque<>::insert(iterator, const value_type&), [...]): Adjust C++11 signatures to take a const_iterator.
2013-06-27  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/stl_deque.h (deque<>::insert(iterator,
	const value_type&), deque<>::insert(iterator, value_type&&),
	deque<>::emplace(iterator, _Args&&...)): Adjust C++11 signatures to
	take a const_iterator.
	(deque<>::erase): Simplify.
	* include/bits/stl_list.h: Likewise.
	(_List_iterator<>::_M_const_cast): Add.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	(_Bit_iterator::_M_const_cast): Add.
	* include/bits/deque.tcc: Adjust definitions.
	* include/bits/list.tcc: Likewise.
	* include/bits/vector.tcc: Likewise.
	* include/bits/stl_iterator.h (__normal_iterator<>::_M_const_cast):
	Define trivial version in C++98 mode.
	* include/ext/vstring.h (__versa_string<>::insert(iterator, _CharT),
	__versa_string<>::replace(iterator, iterator, const __versa_string&),
	__versa_string<>::replace(iterator, iterator, const _CharT*,
	size_type), __versa_string<>::replace(iterator, iterator,
	const _CharT*), __versa_string<>::replace(iterator, iterator,
	size_type, _CharT)): Adjust C++11 signatures to take a pair of
	const_iterators.
	* include/debug/deque: Adjust.
	* include/debug/list: Likewise.
	* include/debug/vector: Likewise.
	* include/profile/deque: Likewise.
	* include/profile/list: Likewise.
	* include/profile/vector: Likewise.
	(vector<>::emplace): Add.
	* testsuite/util/exception/safety.h: Update.
	* testsuite/23_containers/deque/modifiers/emplace/const_iterator.cc:
	New.
	* testsuite/23_containers/deque/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/list/modifiers/emplace/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/list/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/modifiers/insert/
	const_iterator.cc: Likewise.
	* testsuite/23_containers/vector/modifiers/emplace/const_iterator.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/insert/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/insert/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/insert/wchar_t/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/char/const_iterator.cc:
	Likewise.
	* testsuite/ext/vstring/modifiers/replace/wchar_t/const_iterator.cc:
	Likewise.

	* testsuite/ext/vstring/modifiers/char/54577.cc: Move to testsuite/
	ext/vstring/modifiers/erase/char/.
	* testsuite/ext/vstring/modifiers/wchar_t/54577.cc: Move to testsuite/
	ext/vstring/modifiers/wchar_t/.
	* testsuite/ext/vstring/modifiers/char/pop_back.cc: Move to testsuite/
	ext/vstring/modifiers/pop_back/char/.
	* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: Move to
	testsuite/ext/vstring/modifiers/pop_back/wchar_t/.

	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Adjust dg-error line number.
	* 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.

From-SVN: r200458
2013-06-27 09:51:21 +00:00
Paolo Carlini 9797bec939 type_traits.h (__is_null_pointer): Add std::nullptr_t overload.
2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/type_traits.h (__is_null_pointer): Add std::nullptr_t
	overload.

	* include/bits/cpp_type_traits.h (__is_fundamental): Remove, unused.

From-SVN: r199313
2013-05-24 18:27:59 +00:00
Matthias Klose 6ca935e617 Makefile.am (bits_headers): Remove ${bits_host_headers}.
2013-05-23  Matthias Klose  <doko@ubuntu.com>

        * include/Makefile.am (bits_headers): Remove ${bits_host_headers}.
        (ext_headers): Remove ${ext_host_headers}.
        (stamp-${host_alias}): Create ${host_builddir}/../ext.
        (stamp-host): Link ${bits_host_headers} and ${ext_host_headers}.
        (install-headers): Install ${bits_host_headers} and ${ext_host_headers}.
        * include/Makefile.in: Regenerate.
        * include/ext/random: Include ext/opt_random.h.

From-SVN: r199257
2013-05-23 14:02:14 +00:00
Paolo Carlini 94938aec1a re PR libstdc++/54577 (deque<T>::erase() still takes iterator instead of const_iterator)
2013-05-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/54577
	* include/bits/stl_deque.h (erase): Fix signatures in C++11 mode.
	(_Deque_iterator<>::_M_const_cast): Add.
	(deque<>::_M_erase): Declare.
	* include/bits/deque.tcc: ... and define.
	* include/bits/stl_list.h (erase): Fix signatures in C++11 mode.
	(_List_const_iterator<>::_M_const_cast): Add.
	* include/bits/list.tcc (erase (iterator)): Fix.
	* include/bits/stl_iterator.h (__normal_iterator<>::_M_const_cast):
	Add; include <ext/cast.h>.
	* include/bits/stl_vector.h (erase): Fix signatures in C++11 mode.
	(vector<>::_M_erase): Declare.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/vector.tcc (vector<>::_M_erase): Define.
	* include/ext/vstring.h (erase): Fix signatures in C++11 mode.
	* include/debug/deque: Adjust.
	* include/debug/list: Likewise.
	* include/debug/vector: Likewise.
	* include/profile/deque: Likewise.
	* include/profile/list: Likewise.
	* include/profile/vector: Likewise.
	* testsuite/util/exception/safety.h (erase_base<deque>,
	erase_base<deque>, erase_base<vector>): Remove.
	(erase_base<__versa_string>): Update.
	* testsuite/ext/vstring/modifiers/char/54577.cc: New.
	* testsuite/ext/vstring/modifiers/wchar_t/54577.cc: Likewise.
	* testsuite/23_containers/deque/modifiers/erase/54577.cc: Likewise.
	* testsuite/23_containers/list/modifiers/erase/54577.cc: Likewise.
	* testsuite/23_containers/vector/bool/modifiers/erase/54577.cc:
	Likewise.
	* testsuite/23_containers/vector/modifiers/erase/54577.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/assign_neg.cc:
	Adjust dg-error 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.

From-SVN: r198790
2013-05-10 15:18:33 +00:00
François Dumont 0462b6aa20 hashtable_policy.h: Add C++11 allocator support.
2013-04-22  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/hashtable_policy.h: Add C++11 allocator support.
	* include/bits/hashtable.h: Likewise.
	* include/bits/unordered_set.h: Likewise.
	* include/bits/unordered_map.h: Likewise.
	* include/debug/unordered_set: Likewise.
	* include/debug/unordered_map: Likewise.
	* include/std/unordered_set: Remove bits/algobase.h
	include. Replace bits/alloc_traits.h by ext/alloc_traits.h.
	* include/std/unordered_map: Likewise.
	* include/ext/throw_allocator.h: Add checks on calls to allocator
	construct/destroy.
	(std::hash<__gnu_cxx::throw_value_limit>): Add conditional throw.
	(std::hash<__gnu_cxx::throw_value_random>): Likewise.
	* testsuite/util/regression/rand/priority_queue
	/container_rand_regression_test.tcc: Adapt.
	* testsuite/util/regression/rand/assoc
	/container_rand_regression_test.tcc: Likewise.
	* testsuite/util/testsuite_counter_type.h: Add count of destructors.
	* testsuite/23_containers/unordered_set
	/not_default_constructible_hash_neg.cc: Adjust dg-error line number.
	* testsuite/23_containers/unordered_set/instantiation_neg.cc: Likewise.
	* testsuite/23_containers/unordered_set/allocator/copy.cc: New.
	* testsuite/23_containers/unordered_set/allocator/copy_assign.cc: New.
	* testsuite/23_containers/unordered_set/allocator/minimal.cc: New.
	* testsuite/23_containers/unordered_set/allocator/move_assign.cc: New.
	* testsuite/23_containers/unordered_set/allocator/noexcept.cc: New.
	* testsuite/23_containers/unordered_set/allocator/swap.cc: New.
	* testsuite/23_containers/unordered_multiset/allocator/copy.cc: New.
	* testsuite/23_containers/unordered_multiset/allocator/copy_assign.cc:
	New.
	* testsuite/23_containers/unordered_multiset/allocator/minimal.cc: New.
	* testsuite/23_containers/unordered_multiset/allocator/move_assign.cc:
	New.
	* testsuite/23_containers/unordered_multiset/allocator/noexcept.cc: New.
	* testsuite/23_containers/unordered_multiset/allocator/swap.cc: New.
	* testsuite/23_containers/unordered_map/allocator/copy.cc: New.
	* testsuite/23_containers/unordered_map/allocator/copy_assign.cc: New.
	* testsuite/23_containers/unordered_map/allocator/minimal.cc: New.
	* testsuite/23_containers/unordered_map/allocator/move_assign.cc: New.
	* testsuite/23_containers/unordered_map/allocator/noexcept.cc:
	New.
	* testsuite/23_containers/unordered_map/allocator/swap.cc: New.
	* testsuite/23_containers/unordered_multimap/allocator/copy.cc: New.
	* testsuite/23_containers/unordered_multimap/allocator/copy_assign.cc:
	New.
	* testsuite/23_containers/unordered_multimap/allocator/minimal.cc: New.
	* testsuite/23_containers/unordered_multimap/allocator/move_assign.cc:
	New.
	* testsuite/23_containers/unordered_multimap/allocator/noexcept.cc: New.
	* testsuite/23_containers/unordered_multimap/allocator/swap.cc: New.

From-SVN: r198158
2013-04-22 20:22:07 +00:00
Jonathan Wakely f2e2de5f85 Makefile.am: Add ext/aligned_buffer.h
* include/Makefile.am: Add ext/aligned_buffer.h
	* include/Makefile.in: Regenerate.
	* include/ext/aligned_buffer.h: New.
	* include/std/future (_Result): Use __aligned_buffer.
	* include/bits/forward_list.h (_Fwd_list_node): Likewise.
	* include/bits/shared_ptr_base.h (_Sp_counted_ptr_inplace): Likewise.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error line
	number.

From-SVN: r197554
2013-04-07 17:44:40 +01:00
Jonathan Wakely 95a83503a0 re PR libstdc++/56170 (Extension debug_allocator seems non-compliant w.r.t. rebind)
PR libstdc++/56170
	* include/ext/debug_allocator.h (debug_allocator): Add missing members
	to meet allocator requirements.
	* testsuite/ext/debug_allocator/56170.cc: New.

From-SVN: r197023
2013-03-24 22:10:29 +00:00
Benjamin Kosnik cd1e666505 memoryfwd.h: New.
* include/bits/memoryfwd.h: New. Centralize forward declarations.
	* include/bits/algorithmfwd.h: Consistent comments.
	* include/bits/localefwd.h: Same.
	* include/ext/vstring_fwd.h: Same.
	* include/parallel/algorithmfwd.h: Same.
	* include/parallel/numericfwd.h: Same.
	* include/std/iosfwd: Same.

	* include/bits/alloc_traits.h: Include memoryfwd.h, remove allocator
	forward decl.
	* include/ext/alloc_traits.h: Remove allocator forward decl.
	* include/bits/stl_construct.h: Same.
	* include/bits/stringfwd.h: Include memoryfwd.h, remove allocator
	forward decl. Consistent comments.

	* doc/doxygen/user.cfg.in (TEMPLATE_RELATIONS): To NO.

	* include/Makefile.am (bits_headers): Add memoryfwd.h.
	* include/Makefile.in: Regenerate.
	* configure: Same.

e enter the commit message for your changes. Lines starting

From-SVN: r196559
2013-03-08 21:39:24 +00:00
Ulrich Drepper 0388c91350 Fix and optimize von_mises_distribution class.
From-SVN: r196436
2013-03-04 16:24:58 +00:00
Ulrich Drepper d233c23756 Add math constants and triangular and von Mises distributions.
From-SVN: r196407
2013-03-03 00:12:28 +00:00
Richard Sandiford 405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Richard Sandiford adf8bb4f07 insert_fn_imps.hpp: Fix typo in copyright years.
libstdc++-v3/
	* include/ext/pb_ds/detail/splay_tree_/insert_fn_imps.hpp: Fix typo
	in copyright years.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc: Likewise.

From-SVN: r194941
2013-01-06 11:53:01 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Jonathan Wakely 3c523cf8a8 re PR libstdc++/55631 (Several ext/ headers can not be #included on their own)
PR libstdc++/55631
	* include/ext/alloc_traits.h: Include missing header.
	* include/ext/pointer.h: Likewise.
	* include/ext/string_conversions.h: Require C++11.
	* libsupc++/initializer_list: Reindent.

From-SVN: r194429
2012-12-11 22:28:01 +00:00
Benjamin Kosnik cef1bc586c standard_policies.hpp: Remove.
2012-12-03  Benjamin Kosnik  <bkoz@redhat.com>

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

From-SVN: r194107
2012-12-03 23:23:52 +00:00
Jonathan Wakely 6b1328eb3c array_allocator.h: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
* include/ext/array_allocator.h: Replace uses of
	__GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.

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

From-SVN: r193638
2012-11-19 22:28:00 +00:00
Jason Merrill 734f50238f * many: Replace uses of __GXX_EXPERIMENTAL_CXX0X__ with __cplusplus.
From-SVN: r193392
2012-11-10 12:27:22 -05:00
Paolo Carlini 54ba39f599 array (_GLIBCXX_THROW_OR_ABORT): Move...
2012-11-07  Paolo Carlini  <paolo.carlini@oracle.com>

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

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

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

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

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

From-SVN: r193092
2012-11-02 10:45:25 +00:00
Edward Smith-Rowland 500602220a dd the Hoyt and the arcsine distributions as extensions.
From-SVN: r192403
2012-10-12 15:15:21 +00:00
Paolo Carlini eeeef8f4f9 re PR libstdc++/54869 (ext/random/simd_fast_mersenne_twister_engine/cons/default.cc FAILs)
2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/54869
	* include/ext/random (simd_fast_mersenne_twister_engine): Provide
	only for little endian targets.
	* include/ext/random.tcc: Likewise.
	* config/cpu/i486/opt/ext/opt_random.h: Likewise.
	* testsuite/lib/libstdc++.exp (check_v3_target_little_endian): Add.
	* testsuite/lib/dg-options.exp (dg-require-little-endian): Add.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	operators/equal.cc: Use the latter.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	operators/serialize.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	operators/inequal.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	cons/copy.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	cons/seed1.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	cons/seed2.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	cons/default.cc: Likewise.
	* testsuite/ext/random/simd_fast_mersenne_twister_engine/
	cons/seed_seq.cc: Likewise.

From-SVN: r192256
2012-10-09 14:50:19 +00:00
Jonathan Wakely 1504e3e1c4 re PR other/53889 (Gthreads doesn't support destroying recursive mutexes)
libgcc:

	PR other/53889
	* gthr.h (__gthread_recursive_mutex_destroy): Document new required
	function.
	* gthr-posix.h (__gthread_recursive_mutex_destroy): Define.
	* gthr-single.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-rtems.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/gthr-vxworks.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/i386/gthr-win32.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/mips/gthr-mipssde.h (__gthread_recursive_mutex_destroy):
	Likewise.
	* config/pa/gthr-dce.h (__gthread_recursive_mutex_destroy): Likewise.
	* config/s390/gthr-tpf.h (__gthread_recursive_mutex_destroy): Likewise.

libstdc++-v3:

	PR other/53889
	* include/std/mutex (__recursive_mutex_base::~__recursive_mutex_base):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex_base::_S_destroy): Remove.
	(__recursive_mutex_base::_S_destroy_win32): Likewise.
	* include/ext/concurrence.h (__recursive_mutex::~__recursive_mutex):
	Use __gthread_recursive_mutex_destroy.
	(__recursive_mutex::_S_destroy): Remove.
	(__recursive_mutex::_S_destroy_win32): Likewise.

From-SVN: r192002
2012-10-02 21:22:32 +01:00
Paolo Carlini decf0e27a0 re PR libstdc++/54757 (FAIL: ext/random/beta_distribution/cons/default.cc (test for excess errors))
2012-10-01  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/54757
	* include/ext/random (rice_distribution<>::operator()): Use std::hypot
	only if _GLIBCXX_USE_C99_MATH_TR1.
	* include/ext/random.tcc (rice_distribution<>::__generate_impl):
	Likewise.

From-SVN: r191944
2012-10-01 23:10:02 +00:00
Jonathan Wakely b4ca0e1a10 ropeimpl.h (__uninitialized_fill_n_a): Fix using declaration.
* include/ext/ropeimpl.h (__uninitialized_fill_n_a): Fix using
	declaration.
	* testsuite/ext/rope/5.cc: New.

From-SVN: r191869
2012-09-30 16:36:18 +01:00
Paolo Carlini 8054b82ee5 random: Add include checks for c++11 and <cstdint>.
2012-09-26  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/random: Add include checks for c++11 and <cstdint>.

From-SVN: r191792
2012-09-27 01:04:30 +00:00
Edward Smith-Rowland 21a8ccc02f Implement the K-distribution as an extension.
From-SVN: r191688
2012-09-25 03:26:36 +00:00
Uros Bizjak 37f1d5c9f9 re PR libstdc++/54675 (Many libstdc++ testsuite failures in ext/random)
PR libstdc++/54675
	* include/ext/random: Avoid the badname __alpha (and, for
	consistency, __mu, __nu, __sigma and __omega too).
	* include/bits/random.tcc: Likewise.

From-SVN: r191650
2012-09-23 13:24:46 +02:00
Edward Smith-Rowland 0c105b723d Implement the Pareto distribution as an extension.
From-SVN: r191612
2012-09-21 12:33:20 +00:00
Edward Smith-Rowland 19ece7ec02 Implement the Nakagami statistical distribution as an extension.
From-SVN: r191434
2012-09-18 16:14:09 +00:00
Paolo Carlini ecfce0b850 re PR libstdc++/54612 (Many failures in ext/random testsuite)
2012-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/54612
	* include/ext/random.tcc (operator==
	(const __gnu_cxx::simd_fast_mersenne_twister_engine<>&,
	const __gnu_cxx::simd_fast_mersenne_twister_engine<>&)): Fix
	state_size use.
	* config/cpu/i486/opt/ext/opt_random.h: Guard with __SSE2__.

From-SVN: r191424
2012-09-18 14:02:20 +00:00
Ulrich Drepper 9bf714c23f configure.ac: Substitute CPU_OPT_EXT_RANDOM.
* configure.ac: Substitute CPU_OPT_EXT_RANDOM.
	* configure.host: Define cpu_opt_ext_random to location of the
	optimized version of <ext/random>.
	* include/Makefile.am (ext_headers): Add ${ext_host_headers}.
	(ext_host_headers): Define.
	* include/ext/random (simd_fast_mersenne_twister_engine<>
	::operator==): Don't define function here.
	* include/ext/random.tcc (simd_fast_mersenne_twister_engine): Don't
	define code using SSE2 here.  Define generic code only if
	_GLIBCXX_OPT_HAVE_RANDOM_SFMT_GEN_READ is not defined.
	(simd_fast_mersenne_twister_engine<>
	::operator==): Define here if
	_GLIBCXX_OPT_HAVE_RANDOM_SFMT_OPERATOREQUAL is not defined.
	* config/cpu/generic/opt/ext/opt_random.h: New file.
	* config/cpu/i486/opt/ext/opt_random.h: New file.
	* libsupc++/Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* po/Makefile.in: Regenerated.
	* configure: Regenerated.
	* Makefile.in: Regenerated.
	* doc/Makefile.in: Regenerated.
	* aclocal.m4: Regenerated.
	* python/Makefile.in: Regenerated.
	* include/Makefile.in: Regenerated.
	* src/c++98/Makefile.in: Regenerated.
	* src/c++11/Makefile.in: Regenerated.
	* src/Makefile.in: Regenerated.

From-SVN: r191384
2012-09-17 13:02:39 +00:00
Edward Smith-Rowland f0e1e86d22 Fix a paste-o in ext/random.tcc - declared an Adapted urng that was not used ot needed.
From-SVN: r191371
2012-09-17 03:46:40 +00:00
Paolo Carlini d9d69f64b1 random (rice_distribution<>::operator==): Change inline friend definition to non-template.
2012-09-16  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/random (rice_distribution<>::operator==): Change
	inline friend definition to non-template.
	* testsuite/ext/random/rice_distribution/requirements/
	explicit_instantiation/1.cc: New.

	* testsuite/26_numerics/random/normal_mv_distribution: Move...
	* testsuite/ext/random/normal_mv_distribution: ... here.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine:
	Move...
	* testsuite/ext/random/simd_fast_mersenne_twister_engine: ... here.
	* testsuite/26_numerics/random/beta_distribution: Move...
	* testsuite/ext/random/beta_distribution: ... here.
	* testsuite/26_numerics/random/rice_distribution: Move...
	* testsuite/ext/random/rice_distribution: ... here.

From-SVN: r191367
2012-09-16 22:28:21 +00:00
Edward Smith-Rowland 283126182e Add the rice distribution as an extension.
From-SVN: r191362
2012-09-16 17:36:56 +00:00
Ulrich Drepper ff99de9860 * include/ext/random.tcc (__gnu_cxx:normal_mv_distribution<>)
(operator()): Use __generate() function of _M_nd.

From-SVN: r190975
2012-09-05 12:41:17 +00:00
Ulrich Drepper bf30f22962 random: Add __gnu_cxx:normal_mv_distribution<> class.
* include/ext/random: Add __gnu_cxx:normal_mv_distribution<> class.
	* include/ext/random.tccAdd out-of-line functions for
	__gnu_cxx::normal_mv_distribution<>.
	* testsuite/26_numerics/random/normal_mv_distribution/
	operators/equal.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	operators/serialize.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	operators/inequal.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	cons/default.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	cons/parms.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	requirements/explicit_instantiation/1.cc: New file.
	* testsuite/26_numerics/random/normal_mv_distribution/
	requirements/typedefs.cc: New file.

From-SVN: r190960
2012-09-05 04:06:24 +00:00
Ulrich Drepper d4d348a9fe random: Add __gnu_cxx::beta_distribution<> class.
* libstdc++-v3/include/ext/random: Add __gnu_cxx::beta_distribution<>
	class.
	* libstdc++-v3/include/ext/random.tcc: Add out-of-line functions for
	__gnu_cxx::beta_distribution<>.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	operators/equal.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	operators/serialize.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	operators/inequal.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	cons/parms.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	cons/default.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	requirements/typedefs.cc: New file.
	* libstdc++-v3/testsuite/26_numerics/random/beta_distribution/
	requirements/explicit_instantiation/1.cc: New file.

From-SVN: r190954
2012-09-04 22:57:09 +00:00
Ulrich Drepper 1860430ab5 Add simd_fast_mersenne_twister_engine class.
* include/ext/random: New file.
	* include/ext/random.tcc: New file.
	* include/Makefile.am (ext_headers): Add random and random.tcc.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	operators/inequal.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	operators/equal.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	operators/serialize.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	cons/seed2.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	cons/default.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	cons/seed_seq.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	cons/copy.cc: New file.
	* testsuite/26_numerics/random/simd_fast_mersenne_twister_engine/
	cons/seed1.cc: New file.

From-SVN: r190783
2012-08-29 18:43:08 +00:00
Jonathan Wakely eb407c3432 re PR libstdc++/53270 (Error when bootstrapping gcc on hppa2.0-unknown-linux-gcc)
PR libstdc++/53270
	* include/ext/concurrence.h (__mutex, __recursive_mutex, __cond): Use
	NSDMI in C++98 mode too.
	* include/ext/rope: Add system_header pragma.
	(_Refcount_Base, _Rope_RopeRep): Use NSDMI.
	(_Rope_RopeRep::~_Rope_RopeRep): Destroy mutex.

From-SVN: r189553
2012-07-16 22:57:18 +01:00
Jonathan Wakely 8db81fb2fe re PR libstdc++/53978 (Missing static const definitions in <bits/alloc_traits.h>)
PR libstdc++/53978
	* include/bits/alloc_traits.h (allocator_traits): Define static
	constants.
	* include/bits/ptr_traits.h (pointer_traits): Likewise.
	* include/ext/alloc_traits.h (__allocator_always_compares_equal):
	Likewise.

From-SVN: r189547
2012-07-16 21:43:11 +01:00
Jonathan Wakely ea15487933 re PR libstdc++/53578 (include/ext/concurrence.h relies on ill-formed narrowing conversions)
PR libstdc++/53578
	* include/ext/concurrence.h (__recursive_mutex::_S_destroy): Fix
	narrowing conversion.
	* include/std/mutex (__recursive_mutex_base::_S_destroy): Likewise.

From-SVN: r188646
2012-06-15 01:27:29 +01:00
Jonathan Wakely 01f83b7d26 re PR libstdc++/53270 (Error when bootstrapping gcc on hppa2.0-unknown-linux-gcc)
PR libstdc++/53270
	* include/ext/concurrence.h (__mutex, __recursive_mutex, __cond): Use
	NSDMI in C++11 mode.
	* include/ext/rope (_Refcount_Base): Likewise. Destroy mutex in
	destructor when initialized by function.

From-SVN: r188637
2012-06-14 23:20:52 +01:00
Paolo Carlini 5ac4e73a1d re PR libstdc++/53339 (unordered_map::iterator requires Value to be complete type)
2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/53339
	* include/bits/hashtable_policy.h (__detail::_Identity,
	__detail::_Select1st): Add.
	(_Map_base, _Hashtable_base): Use the latter, adjust parameters.
	* include/bits/hashtable.h (_Hashtable::__key_extract): Adjust.
	* include/bits/unordered_set.h (__uset_hashtable, __umset_hashtable):
	Likewise.
	* include/bits/unordered_map.h (__umap_hashtable, __ummap_hashtable):
	Likewise.
	* include/bits/stl_function.h (_Identity, _Select1st, _Select2nd)
	Unconditionally derive from unary_function.
	* include/ext/functional (identity, select1st, select2nd): Remove
	#ifdef __GXX_EXPERIMENTAL_CXX0X__ bits.
	* testsuite/23_containers/unordered_map/requirements/53339.cc: New.
	* testsuite/23_containers/unordered_multimap/requirements/
	53339.cc: Likewise.

From-SVN: r187515
2012-05-15 10:00:19 +00:00
Jonathan Wakely 605aed299a alloc_traits.h (__alloc_traits::difference_type): Define.
* include/ext/alloc_traits.h (__alloc_traits::difference_type):
	Define.

From-SVN: r186673
2012-04-22 15:38:33 +01:00
Paolo Carlini b9b0921497 re PR libstdc++/52942 (using std::ref with a std::unordered_map fails to compile)
2012-04-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/52942
	* include/bits/stl_function.h (_Identity, _Select1st, _Select2nd):
	In C++11 mode do not derive from std::unary_function.
	* include/ext/functional (identity, select1st, select2nd): Adjust.
	* testsuite/23_containers/unordered_map/requirements/52942.cc: New.
	* testsuite/23_containers/unordered_set/requirements/52942.cc: Likewise.

From-SVN: r186375
2012-04-12 12:18:06 +00:00
Benjamin Kosnik fa7548481a allocator.h (std::allocator): Base class is __allocator_base.
2012-03-19  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/allocator.h (std::allocator): Base class is
	__allocator_base.
	(uses_allocator): Add to sub-grouping.
	* include/ext/new_allocator.h: Doxygen markup for tparm.

	* config/allocator/bitmap_allocator_base.h: Use __allocator_base
	template alias in C++11.
	* config/allocator/malloc_allocator_base.h: Same.
	* config/allocator/mt_allocator_base.h: Same.
	* config/allocator/new_allocator_base.h: Same.
	* config/allocator/pool_allocator_base.h: Same.

From-SVN: r185544
2012-03-19 21:41:15 +00:00
Benjamin Kosnik b234b0ca04 constructors_destructor_fn_imps.hpp: Increment after recursion.
2012-03-19  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/pb_ds/detail/pat_trie_/
	constructors_destructor_fn_imps.hpp: Increment after recursion.
	* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Convert
	node_type markup from brief.

From-SVN: r185542
2012-03-19 20:43:30 +00:00
Benjamin Kosnik d8dd52a990 user.cfg.in: Update to Doxygen 1.8.0.
2012-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	    * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.0.
	    * include/bits/locale_facets.h: Adjust markup to avoid warnings.
	    * include/ext/pb_ds/assoc_container.hpp: Same.
	    * include/ext/pb_ds/priority_queue.hpp: Same.
	    * include/std/fstream: Same.
	    * include/std/ratio: Same.
	    * testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust line
	    numbers.
	    * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Same.

Co-Authored-By: Ramana Radhakrishnan <ramana@gcc.gnu.org>

From-SVN: r185094
2012-03-08 05:20:52 +00:00
Paolo Carlini 2203cb90fb re PR libstdc++/43813 ([DR1234] vector<T*>(3, NULL) fails to compile)
2012-03-04  Paolo Carlini  <paolo.carlini@oracle.com>
	    Jonathan Wakely  <jwakely.gcc@gmail.com>

	PR libstdc++/43813
	* include/bits/stl_iterator_base_types.h (_RequireInputIter): New.
	* include/ext/vstring.h (__versa_string<>::__versa_string
	(_InputIterator, _InputIterator, const _Alloc&),
	__versa_string<>::append(_InputIterator, _InputIterator),
	__versa_string<>::assign(_InputIterator, _InputIterator),
	__versa_string<>::insert(iterator, _InputIterator,
	_InputIterator), __versa_string<>::replace(iterator, iterator,
	_InputIterator, _InputIterator)): Use it.
	* include/bits/stl_list.h (list<>::list(_InputIterator,
	_InputIterator, const allocator_type&), list<>::assign(_InputIterator,
	_InputIterator), list<>::insert(iterator, _InputIterator,
	_InputIterator)): Likewise.
	* include/bits/stl_vector.h (vector<>::vector(_InputIterator,
	_InputIterator, const allocator_type&), vector<>::assign(_InputIterator,
	_InputIterator), vectort<>::insert(iterator, _InputIterator,
	_InputIterator)): Likewise.
	* include/bits/stl_deque.h (deque<>::deque(_InputIterator,
	_InputIterator, const allocator_type&), deque<>::deque(_InputIterator,
	_InputIterator), deque<>::insert(iterator, _InputIterator,
	_InputIterator)): Likewise.
	* include/bits/stl_bvector.h (vector<>::vector(_InputIterator,
	_InputIterator, const allocator_type&), vector<>::deque(_InputIterator,
	_InputIterator), vector<>::insert(iterator, _InputIterator,
	_InputIterator)): Likewise.
	* include/bits/forward_list.h (forward_list<>::forward_list
	(_InputIterator, _InputIterator, const allocator_type&),
	forward_list<>::assign(_InputIterator, _InputIterator),
	forward_list<>::insert_after(const_iterator, _InputIterator,
	_InputIterator)): Likewise.
	(forward_list<>::_M_initialize_dispatch(,, __true_type): Remove.
	(forward_list<>::_M_range_initialize): Add, adjust everywhere.
	* include/bits/forward_list.tcc: Adjust.
	* include/debug/forward_list: Adjust.
	* include/debug/vector: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/list: Likewise.
	* testsuite/ext/vstring/requirements/do_the_right_thing.cc: New.
	* testsuite/23_containers/forward_list/requirements/
	do_the_right_thing.cc: Likewise.
	* testsuite/23_containers/vector/requirements/
	do_the_right_thing.cc: Likewise.
	* testsuite/23_containers/deque/requirements/
	do_the_right_thing.cc: Likewise.
	* testsuite/23_containers/list/requirements/
	do_the_right_thing.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Adjust dg-error line number.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	insert_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/deque/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	insert_neg.cc: Likewise.
	* 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/list/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	insert_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.

Co-Authored-By: Jonathan Wakely <jwakely.gcc@gmail.com>

From-SVN: r184911
2012-03-05 01:15:28 +00:00
Jakub Jelinek 7dcbaaa984 re PR libstdc++/51798 (libstdc++ atomicity performance regression due to __sync_fetch_and_add)
PR libstdc++/51798
	* config/cpu/generic/atomicity_builtins/atomicity.h
	(__exchange_and_add, __atomic_add): Use __atomic_fetch_add
	with __ATOMIC_ACQ_REL semantics instead of __sync_fetch_and_add.
	* include/ext/atomicity.h (__exchange_and_add, __atomic_add):
	Likewise.

From-SVN: r183644
2012-01-27 21:26:03 +01:00
Benjamin Kosnik a152e96f01 acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove size-specific macros.
2011-11-30  Benjamin Kosnik  <bkoz@redhat.com>

        * acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Remove
        size-specific macros. _GLIBCXX_ATOMIC_BUILTINS_1,
        _GLIBCXX_ATOMIC_BUILTINS_2, _GLIBCXX_ATOMIC_BUILTINS_4,
        _GLIBCXX_ATOMIC_BUILTINS_8. Use _GLIBCXX_ATOMIC_BUILTINS to
        indicate use of C++11 atomic builtins.
        * config.h.in: Regenerate.
        * configure: Regenerate.
        * include/Makefile.am (bits_sup_headers): Add atomic_lockfree_defines.h.
        * include/Makefile.in: Regenerate.
        * libsupc++/Makefile.am: Compile C++11 support with -std=gnu++0x.
        * libsupc++/Makefile.in: Regenerate.

        * include/bits/atomic_base.h: Move lock-free property macros...
        * libsupc++/atomic_lockfree_defines.h: ...here.
        * include/std/future: Use C++11 macros.
        * libsupc++/eh_ptr.cc: Same.
        * libsupc++/eh_throw.cc: Same.
        * libsupc++/exception: Same.
        * libsupc++/exception_ptr.h: Same.
        * libsupc++/guard.cc: Same.
        * libsupc++/nested_exception.cc: Same.
        * libsupc++/nested_exception.h: Same.
        * src/future.cc: Same.

        * include/ext/atomicity.h: Use _GLIBCXX_ATOMIC_BUILTINS.

        * doc/doxygen/user.cfg.in
        * doc/xml/manual/concurrency_extensions.xml

        * testsuite/18_support/exception_ptr/lifespan.cc
        * testsuite/lib/libstdc++.exp

From-SVN: r181869
2011-12-01 02:20:32 +00:00
Paolo Carlini 72f1c34bd4 hash-long-double-aux.cc: Rename to...
2011-11-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* src/hash-long-double-aux.cc: Rename to...
	* src/hash-long-double-tr1-aux.cc: ... this.
	* src/compatibility-ldbl.cc: Adjust.
	* src/hash_tr1.cc: Likewise.
	* src/hash_c++0x.cc: Don't use src/hash-long-double-aux.cc.
	* include/bits/functional_hash.h (hash<_Tp*>::operator(), specs
	for integer types, hash<float>::operator(), hash<double>::operator(),
	hash<long double>::operator()): Declare noexcept.
	* include/debug/bitset (hash<__debug::bitset>::operator()): Likewise.
	* include/debug/vector (hash<__debug::vector>::operator()): Likewise.
	* include/std/system_error (hash<error_code>::operator()): Likewise.
	* include/std/thread (hash<thread::id>::operator()): Likewise.
	* include/std/bitset (hash<bitset>::operator()): Likewise.
	* include/std/typeindex (hash<type_index>::operator()): Likewise.
	* include/profile/bitset (hash<__profile::vector>::operator()):
	Likewise.
	* include/profile/vector (hash<__profile::vector>::operator()):
	Likewise.
	* include/ext/vstring.h (hash<__vstring>::operator(),
	hash<__wvstring>::operator(), hash<__u16vstring>::operator(),
	hash<__u32vstring>::operator()): Likewise.
	* include/bits/shared_ptr.h (hash<shared_ptr>::operator()): Likewise.
	* include/bits/shared_ptr_base.h (hash<__shared_ptr>::operator()):
	Likewise.
	* include/bits/unique_ptr.h (hash<unique_ptr>::operator()): Likewise.
	* include/bits/basic_string.h (hash<string>::operator(),
	hash<wstring>::operator(), hash<u16string>::operator(),
	hash<u32string>::operator()): Likewise.
	* include/bits/vector.tcc (hash<vector>::operator()): Likewise.
	* include/bits/stl_bvector.h (hash<vector>::operator()): Likewise.
	* libsupc++/typeinfo (type_info::hash_code): Use noexcept instead of
	throw().

From-SVN: r181473
2011-11-18 12:37:06 +00:00
Jonathan Wakely 306133e3d4 re PR libstdc++/51083 (TR1 [tr.c99.cmath.over] and C++11 [cmplx.over] overloads not constrained)
PR libstdc++/51083
	* include/ext/type_traits.h (__promote): Only define __type member
	for integral and floating point types, to prevent math functions
	participating in overload resolution for other types.
	(__promote_2, __promote_3, __promote_4): Use __promote in default
	template argument values, so deduction only succeeds for integral and
	floating point types.
	* testsuite/26_numerics/cmath/51083.cc: New.
	* testsuite/26_numerics/complex/51083.cc: New.
	* testsuite/tr1/8_c_compatibility/cmath/51083.cc: New.
	* testsuite/tr1/8_c_compatibility/complex/51083.cc: New.

From-SVN: r181321
2011-11-12 15:57:03 +00:00
Dodji Seketeli bd0424fa93 PR c++/51027 - accepts alias-declaration without ';'
gcc/cp/

	* parser.c (cp_parser_alias_declaration): Require ';' at the end
	of the declaration.

libstdc++-v3/

	* include/ext/pointer.h (rebind): Append missing ';'.

gcc/testsuite

	* g++.dg/cpp0x/alias-decl-12.C: New test.
	* g++.dg/ext/alias-decl-attr4.C: Append missing ';'.

From-SVN: r181195
2011-11-09 09:00:58 +01:00
Jonathan Wakely 7579d15b58 ptr_traits.h (__rebind): Replace with...
* include/bits/ptr_traits.h (__rebind): Replace with...
	(rebind): Implement using alias-declaration.
	* include/ext/pointer.h (__rebind): Replace with...
	(rebind): Implement using alias-declaration.
	* include/bits/alloc_traits.h (__rebind_alloc, __rebind_traits):
	Replace with...
	(rebind_alloc, rebind_traits): Implement using alias-declaration.
	* include/ext/alloc_traits.h (rebind): Use rebind_alloc instead of
	__rebind_alloc.
	* include/std/scoped_allocator (rebind): Likewise.

From-SVN: r181139
2011-11-08 00:33:45 +00:00
Jonathan Wakely f1e09f0d14 basic_string.h (basic_string::at): Move adjacent to other overload.
* include/bits/basic_string.h (basic_string::at): Move adjacent to other
	overload.
	(basic_string::pop_back): Define.
	* include/debug/string (__gnu_debug::basic_string::pop_back): Likewise.
	* include/ext/vstring.h (__versa_string::pop_back): Likewise.
	* config/abi/pre/gnu.ver: Add new symbols.
	* testsuite/21_strings/basic_string/modifiers/char/pop_back.cc: New.
	* testsuite/21_strings/basic_string/modifiers/wchar_t/pop_back.cc: New.
	* testsuite/21_strings/basic_string/range_access.cc: Split to ...
	* testsuite/21_strings/basic_string/range_access/char/1.cc: Here and ...
	* testsuite/21_strings/basic_string/range_access/wchar_t/1.cc: Here.
	* testsuite/ext/vstring/modifiers/char/pop_back.cc: New.
	* testsuite/ext/vstring/modifiers/wchar_t/pop_back.cc: New.

From-SVN: r181049
2011-11-07 00:06:23 +00:00
Jason Merrill a7d5d7e221 Makefile.am (install-freestanding-headers): Install c++0x_warning.h.
* include/Makefile.am (install-freestanding-headers): Install
	c++0x_warning.h.
	* libsupc++/initializer_list: Include it.

From-SVN: r180727
2011-11-01 00:02:45 -04:00
Paolo Carlini 57d1eadd79 pod_char_traits.h: Avoid warnings in C++0x mode when int_type is unsigned.
2011-10-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pod_char_traits.h: Avoid warnings in C++0x mode
	when int_type is unsigned.

From-SVN: r179587
2011-10-06 01:41:49 +00:00
Jonathan Wakely 73f0503101 alloc_traits.h (__alloc_traits::max_size): Define.
2011-10-04  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__alloc_traits::max_size): Define.
	(__alloc_traits::rebind): Define.
	* include/bits/stl_vector.h: Use them.
	* testsuite/util/testsuite_allocator.h (SimpleAllocator): Define.
	* testsuite/23_containers/vector/allocator/minimal.cc: New.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line numbers.
	* testsuite/23_containers/vector/requirements/dr438/insert_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.

From-SVN: r179523
2011-10-04 21:34:54 +01:00
Paolo Carlini 12bfa8bd29 re PR libstdc++/40856 (numeric_limits not specialized for __int128_t or __uint128_t)
2011-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/40856
	* include/std/limits (numeric_limits<__int128_t>,
	numeric_limits<__uint128_t>): Add.
	* src/limits.cc:Define.
	* config/abi/pre/gnu.ver: Export.
	* include/ext/typelist.h (_GLIBCXX_TYPELIST_CHAIN16, 20): Add.
	* testsuite/util/testsuite_common_types.h (integral_types_gnu): Add
	(limits_tl): Use it.
	* testsuite/18_support/numeric_limits/requirements/
	constexpr_functions.cc: Likewise.
	* testsuite/18_support/numeric_limits/40856.cc: New.
	* testsuite/18_support/numeric_limits/dr559.cc: Extend.
	* testsuite/18_support/numeric_limits/lowest.cc: Likewise.
	* testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
	* testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error
	line numbers.
	* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
	* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
	Likewise.
	* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
	Likewise.

From-SVN: r178969
2011-09-19 11:52:49 +00:00
Dodji Seketeli 3797cb21ff PR c++/33255 - Support -Wunused-local-typedefs warning
gcc/

	* c-decl.c (lookup_name): Use the new
	maybe_record_typedef_use.
	(pushdecl): Use the new
	record_locally_defined_typedef.
	(store_parm_decls): Allocate cfun->language.
	(finish_function): Use the new maybe_warn_unused_local_typedefs,
	and free cfun->language.
	(c_push_function_context): Allocate cfun->language here only if
	needed.
	(c_pop_function_context): Likewise, mark cfun->language
	for collection only when it should be done.
	* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
	nodes.
	* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
	maybe_record_local_typedef_use.

gcc/c-family

	* c-common.h (struct c_language_function::local_typedefs): New
	field.
	(record_locally_defined_typedef, maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Declare new functions.
	* c-common.c (record_locally_defined_typedef)
	(maybe_record_typedef_use)
	(maybe_warn_unused_local_typedefs): Define new functions.
	* c.opt: Declare new -Wunused-local-typedefs flag.

gcc/cp

	* name-lookup.c (pushdecl_maybe_friend_1): Use the new
	record_locally_defined_typedef.
	* decl.c (finish_function): Use the new
	maybe_warn_unused_local_typedefs.
	(grokfield): Use the new record_locally_defined_typedef.
	* parser.c (lookup_name): Use the new maybe_record_typedef_use.

gcc/doc/

	* invoke.texi: Update documentation for -Wunused-local-typedefs.

gcc/testsuite/

	* g++.dg/warn/Wunused-local-typedefs.C: New test file.
	* c-c++-common/Wunused-local-typedefs.c: Likewise.

libstdc++-v3/

	* include/ext/bitmap_allocator.h
	(__detail::__mini_vector::__lower_bound): Remove unused typedef.
	* src/istream.cc (std::operator>>(basic_istream<char>& __in,
	basic_string<char>& __str)): Likewise.
	(std::getline): Likewise.
	* src/valarray.cc (__valarray_product): Likewise.

From-SVN: r178692
2011-09-08 15:54:24 +02:00
Benjamin Kosnik 93c66bc68a user.cfg.in (PDF_HYPERLINKS): To NO.
2011-08-06  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in (PDF_HYPERLINKS): To NO.

2011-08-06  Benjamin Kosnik  <bkoz@redhat.com>

	* doc/doxygen/user.cfg.in: Add scoped_allocator.

	* include/debug/safe_sequence.h: Fix doxygen markup.
	* include/debug/safe_unordered_base.h: Same.
	* include/debug/safe_local_iterator.tcc: Same.
	* include/debug/safe_unordered_container.h: Same.
	* include/std/valarray: Same.
	* include/std/iomanip: Same.
	* include/std/streambuf: Same.
	* include/std/bitset: Same.
	* include/std/fstream: Same.
	* include/std/functional: Same.
	* include/std/istream: Same.
	* include/std/ostream: Same.
	* include/std/scoped_allocator: Same.
	* include/std/sstream: Same.
	* include/parallel/multiway_merge.h: Same.
	* include/parallel/base.h: Same.
	* include/parallel/for_each_selectors.h: Same.
	* include/parallel/multiway_mergesort.h: Same.
	* include/parallel/search.h: Same.
	* include/parallel/partial_sum.h: Same.
	* include/parallel/queue.h: Same.
	* include/parallel/sort.h: Same.
	* include/parallel/random_number.h: Same.
	* include/ext/vstring.h: Same.
	* include/ext/algorithm: Same.
	* include/ext/pb_ds/assoc_container.h: Same.
	* include/ext/bitmap_allocator.h: Same.
	* include/ext/stdio_filebuf.h: Same.
	* include/ext/memory: Same.
	* include/ext/functional: Same.
	* include/bits/basic_ios.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_map.h: Same.
	* include/bits/stl_algobase.h: Same.
	* include/bits/stl_queue.h: Same.
	* include/bits/gslice.h: Same.
	* include/bits/locale_classes.h: Same.
	* include/bits/stl_set.h: Same.
	* include/bits/locale_facets.h: Same.
	* include/bits/stl_stack.h: Same.
	* include/bits/stl_heap.h: Same.
	* include/bits/forward_list.h: Same.
	* include/bits/stream_iterator.h: Same.
	* include/bits/basic_string.h: Same.
	* include/bits/stl_multimap.h: Same.
	* include/bits/stl_pair.h: Same.
	* include/bits/ios_base.h: Same.
	* include/bits/stl_numeric.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/codecvt.h: Same.
	* include/bits/stl_multiset.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/ptr_traits.h: Same.
	* include/bits/slice_array.h: Same.
	* include/bits/stl_iterator_base_funcs.h: Same.
	* include/bits/stl_algo.h: Same.
	* include/bits/stl_iterator.h: Same.
	* include/bits/stl_tempbuf.h: Same.
	* include/bits/regex.h: Same.
	* include/bits/range_access.h: Same.
	* include/bits/random.h: Same.
	* include/bits/alloc_traits.h: Same.
	* include/bits/regex_error.h: Same.
	* include/bits/locale_facets_nonio.h: Same.
	* include/bits/stl_relops.h: Same.
	* include/backward/auto_ptr.h: Same.
	* libsupc++/initializer_list: Same.

	* testsuite/23_containers/list/requirements/dr438/assign_neg.cc:
	Adjust line numbers.
	* 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.

From-SVN: r177542
2011-08-07 07:27:06 +00:00
Jonathan Wakely d526242cd8 alloc_traits.h (__allocator_always_compares_equal): New trait, provide partial specializations for known allocators.
2011-07-09  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/alloc_traits.h (__allocator_always_compares_equal): New
	trait, provide partial specializations for known allocators.
	(__alloc_traits::construct, __alloc_traits::destroy): Overload for
	non-standard pointer types.
	(__alloc_traits::_S_always_equal): New trait for use with noexcept.
	(__alloc_traits::_S_nothrow_move): Likewise.
	(__alloc_traits::_S_nothrow_swap): Likewise.

From-SVN: r176077
2011-07-09 13:48:32 +01:00
Jonathan Wakely eece716393 cast.h: Fix typo in include guard.
2011-07-09  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/cast.h: Fix typo in include guard.
	* include/ext/pointer.h (_Unqualified_type): Remove redundant
	partial specializations for volatile types. Fix typos in comments.
	(pointer_traits<_Pointer_adaptor<Tp>>::pointer_to): Define.

From-SVN: r176075
2011-07-09 11:28:56 +01:00
Paolo Carlini 98656b3d14 pat_trie_base.hpp: Avoid -Wall warning.
2011-06-22  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Avoid -Wall
	warning.

From-SVN: r175321
2011-06-22 22:28:56 +00:00
Jonathan Wakely e8eb60bd92 Makefile.am: Add alloc_traits.h headers.
2011-06-22  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/Makefile.am: Add alloc_traits.h headers.
	* include/Makefile.in: Regenerate.
	* include/std/memory: Include uses_allocator.h explicitly.
	* include/bits/allocator.h (allocator_traits): Move to ...
	* include/bits/alloc_traits.h: New header.
	* include/ext/alloc_traits.h (__alloc_traits): Extension to provide
	a common allocator interface for C++98 and C++0x.
	* include/bits/stl_construct.h: Use __alloc_traits.
	* include/bits/stl_uninitialized.h: Likewise.

From-SVN: r175305
2011-06-22 20:57:12 +01:00
François Dumont 8a752dfea6 allocator.h (__shrink_to_fit): Rename to __shrink_to_fit_aux, fix.
2011-06-12  François Dumont  <francois.cppdevs@free.fr>
	    Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/allocator.h (__shrink_to_fit): Rename to
	__shrink_to_fit_aux, fix.
	* include/bits/stl_vector.h (_M_shrink_to_fit): Declare.
	(shrink_to_fit): Use the latter.
	* include/debug/vector (shrink_to_fit): Likewise.
	* include/bits/vector.tcc (_M_shrink_to_fit): Define.
	* include/bits/stl_deque.h (_M_shrink_to_fit): Declare.
	(shrink_to_fit): Use the latter.
	* include/debug/deque (shrink_to_fit): Likewise.
	* include/bits/deque.tcc (_M_shrink_to_fit): Define.
	* include/bits/vector.tcc (vector<bool>::_M_reallocate): Add.
	* include/bits/stl_bvector.h (_M_shrink_to_fit): Declare.
	(shrink_to_fit): Use the latter.
	(reserve): Use _M_reallocate, move inline.
	(_Bvector_base<>::_S_nword): Add, use it throughout.
	* include/debug/string (shrink_to_fit): Redo.
	* include/ext/vstring.h (shrink_to_fit): Optimize.
	* include/bits/basic_string.h (shrink_to_fit): Likewise.
	* testsuite/21_strings/debug/shrink_to_fit.cc: New.
	* testsuite/23_containers/vector/debug/shrink_to_fit.cc: Likewise.
	* testsuite/23_containers/vector/debug/bool/shrink_to_fit.cc:
	Likewise.
	* testsuite/23_containers/vector/bool/capacity/shrink_to_fit.cc:
	Likewise.
	* testsuite/23_containers/deque/debug/shrink_to_fit.cc: Likewise.



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

From-SVN: r174967
2011-06-12 15:51:36 +00:00
Jonathan Wakely c51b58dc1f extptr_allocator.h (construct, destroy): Fix for C++0x mode by overloading to take allocator's pointer type.
2011-06-11  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/ext/extptr_allocator.h (construct, destroy): Fix for C++0x
	mode by overloading to take allocator's pointer type.
	* testsuite/23_containers/vector/ext_pointer/types/2.cc: New.
	* testsuite/23_containers/vector/ext_pointer/explicit_instantiation/
	2.cc: New.

From-SVN: r174958
2011-06-11 17:05:08 +01:00
Paolo Carlini 7d9cb05400 throw_allocator.h: Use noexcept.
2011-06-10  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/throw_allocator.h: Use noexcept.
	* include/ext/pool_allocator.h: Likewise.
	* include/ext/bitmap_allocator.h: Likewise.
	* include/ext/new_allocator.h: Likewise.
	* include/ext/malloc_allocator.h: Likewise.
	* include/ext/array_allocator.h: Likewise.
	* include/ext/mt_allocator.h: Likewise.
	* include/ext/extptr_allocator.h: Likewise.
	* testsuite/util/testsuite_allocator.h: Likewise; do not include
	<cassert> directly, include <testsuite_hooks.h> instead.

From-SVN: r174918
2011-06-10 17:14:40 +00:00
Benjamin Kosnik 30a96b3b0c *: Doxygen markup redo.
2011-06-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/pb_ds/*: Doxygen markup redo.
	* include/Makefile.am: Fold in constructors_destructor_fn_imps.hpp.
	* include/Makefile.in: Regenerate.

From-SVN: r174917
2011-06-10 17:10:42 +00:00
Paolo Carlini 545dc5e324 extptr_allocator.h: Include <ext/numeric_traits.h> instead of <limits>.
2011-06-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/ext/extptr_allocator.h: Include <ext/numeric_traits.h>
	instead of <limits>.
	* include/bits/allocator.h: Likewise.

	* include/std/chrono (duration_values<>::min): Call lowest, not min.

From-SVN: r174805
2011-06-08 12:12:00 +00:00
Jonathan Wakely 428319bb9a ptr_traits.h (pointer_traits): Fix typos.
2011-06-05  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/bits/ptr_traits.h (pointer_traits): Fix typos.
	* include/ext/pointer.h (pointer_traits): Add partial specialization
	for _Pointer_adapter.

From-SVN: r174661
2011-06-05 21:28:38 +01:00
Paolo Carlini 6f59ea252b hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): Use std::move on the allocator, use noexcept.
2011-06-01  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)):
	Use std::move on the allocator, use noexcept.
	(_Hashtable<>::~_Hashtable): Use noexcept.
	* include/bits/stl_list.h: Likewise.
	* include/bits/forward_list.h: Likewise.
	* include/bits/stl_vector.h: Likewise.
	* include/bits/stl_bvector.h: Likewise.
	* include/bits/stl_map.h (map<>::map(map&&)): Use noexcept. 
	* include/bits/stl_set.h: Likewise.
	* include/bits/stl_multimap.h: Likewise.
	* include/bits/stl_multiset.h: Likewise.
	* include/bits/stl_tree.h (_Rb_tree<>::_Rb_tree(_Rb_tree&&)): Use
	std::move on the allocator.
	(_Rb_tree<>::~_Rb_tree): Use noexcept.
	* include/bits/stl_deque.h: Likewise.
	* include/bits/basic_string.h (basic_string<>::~basic_string): Use
	noexcept.
	* include/ext/vstring.h (__versa_string<>::~__versa_string): Likewise.
	* include/debug/set.h: Adjust.
	* include/debug/unordered_map: Likewise.
	* include/debug/multiset.h: Likewise.
	* include/debug/forward_list: Likewise.
	* include/debug/vector: Likewise.
	* include/debug/unordered_set: Likewise.
	* include/debug/deque: Likewise.
	* include/debug/map.h: Likewise.
	* include/debug/string: Likewise.
	* include/debug/list: Likewise.
	* include/debug/multimap.h: Likewise.
	* include/profile/set.h: Likewise.
	* include/profile/unordered_map: Likewise.
	* include/profile/multiset.h: Likewise.
	* include/profile/forward_list: Likewise.
	* include/profile/unordered_set: Likewise.
	* include/profile/vector: Likewise.
	* include/profile/deque: Likewise.
	* include/profile/map.h: Likewise.
	* include/profile/list: Likewise.
	* include/profile/multimap.h: Likewise.
	* testsuite/21_strings/basic_string/cons/wchar_t/
	noexcept_move_construct.cc: New.
	* testsuite/21_strings/basic_string/cons/char/
	noexcept_move_construct.cc: Likewise.
	* testsuite/ext/vstring/cons/noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/unordered_map/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/multimap/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/set/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/unordered_multimap/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/forward_list/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/vector/bool/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/vector/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/multiset/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/list/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/
	noexcept_move_construct.cc: Likewise.
	* testsuite/23_containers/map/cons/noexcept_move_construct.cc
	* testsuite/23_containers/forward_list/requirements/dr438/
	assign_neg.cc: Adjust dg-error line numbers.
	* testsuite/23_containers/forward_list/requirements/dr438/
	insert_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_1_neg.cc: Likewise.
	* testsuite/23_containers/forward_list/requirements/dr438/
	constructor_2_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/vector/requirements/dr438/
	insert_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/deque/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/deque/requirements/dr438/
	insert_neg.cc: Likewise.
	* 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/list/requirements/dr438/
	assign_neg.cc: Likewise.
	* testsuite/23_containers/list/requirements/dr438/
	insert_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.

	* include/bits/move.h (swap): Use __and_ in the noexcept.
	* include/bits/algorithmfwd.h: Adjust.

From-SVN: r174525
2011-06-01 14:16:19 +00:00
Paolo Carlini cea8c6deef basic_string.h: Use noexcept per the FDIS (minus compare(const string&)...
2011-05-31  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/bits/basic_string.h: Use noexcept per the FDIS (minus
	compare(const string&), which uses char_traits::compare, which
	isn't noexcept; also no noexcept in the move assignment operator
	and move assign, see c++std-lib-30855).
	* include/bits/basic_string.tcc: Likewise.
	* include/ext/vstring.h: Likewise.
	* include/ext/vstring.tcc: Likewise.
	* include/debug/string: Likewise.

From-SVN: r174479
2011-05-31 12:50:31 +00:00
Jonathan Wakely 45ba8f9f8f Makefile.am: Add new ptr_traits.h header.
2011-05-28  Jonathan Wakely  <jwakely.gcc@gmail.com>

	* include/Makefile.am: Add new ptr_traits.h header.
	* include/Makefile.in: Regenerate.
	* include/bits/ptr_traits.h (pointer_traits): New.
	* include/bits/allocator.h (allocator_traits): Add.
	* include/ext/array_allocator.h (construct, destroy): Update C++0x
	versions.
	* include/ext/bitmap_allocator.h (construct, destroy): Likewise.
	* include/ext/extptr_allocator.h (construct, destroy): Likewise.
	* include/ext/malloc_allocator.h (construct, destroy): Likewise.
	* include/ext/mt_allocator.h (construct, destroy): Likewise.
	* include/ext/new_allocator.h (construct, destroy): Likewise.
	* include/ext/pool_allocator.h (construct, destroy): Likewise.
	* include/ext/throw_allocator.h (construct, destroy): Likewise.
	* testsuite/20_util/allocator_traits/requirements/typedefs.cc: New.
	* testsuite/20_util/allocator_traits/requirements/
	explicit_instantiation.cc: New.
	* testsuite/20_util/allocator_traits/members/max_size.cc: New.
	* testsuite/20_util/allocator_traits/members/select.cc: New.
	* testsuite/20_util/allocator_traits/members/construct.cc: New.
	* testsuite/20_util/allocator_traits/members/allocate_hint.cc: New.
	* testsuite/20_util/allocator_traits/members/destroy.cc: New.
	* testsuite/20_util/pointer_traits/requirements/typedefs.cc: New.
	* testsuite/20_util/pointer_traits/requirements/
	explicit_instantiation.cc: New.

From-SVN: r174380
2011-05-28 14:27:43 +01:00
Paolo Carlini e330aa5b35 re PR libstdc++/49187 (parallel mode compilation broken - unqualified lookup? (bisected))
2011-05-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/49187
	* include/parallel/losertree.h: Add missing using declarations
	of _Base::_M_comp.
	* include/parallel/algobase.h: Include <parallel/algorithmfwd.h>.
	* include/parallel/multiway_merge.h: Include <parallel/
	multiseq_selection.h>, forward declare __merge_advance.
	* include/parallel/multiseq_selection.h: Don't include <parallel/
	sort.h> here.
	* include/ext/pb_ds/detail/thin_heap_/erase_fn_imps.hpp: Fix
	qualification of upper_bound.

	* testsuite/ext/pb_ds/regression/tree_no_data_map_rand_debug.cc:
	Use dg-require-debug-mode.
	* testsuite/ext/pb_ds/regression/tree_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/priority_queue_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/trie_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/trie_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/list_update_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/list_update_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/hash_no_data_map_rand_debug.cc:
	Likewise.
	* testsuite/ext/pb_ds/regression/hash_data_map_rand_debug.cc:
	Likewise.

	* include/parallel/algo.h: Minor uglification fixes.

From-SVN: r174342
2011-05-27 16:35:36 +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
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
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
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
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
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
Paolo Carlini bde8d7f701 re PR libstdc++/47773 (Versatile string lacks a default hash function)
2011-02-16  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/47773
	* include/ext/vstring.h (hash<__gnu_cxx::__vstring>,
	hash<__gnu_cxx::__wvstring>, hash<__gnu_cxx::__u16vstring>,
	hash<__gnu_cxx::__u32vstring>): Add.
	* testsuite/ext/vstring/hash/char/1.cc: New.
	* testsuite/ext/vstring/hash/wchar_t/1.cc: Likewise.

From-SVN: r170235
2011-02-17 01:24:37 +00:00
Paolo Carlini 60a40f62c8 re PR libstdc++/47709 (is_heap(standard iterator) becomes ambiguous in C++0x mode)
2011-02-12  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/47709
	* include/ext/algorithm (is_heap): In C++0x mode import from
	namespace std.
	* testsuite/ext/is_heap/47709.cc: New.

From-SVN: r170089
2011-02-12 21:26:21 +00:00