aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/ext
AgeCommit message (Collapse)Author
2012-09-25Implement the K-distribution as an extension.Edward Smith-Rowland
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191688 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-23 PR libstdc++/54675Uros Bizjak
* include/ext/random: Avoid the badname __alpha (and, for consistency, __mu, __nu, __sigma and __omega too). * include/bits/random.tcc: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191650 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-21Implement the Pareto distribution as an extension.Edward Smith-Rowland
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191612 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-18Implement the Nakagami statistical distribution as an extension.Edward Smith-Rowland
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191434 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-182012-09-18 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
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__. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191424 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-17 * configure.ac: Substitute CPU_OPT_EXT_RANDOM.Ulrich Drepper
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191384 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-17Fix a paste-o in ext/random.tcc - declared an Adapted urng that was not used ↵Edward Smith-Rowland
ot needed. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191371 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-162012-09-16 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191367 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-16Add the rice distribution as an extension.Edward Smith-Rowland
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@191362 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-05 * include/ext/random.tcc (__gnu_cxx:normal_mv_distribution<>)Ulrich Drepper
(operator()): Use __generate() function of _M_nd. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190975 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-05 * include/ext/random: Add __gnu_cxx:normal_mv_distribution<> class.Ulrich Drepper
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190960 138bc75d-0d04-0410-961f-82ee72b054a4
2012-09-04 * libstdc++-v3/include/ext/random: Add __gnu_cxx::beta_distribution<>Ulrich Drepper
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190954 138bc75d-0d04-0410-961f-82ee72b054a4
2012-08-29 Add simd_fast_mersenne_twister_engine class.Ulrich Drepper
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190783 138bc75d-0d04-0410-961f-82ee72b054a4
2012-07-16 PR libstdc++/53270Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@189553 138bc75d-0d04-0410-961f-82ee72b054a4
2012-07-16 PR libstdc++/53978Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@189547 138bc75d-0d04-0410-961f-82ee72b054a4
2012-06-15 PR libstdc++/53578Jonathan Wakely
* include/ext/concurrence.h (__recursive_mutex::_S_destroy): Fix narrowing conversion. * include/std/mutex (__recursive_mutex_base::_S_destroy): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@188646 138bc75d-0d04-0410-961f-82ee72b054a4
2012-06-14 PR libstdc++/53270Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@188637 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-152012-05-15 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@187515 138bc75d-0d04-0410-961f-82ee72b054a4
2012-04-22 * include/ext/alloc_traits.h (__alloc_traits::difference_type):Jonathan Wakely
Define. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186673 138bc75d-0d04-0410-961f-82ee72b054a4
2012-04-122012-04-12 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186375 138bc75d-0d04-0410-961f-82ee72b054a4
2012-03-192012-03-19 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@185544 138bc75d-0d04-0410-961f-82ee72b054a4
2012-03-192012-03-19 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@185542 138bc75d-0d04-0410-961f-82ee72b054a4
2012-03-082012-03-08 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@185094 138bc75d-0d04-0410-961f-82ee72b054a4
2012-03-052012-03-04 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@184911 138bc75d-0d04-0410-961f-82ee72b054a4
2012-01-27 PR libstdc++/51798Jakub Jelinek
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@183644 138bc75d-0d04-0410-961f-82ee72b054a4
2011-12-012011-11-30 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* 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 git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181869 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-182011-11-18 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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(). git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181473 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-12 PR libstdc++/51083Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181321 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-09PR c++/51027 - accepts alias-declaration without ';'Dodji Seketeli
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 ';'. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181195 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-08 * include/bits/ptr_traits.h (__rebind): Replace with...Jonathan Wakely
(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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181139 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-07 * include/bits/basic_string.h (basic_string::at): Move adjacent to otherJonathan Wakely
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@181049 138bc75d-0d04-0410-961f-82ee72b054a4
2011-11-01 * include/Makefile.am (install-freestanding-headers): InstallJason Merrill
c++0x_warning.h. * libsupc++/initializer_list: Include it. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@180727 138bc75d-0d04-0410-961f-82ee72b054a4
2011-10-062011-10-05 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* include/ext/pod_char_traits.h: Avoid warnings in C++0x mode when int_type is unsigned. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179587 138bc75d-0d04-0410-961f-82ee72b054a4
2011-10-042011-10-04 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@179523 138bc75d-0d04-0410-961f-82ee72b054a4
2011-09-192011-09-19 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@178969 138bc75d-0d04-0410-961f-82ee72b054a4
2011-09-08PR c++/33255 - Support -Wunused-local-typedefs warningDodji Seketeli
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@178692 138bc75d-0d04-0410-961f-82ee72b054a4
2011-08-072011-08-06 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@177542 138bc75d-0d04-0410-961f-82ee72b054a4
2011-07-092011-07-09 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@176077 138bc75d-0d04-0410-961f-82ee72b054a4
2011-07-092011-07-09 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@176075 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-222011-06-22 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* include/ext/pb_ds/detail/pat_trie_/pat_trie_base.hpp: Avoid -Wall warning. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@175321 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-222011-06-22 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@175305 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-122011-06-12 François Dumont <francois.cppdevs@free.fr>François Dumont
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174967 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-112011-06-11 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174958 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-102011-06-10 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174918 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-102011-06-10 Benjamin Kosnik <bkoz@redhat.com>Benjamin Kosnik
* include/ext/pb_ds/*: Doxygen markup redo. * include/Makefile.am: Fold in constructors_destructor_fn_imps.hpp. * include/Makefile.in: Regenerate. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174917 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-082011-06-08 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174805 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-052011-06-05 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* include/bits/ptr_traits.h (pointer_traits): Fix typos. * include/ext/pointer.h (pointer_traits): Add partial specialization for _Pointer_adapter. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174661 138bc75d-0d04-0410-961f-82ee72b054a4
2011-06-012011-06-01 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174525 138bc75d-0d04-0410-961f-82ee72b054a4
2011-05-312011-05-31 Paolo Carlini <paolo.carlini@oracle.com>Paolo Carlini
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174479 138bc75d-0d04-0410-961f-82ee72b054a4
2011-05-282011-05-28 Jonathan Wakely <jwakely.gcc@gmail.com>Jonathan Wakely
* 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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@174380 138bc75d-0d04-0410-961f-82ee72b054a4