diff options
author | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-19 23:57:23 +0000 |
---|---|---|
committer | austern <austern@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-19 23:57:23 +0000 |
commit | 7551ecd5ab66c585de668cf9f27a7aa1ebd22af3 (patch) | |
tree | 90f48cdddc22353dd11ce9358af399d723af5643 /libstdc++-v3/include/tr1/functional | |
parent | be263d894164c64a9d04252fc431d3944505636c (diff) | |
download | gcc-7551ecd5ab66c585de668cf9f27a7aa1ebd22af3.tar.gz |
* include/tr1/functional (tr1_hashtable_define_trivial_hash): Make
hash<T>::operator() a const member function for T a fundamental type
* include/tr1/hashtable (extract1st::operator()): Declare const.
(hash_code_base): Declare all member functions const
(hashtable::find): fix call to this->bucket_count()
(hashtable::count): Likewise.
(hashtable::equal_range): m_incr_bucket applies to iterator, not node.
* testsuite/tr1/6_containers/unordered/find/set1.cc: New test.
* testsuite/tr1/6_containers/unordered/find/map1.cc: New test.
* testsuite/tr1/6_containers/unordered/find/multimap1.cc: New test.
* testsuite/tr1/6_containers/unordered/find/multiset1.cc: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95293 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/tr1/functional')
-rw-r--r-- | libstdc++-v3/include/tr1/functional | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional index d3d681cf01f..0323b962d3f 100644 --- a/libstdc++-v3/include/tr1/functional +++ b/libstdc++-v3/include/tr1/functional @@ -88,7 +88,7 @@ namespace tr1 #define tr1_hashtable_define_trivial_hash(T) \ template <> struct hash<T> { \ - std::size_t operator()(T val) { return static_cast<std::size_t>(val); } \ + std::size_t operator()(T val) const { return static_cast<std::size_t>(val); } \ } \ tr1_hashtable_define_trivial_hash(bool); |