+2007-10-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * docs/doxygen/user.cfg.in: Scan tr1_impl/hashtable.
+ * include/tr1_impl/hashtable: Correct comment.
+
+ * include/ext/hash_map: Remove extraneous public markers.
+ * include/ext/hash_set: Same.
+
+ * testsuite/25_algorithms/headers/parallel_algorithm.cc: Move
+ inside algorithm directory.
+ * testsuite/25_algorithms/headers/algorithm_parallel_mode.cc: Same.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed1.cc: Same.
+ * testsuite/25_algorithms/headers/parallel_algorithm_mixed2.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/parallel_algorithm.cc:
+ To this.
+ * testsuite/25_algorithms/headers/algorithm/
+ algorithm_parallel_mode.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/
+ parallel_algorithm_mixed1.cc: Same.
+ * testsuite/25_algorithms/headers/algorithm/
+ parallel_algorithm_mixed2.cc: Same.
+
+ * testsuite/21_strings/basic_string/requirements/
+ explicit_instantiation/debug.cc: Remove exception text.
+
+ * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
+ Fix for debug mode testing.
+ * testsuite/23_containers/vector/bool/capacity/29134.cc: Same.
+
2007-10-12 Jesper Nilsson <jesper.nilsson@axis.com>
* testsuite/tr1/5_numerical_facilities/special_functions/
include/tr1_impl/cwchar \
include/tr1_impl/cwctype \
include/tr1_impl/functional \
+ include/tr1_impl/hashtable \
include/tr1_impl/random \
include/tr1_impl/regex \
include/tr1_impl/tuple \
get_allocator() const
{ return _M_ht.get_allocator(); }
- public:
hash_map()
: _M_ht(100, hasher(), key_equal(), allocator_type()) {}
: _M_ht(__n, __hf, __eql, __a)
{ _M_ht.insert_unique(__f, __l); }
- public:
size_type
size() const
{ return _M_ht.size(); }
end() const
{ return _M_ht.end(); }
- public:
pair<iterator, bool>
insert(const value_type& __obj)
{ return _M_ht.insert_unique(__obj); }
get_allocator() const
{ return _M_ht.get_allocator(); }
- public:
hash_multimap()
: _M_ht(100, hasher(), key_equal(), allocator_type()) {}
: _M_ht(__n, __hf, __eql, __a)
{ _M_ht.insert_equal(__f, __l); }
- public:
size_type
size() const
{ return _M_ht.size(); }
end() const
{ return _M_ht.end(); }
- public:
iterator
insert(const value_type& __obj)
{ return _M_ht.insert_equal(__obj); }
clear()
{ _M_ht.clear(); }
- public:
void
resize(size_type __hint)
{ _M_ht.resize(__hint); }
get_allocator() const
{ return _M_ht.get_allocator(); }
- public:
hash_set()
: _M_ht(100, hasher(), key_equal(), allocator_type()) {}
: _M_ht(__n, __hf, __eql, __a)
{ _M_ht.insert_unique(__f, __l); }
- public:
size_type
size() const
{ return _M_ht.size(); }
end() const
{ return _M_ht.end(); }
- public:
pair<iterator, bool>
insert(const value_type& __obj)
{
clear()
{ _M_ht.clear(); }
- public:
void
resize(size_type __hint)
{ _M_ht.resize(__hint); }
get_allocator() const
{ return _M_ht.get_allocator(); }
- public:
hash_multiset()
: _M_ht(100, hasher(), key_equal(), allocator_type()) {}
: _M_ht(__n, __hf, __eql, __a)
{ _M_ht.insert_equal(__f, __l); }
- public:
size_type
size() const
{ return _M_ht.size(); }
end() const
{ return _M_ht.end(); }
- public:
iterator
insert(const value_type& __obj)
{ return _M_ht.insert_equal(__obj); }
clear()
{ _M_ht.clear(); }
- public:
void
resize(size_type __hint)
{ _M_ht.resize(__hint); }
// std::tr1::unordered_multiset, and std::tr1::unordered_multimap.
// hashtable has many template parameters, partly to accommodate
// the differences between those four classes and partly to
-// accommodate policy choices that go beyond what TR1 calls for.
+// accommodate policy choices that go beyond TR1 specifications.
// Class template hashtable attempts to encapsulate all reasonable
// variation among hash tables that use chaining. It does not handle
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
-// As a special exception, you may use this file as part of a free software
-// library without restriction. Specifically, if other files instantiate
-// templates or use macros or inline functions from this file, or you compile
-// this file and link it with other files to produce an executable, this
-// file does not by itself cause the resulting executable to be covered by
-// the GNU General Public License. This exception does not however
-// invalidate any other reasons why the executable file might be covered by
-// the GNU General Public License.
-
// This file tests explicit instantiation of basic_string
#include <debug/string>
{
bool test __attribute__((unused)) = true;
- std::vector<bool> vb;
+ using std::vector;
+ using std::numeric_limits;
+
+#ifndef _GLIBCXX_DEBUG
+ using std::_S_word_bit;
+#else
+ using std::_GLIBCXX_STD_D::_S_word_bit;
+#endif
// Actually, vector<bool> is special, see libstdc++/31370.
- typedef std::vector<bool>::difference_type difference_type;
+ vector<bool> vb;
+ typedef vector<bool>::difference_type difference_type;
VERIFY( vb.max_size()
- == (std::numeric_limits<difference_type>::max()
- - int(std::_S_word_bit) + 1) );
+ == (numeric_limits<difference_type>::max() - int(_S_word_bit) + 1) );
}
int main()
#include <stdexcept>
#include <testsuite_hooks.h>
+#ifndef _GLIBCXX_DEBUG
+ using std::_S_word_bit;
+#else
+ using std::_GLIBCXX_STD_D::_S_word_bit;
+#endif
+
inline void
check_cap_ge_size(const std::vector<bool>& x)
{
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- for(int i = 0; i < std::_S_word_bit; ++i)
+ for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
}
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- x.insert(x.end(), std::_S_word_bit, false);
+ x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
catch(std::bad_alloc&)
{
std::vector<bool> x;
x.resize(x.max_size() / 2 + 1, false);
- std::vector<bool> y(std::_S_word_bit, false);
+ std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
}
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- for(int i = 0; i < std::_S_word_bit; ++i)
+ x.resize(x.max_size() - _S_word_bit, false);
+ for(int i = 0; i < _S_word_bit; ++i)
x.push_back(false);
check_cap_ge_size(x);
}
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- x.insert(x.end(), std::_S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ x.insert(x.end(), _S_word_bit, false);
check_cap_ge_size(x);
}
catch(std::bad_alloc&)
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- std::vector<bool> y(std::_S_word_bit, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ std::vector<bool> y(_S_word_bit, false);
x.insert(x.end(), y.begin(), y.end());
check_cap_ge_size(x);
}
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- for(int i = 0; i < std::_S_word_bit + 1; ++i)
+ x.resize(x.max_size() - _S_word_bit, false);
+ for(int i = 0; i < _S_word_bit + 1; ++i)
x.push_back(false);
++myexit;
}
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- x.insert(x.end(), std::_S_word_bit + 1, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ x.insert(x.end(), _S_word_bit + 1, false);
++myexit;
}
catch(std::bad_alloc)
try
{
std::vector<bool> x;
- x.resize(x.max_size() - std::_S_word_bit, false);
- std::vector<bool> y(std::_S_word_bit + 1, false);
+ x.resize(x.max_size() - _S_word_bit, false);
+ std::vector<bool> y(_S_word_bit + 1, false);
x.insert(x.end(), y.begin(), y.end());
++myexit;
}