diff options
author | Phil Edwards <pme@sources.redhat.com> | 2001-04-03 00:26:58 +0000 |
---|---|---|
committer | Phil Edwards <pme@sources.redhat.com> | 2001-04-03 00:26:58 +0000 |
commit | c6a74033dbf2df36530aac35221c684d4c3e5f4b (patch) | |
tree | bafb595dea147deb7ac77eeb4fcdb31ddddbc477 /libstdc++-v3/include/ext | |
parent | b59617974bcdcf6564208ad2575b7b66e1535815 (diff) |
2001-04-02 Phil Edwards <pme@sources.redhat.com>
New concept checking implementation.
* docs/html/19_diagnostics/howto.html: Document.
* docs/html/17_intro/concept_check.diff: New file, for reference.
* include/bits/boost_concept_check.h: New file from Boost.
* include/bits/c++config: Update comments.
* include/bits/concept_check.h: New file.
* include/bits/concept_checks.h: Removed.
* include/bits/container_concepts.h: Removed.
* include/bits/sequence_concepts.h: Removed.
* include/bits/stl_iterator_base.h: Removed; split into...
* include/bits/stl_iterator_base_funcs.h: ...this new file...
* include/bits/stl_iterator_base_types.h: ...and this new file.
* include/bits/sbuf_iter.h: Update to use new implementation.
* include/bits/std_iterator.h: Likewise.
* include/bits/std_memory.h: Likewise.
* include/bits/stl_algo.h: Likewise.
* include/bits/stl_algobase.h: Likewise.
* include/bits/stl_construct.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_heap.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_map.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_numeric.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/stl_uninitialized.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/ext/hash_map: Likewise.
* include/ext/hash_set: Likewise.
* include/ext/slist: Likewise.
* include/ext/stl_hashtable.h: Likewise.
* src/Makefile.am (base_headers): Update list of headers.
* Makefile.in: Regenerated.
* src/Makefile.in: Regenerated.
* libio/Makefile.in: Regenerated.
* libmath/Makefile.in: Regenerated.
* libsupc++/Makefile.in: Regenerated.
* testsuite/Makefile.in: Regenerated.
* docs/html/install.html: Update contact information.
* docs/html/17_intro/howto.html: Ditto.
* docs/html/18_support/howto.html: Ditto.
* docs/html/20_util/howto.html: Ditto.
* docs/html/21_strings/howto.html: Ditto.
* docs/html/22_locale/howto.html: Ditto.
* docs/html/23_containers/howto.html: Ditto.
* docs/html/24_iterators/howto.html: Ditto.
* docs/html/25_algorithms/howto.html: Ditto.
* docs/html/26_numerics/howto.html: Ditto.
* docs/html/27_io/howto.html: Ditto.
* docs/html/faq/index.html: Ditto, plus info on new checking code.
* docs/html/ext/howto.html: Ditto, plus info on new checking code.
* docs/html/faq/index.txt: Regenerated.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@41031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext')
-rw-r--r-- | libstdc++-v3/include/ext/hash_map | 13 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/hash_set | 21 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/slist | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/stl_hashtable.h | 4 |
4 files changed, 20 insertions, 25 deletions
diff --git a/libstdc++-v3/include/ext/hash_map b/libstdc++-v3/include/ext/hash_map index cbaf1d6a07a..ddb32c731a3 100644 --- a/libstdc++-v3/include/ext/hash_map +++ b/libstdc++-v3/include/ext/hash_map @@ -32,6 +32,7 @@ #define __SGI_STL_INTERNAL_HASH_MAP_H #include <ext/stl_hashtable.h> +#include <bits/concept_check.h> namespace std { @@ -121,8 +122,6 @@ public: friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&, const hash_map<_K1, _T1, _HF, _EqK, _Al>&); -#include <bits/concept_checks.h> - iterator begin() { return _M_ht.begin(); } iterator end() { return _M_ht.end(); } const_iterator begin() const { return _M_ht.begin(); } @@ -204,11 +203,11 @@ operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1, template <class _Key, class _Tp, class _HashFcn, class _EqualKey, class _Alloc> class hash_multimap { - // requirements: - __STL_CLASS_REQUIRES(_Key, _Assignable); - __STL_CLASS_REQUIRES(_Tp, _Assignable); - __STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Key); - __STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Key, _Key); + // concept requirements + glibcpp_class_requires(_Key, SGIAssignableConcept); + glibcpp_class_requires(_Tp, SGIAssignableConcept); + glibcpp_class_requires3(_HashFcn, size_t, _Key, UnaryFunctionConcept); + glibcpp_class_requires3(_EqualKey, _Key, _Key, BinaryPredicateConcept); private: typedef hashtable<pair<const _Key, _Tp>, _Key, _HashFcn, diff --git a/libstdc++-v3/include/ext/hash_set b/libstdc++-v3/include/ext/hash_set index aedf1b5f565..e99a884ba10 100644 --- a/libstdc++-v3/include/ext/hash_set +++ b/libstdc++-v3/include/ext/hash_set @@ -32,8 +32,7 @@ #define __SGI_STL_INTERNAL_HASH_SET_H #include <ext/stl_hashtable.h> - -#include <bits/concept_checks.h> +#include <bits/concept_check.h> namespace std { @@ -54,11 +53,10 @@ operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1, template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> class hash_set { - // requirements: - - __STL_CLASS_REQUIRES(_Value, _Assignable); - __STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Value); - __STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Value, _Value); + // concept requirements + glibcpp_class_requires(_Value, SGIAssignableConcept); + glibcpp_class_requires3(_HashFcn, size_t, _Value, UnaryFunctionConcept); + glibcpp_class_requires3(_EqualKey, _Value, _Value, BinaryPredicateConcept); private: typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, @@ -206,11 +204,10 @@ operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1, template <class _Value, class _HashFcn, class _EqualKey, class _Alloc> class hash_multiset { - // requirements: - - __STL_CLASS_REQUIRES(_Value, _Assignable); - __STL_CLASS_UNARY_FUNCTION_CHECK(_HashFcn, size_t, _Value); - __STL_CLASS_BINARY_FUNCTION_CHECK(_EqualKey, bool, _Value, _Value); + // concept requirements + glibcpp_class_requires(_Value, SGIAssignableConcept); + glibcpp_class_requires3(_HashFcn, size_t, _Value, UnaryFunctionConcept); + glibcpp_class_requires3(_EqualKey, _Value, _Value, BinaryPredicateConcept); private: typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, diff --git a/libstdc++-v3/include/ext/slist b/libstdc++-v3/include/ext/slist index 3c70c5cc1d5..68cbccc0d24 100644 --- a/libstdc++-v3/include/ext/slist +++ b/libstdc++-v3/include/ext/slist @@ -19,7 +19,7 @@ #ifndef __SGI_STL_INTERNAL_SLIST_H #define __SGI_STL_INTERNAL_SLIST_H -#include <bits/concept_checks.h> +#include <bits/concept_check.h> namespace std { @@ -257,9 +257,8 @@ _Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, template <class _Tp, class _Alloc = allocator<_Tp> > class slist : private _Slist_base<_Tp,_Alloc> { - // requirements: - - __STL_CLASS_REQUIRES(_Tp, _Assignable); + // concept requirements + glibcpp_class_requires(_Tp, SGIAssignableConcept); private: typedef _Slist_base<_Tp,_Alloc> _Base; diff --git a/libstdc++-v3/include/ext/stl_hashtable.h b/libstdc++-v3/include/ext/stl_hashtable.h index 1276b9591d9..aa87ba56ee8 100644 --- a/libstdc++-v3/include/ext/stl_hashtable.h +++ b/libstdc++-v3/include/ext/stl_hashtable.h @@ -353,13 +353,13 @@ public: template <class _InputIterator> void insert_unique(_InputIterator __f, _InputIterator __l) { - insert_unique(__f, __l, __ITERATOR_CATEGORY(__f)); + insert_unique(__f, __l, __iterator_category(__f)); } template <class _InputIterator> void insert_equal(_InputIterator __f, _InputIterator __l) { - insert_equal(__f, __l, __ITERATOR_CATEGORY(__f)); + insert_equal(__f, __l, __iterator_category(__f)); } template <class _InputIterator> |