mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 11:57:15 +02:00
** empty log message **
[SVN r4139]
This commit is contained in:
@@ -79,7 +79,7 @@ namespace minimal
|
||||
|
||||
T* ptr_;
|
||||
|
||||
ptr(T* ptr) : ptr_(ptr) {}
|
||||
ptr(T* x) : ptr_(x) {}
|
||||
public:
|
||||
ptr() : ptr_(0) {}
|
||||
|
||||
|
@@ -244,9 +244,10 @@ void map_constructor_test(T* = 0)
|
||||
{
|
||||
std::cerr<<"map_constructor_test\n";
|
||||
|
||||
typedef std::list<std::pair<typename T::key_type, typename T::mapped_type> > list;
|
||||
typedef std::list<std::pair<BOOST_DEDUCED_TYPENAME T::key_type, BOOST_DEDUCED_TYPENAME T::mapped_type> > list;
|
||||
test::random_values<T> v(1000);
|
||||
list l(v.begin(), v.end());
|
||||
list l;
|
||||
std::copy(v.begin(), v.end(), std::back_inserter(l));
|
||||
|
||||
T x(l.begin(), l.end());
|
||||
|
||||
|
@@ -109,8 +109,10 @@ void two_equivalent_item_tests()
|
||||
template<class Range1, class Range2>
|
||||
bool compare(Range1 const& x, Range2 const& y)
|
||||
{
|
||||
list a(x.begin(), x.end());
|
||||
list b(y.begin(), y.end());
|
||||
list a;
|
||||
list b;
|
||||
std::copy(x.begin(), x.end(), std::back_inserter(a));
|
||||
std::copy(y.begin(), y.end(), std::back_inserter(b));
|
||||
a.sort();
|
||||
b.sort();
|
||||
return a == b;
|
||||
@@ -119,7 +121,8 @@ bool compare(Range1 const& x, Range2 const& y)
|
||||
template <class Container>
|
||||
bool general_erase_range_test(Container& x, int start, int end)
|
||||
{
|
||||
list l(x.begin(), x.end());
|
||||
list l;
|
||||
std::copy(x.begin(), x.end(), std::back_inserter(l));
|
||||
l.erase(boost::next(l.begin(), start), boost::next(l.begin(), end));
|
||||
x.erase(boost::next(x.begin(), start), boost::next(x.begin(), end));
|
||||
return compare(l, x);
|
||||
@@ -131,7 +134,8 @@ void erase_subrange_tests(Container const& x)
|
||||
for(std::size_t length = 0; length < x.size(); ++length) {
|
||||
for(std::size_t position = 0; position < x.size() - length; ++position) {
|
||||
Container y(x);
|
||||
list init(y.begin(), y.end());
|
||||
list init;
|
||||
std::copy(y.begin(), y.end(), std::back_inserter(init));
|
||||
if(!general_erase_range_test(y, position, position + length)) {
|
||||
BOOST_ERROR("general_erase_range_test failed.");
|
||||
std::cout<<"Erase: ["<<position<<","<<position + length<<")\n";
|
||||
|
@@ -247,9 +247,10 @@ void associative_insert_range_test(X* = 0)
|
||||
{
|
||||
std::cerr<<"associative_insert_range_test\n";
|
||||
|
||||
typedef std::list<std::pair<typename X::key_type, typename X::mapped_type> > list;
|
||||
typedef std::list<std::pair<BOOST_DEDUCED_TYPENAME X::key_type, BOOST_DEDUCED_TYPENAME X::mapped_type> > list;
|
||||
test::random_values<X> v(1000);
|
||||
list l(v.begin(), v.end());
|
||||
list l;
|
||||
std::copy(v.begin(), v.end(), std::back_inserter(l));
|
||||
|
||||
X x; x.insert(l.begin(), l.end());
|
||||
|
||||
|
@@ -16,10 +16,18 @@ private:
|
||||
count_copies& operator=(count_copies const&);
|
||||
};
|
||||
|
||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
namespace boost {
|
||||
#endif
|
||||
|
||||
std::size_t hash_value(count_copies const& x) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
}
|
||||
#endif
|
||||
|
||||
bool operator==(count_copies const& x, count_copies const& y) {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user