Fixing whitespace problems

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2010-08-22 00:15:28 +00:00
parent eb564e76cc
commit 6046aced82
268 changed files with 574 additions and 585 deletions

View File

@ -6,4 +6,4 @@ class Copyable
public: public:
}; };
#endif #endif // COPYABLE_H

View File

@ -23,4 +23,4 @@ public:
int DefaultOnly::count = 0; int DefaultOnly::count = 0;
#endif #endif // DEFAULTONLY_H

View File

@ -40,6 +40,6 @@ struct hash<Emplaceable>
} }
#endif #endif // _LIBCPP_MOVE
#endif #endif // EMPLACEABLE_H

View File

@ -21,8 +21,8 @@ public:
int get() const {return data_;} int get() const {return data_;}
bool operator==(const MoveOnly& x) const {return data_ == x.data_;} bool operator==(const MoveOnly& x) const {return data_ == x.data_;}
bool operator< (const MoveOnly& x) const {return data_ < x.data_;} bool operator< (const MoveOnly& x) const {return data_ < x.data_;}
}; };
namespace std { namespace std {
@ -36,6 +36,6 @@ struct hash<MoveOnly>
} }
#endif #endif // _LIBCPP_MOVE
#endif #endif // MOVEONLY_H

View File

@ -27,4 +27,4 @@ struct hash<NotConstructible>
} }
#endif #endif // NOTCONSTRUCTIBLE_H

View File

@ -34,5 +34,5 @@ int main()
m[6] = 6.5; m[6] = 6.5;
assert(m[6] == 6.5); assert(m[6] == 6.5);
assert(m.size() == 2); assert(m.size() == 2);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -15,12 +15,12 @@
// const_iterator begin() const; // const_iterator begin() const;
// iterator end(); // iterator end();
// const_iterator end() const; // const_iterator end() const;
// //
// reverse_iterator rbegin(); // reverse_iterator rbegin();
// const_reverse_iterator rbegin() const; // const_reverse_iterator rbegin() const;
// reverse_iterator rend(); // reverse_iterator rend();
// const_reverse_iterator rend() const; // const_reverse_iterator rend() const;
// //
// const_iterator cbegin() const; // const_iterator cbegin() const;
// const_iterator cend() const; // const_iterator cend() const;
// const_reverse_iterator crbegin() const; // const_reverse_iterator crbegin() const;

View File

@ -24,7 +24,7 @@ int main()
{ {
{20, 1}, {20, 1},
}; };
m = m =
{ {
{1, 1}, {1, 1},
{1, 1.5}, {1, 1.5},
@ -41,5 +41,5 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -46,7 +46,7 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -81,7 +81,7 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -90,5 +90,5 @@ int main()
assert(*next(mo.begin()) == V(2, 1)); assert(*next(mo.begin()) == V(2, 1));
assert(*next(mo.begin(), 2) == V(3, 1)); assert(*next(mo.begin(), 2) == V(3, 1));
} }
#endif #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
} }

View File

@ -47,7 +47,7 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -82,7 +82,7 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);

View File

@ -37,5 +37,5 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -39,5 +39,5 @@ int main()
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(m.key_comp() == C(3)); assert(m.key_comp() == C(3));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -42,5 +42,5 @@ int main()
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(m.key_comp() == C(3)); assert(m.key_comp() == C(3));
assert(m.get_allocator() == A(6)); assert(m.get_allocator() == A(6));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -32,7 +32,7 @@ int main()
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(m.size() == 0); assert(m.size() == 0);
assert(distance(m.begin(), m.end()) == 0); assert(distance(m.begin(), m.end()) == 0);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
@ -62,11 +62,11 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
assert(distance(mo.begin(), mo.end()) == 0); assert(distance(mo.begin(), mo.end()) == 0);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -140,5 +140,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -143,5 +143,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -85,5 +85,5 @@ int main()
assert(m.begin()->first == 2); assert(m.begin()->first == 2);
assert(m.begin()->second == 3.5); assert(m.begin()->second == 3.5);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -78,5 +78,5 @@ int main()
assert(m.begin()->first == 2); assert(m.begin()->first == 2);
assert(m.begin()->second == 3.5); assert(m.begin()->second == 3.5);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -39,5 +39,5 @@ int main()
assert(*m.begin() == V(1, 1)); assert(*m.begin() == V(1, 1));
assert(*next(m.begin()) == V(2, 1)); assert(*next(m.begin()) == V(2, 1));
assert(*next(m.begin(), 2) == V(3, 1)); assert(*next(m.begin(), 2) == V(3, 1));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -51,5 +51,5 @@ int main()
assert(r->first == 3); assert(r->first == 3);
assert(r->second == 3); assert(r->second == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -54,5 +54,5 @@ int main()
assert(r.first->first == 3); assert(r.first->first == 3);
assert(r.first->second == 3); assert(r.first->second == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -15,12 +15,12 @@
// const_iterator begin() const; // const_iterator begin() const;
// iterator end(); // iterator end();
// const_iterator end() const; // const_iterator end() const;
// //
// reverse_iterator rbegin(); // reverse_iterator rbegin();
// const_reverse_iterator rbegin() const; // const_reverse_iterator rbegin() const;
// reverse_iterator rend(); // reverse_iterator rend();
// const_reverse_iterator rend() const; // const_reverse_iterator rend() const;
// //
// const_iterator cbegin() const; // const_iterator cbegin() const;
// const_iterator cend() const; // const_iterator cend() const;
// const_reverse_iterator crbegin() const; // const_reverse_iterator crbegin() const;

View File

@ -22,7 +22,7 @@ int main()
typedef std::multimap<int, double> C; typedef std::multimap<int, double> C;
typedef C::value_type V; typedef C::value_type V;
C m = {{20, 1}}; C m = {{20, 1}};
m = m =
{ {
{1, 1}, {1, 1},
{1, 1.5}, {1, 1.5},
@ -46,5 +46,5 @@ int main()
assert(*++i == V(3, 1)); assert(*++i == V(3, 1));
assert(*++i == V(3, 1.5)); assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2)); assert(*++i == V(3, 2));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -42,7 +42,7 @@ int main()
assert(m == mo); assert(m == mo);
assert(m.get_allocator() == A(7)); assert(m.get_allocator() == A(7));
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
} }
@ -68,9 +68,9 @@ int main()
assert(m == mo); assert(m == mo);
assert(m.get_allocator() == A(-2)); assert(m.get_allocator() == A(-2));
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
} }
#endif #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
} }

View File

@ -43,7 +43,7 @@ int main()
assert(m == mo); assert(m == mo);
assert(m.get_allocator() == A(7)); assert(m.get_allocator() == A(7));
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
} }
@ -69,7 +69,7 @@ int main()
assert(m == mo); assert(m == mo);
assert(m.get_allocator() == A(2)); assert(m.get_allocator() == A(2));
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
} }

View File

@ -45,5 +45,5 @@ int main()
assert(*++i == V(3, 1)); assert(*++i == V(3, 1));
assert(*++i == V(3, 1.5)); assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2)); assert(*++i == V(3, 2));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -50,5 +50,5 @@ int main()
assert(*++i == V(3, 1.5)); assert(*++i == V(3, 1.5));
assert(*++i == V(3, 2)); assert(*++i == V(3, 2));
assert(m.key_comp() == Cmp(4)); assert(m.key_comp() == Cmp(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -53,5 +53,5 @@ int main()
assert(*++i == V(3, 2)); assert(*++i == V(3, 2));
assert(m.key_comp() == Cmp(4)); assert(m.key_comp() == Cmp(4));
assert(m.get_allocator() == A(5)); assert(m.get_allocator() == A(5));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -32,7 +32,7 @@ int main()
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(m.size() == 0); assert(m.size() == 0);
assert(distance(m.begin(), m.end()) == 0); assert(distance(m.begin(), m.end()) == 0);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
@ -68,11 +68,11 @@ int main()
assert(*next(m.begin(), 6) == V(3, 1)); assert(*next(m.begin(), 6) == V(3, 1));
assert(*next(m.begin(), 7) == V(3, 1.5)); assert(*next(m.begin(), 7) == V(3, 1.5));
assert(*next(m.begin(), 8) == V(3, 2)); assert(*next(m.begin(), 8) == V(3, 2));
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
assert(distance(mo.begin(), mo.end()) == 0); assert(distance(mo.begin(), mo.end()) == 0);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -140,5 +140,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -143,5 +143,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -78,5 +78,5 @@ int main()
assert(m.begin()->first == 2); assert(m.begin()->first == 2);
assert(m.begin()->second == 3.5); assert(m.begin()->second == 3.5);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -78,5 +78,5 @@ int main()
assert(m.begin()->first == 2); assert(m.begin()->first == 2);
assert(m.begin()->second == 3.5); assert(m.begin()->second == 3.5);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -49,5 +49,5 @@ int main()
assert(*++i == V(3, 1)); assert(*++i == V(3, 1));
assert(*++i == V(3, 2)); assert(*++i == V(3, 2));
assert(*++i == V(3, 1.5)); assert(*++i == V(3, 1.5));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -51,5 +51,5 @@ int main()
assert(r->first == 3); assert(r->first == 3);
assert(r->second == 2); assert(r->second == 2);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -50,5 +50,5 @@ int main()
assert(r->first == 3); assert(r->first == 3);
assert(r->second == 3); assert(r->second == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -67,5 +67,5 @@ int main()
assert(m.size() == 1); assert(m.size() == 1);
assert(*r == 2); assert(*r == 2);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -67,5 +67,5 @@ int main()
assert(m.size() == 1); assert(m.size() == 1);
assert(*r == 2); assert(*r == 2);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -34,5 +34,5 @@ int main()
assert(*++i == V(6)); assert(*++i == V(6));
assert(*++i == V(8)); assert(*++i == V(8));
assert(*++i == V(10)); assert(*++i == V(10));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -45,5 +45,5 @@ int main()
assert(m.size() == 4); assert(m.size() == 4);
assert(*r == 3); assert(*r == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -45,5 +45,5 @@ int main()
assert(m.size() == 4); assert(m.size() == 4);
assert(*r == 3); assert(*r == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -15,12 +15,12 @@
// const_iterator begin() const; // const_iterator begin() const;
// iterator end(); // iterator end();
// const_iterator end() const; // const_iterator end() const;
// //
// reverse_iterator rbegin(); // reverse_iterator rbegin();
// const_reverse_iterator rbegin() const; // const_reverse_iterator rbegin() const;
// reverse_iterator rend(); // reverse_iterator rend();
// const_reverse_iterator rend() const; // const_reverse_iterator rend() const;
// //
// const_iterator cbegin() const; // const_iterator cbegin() const;
// const_iterator cend() const; // const_iterator cend() const;
// const_reverse_iterator crbegin() const; // const_reverse_iterator crbegin() const;

View File

@ -32,5 +32,5 @@ int main()
assert(*++i == V(4)); assert(*++i == V(4));
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -52,7 +52,7 @@ int main()
assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 6) == 3);
assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3); assert(*next(m.begin(), 8) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 9); assert(mo.size() == 9);
@ -99,7 +99,7 @@ int main()
assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 6) == 3);
assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3); assert(*next(m.begin(), 8) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 9); assert(mo.size() == 9);
@ -114,5 +114,5 @@ int main()
assert(*next(mo.begin(), 7) == 3); assert(*next(mo.begin(), 7) == 3);
assert(*next(mo.begin(), 8) == 3); assert(*next(mo.begin(), 8) == 3);
} }
#endif #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
} }

View File

@ -53,7 +53,7 @@ int main()
assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 6) == 3);
assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3); assert(*next(m.begin(), 8) == 3);
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 9); assert(mo.size() == 9);
@ -100,7 +100,7 @@ int main()
assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 6) == 3);
assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3); assert(*next(m.begin(), 8) == 3);
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 9); assert(mo.size() == 9);

View File

@ -31,5 +31,5 @@ int main()
assert(*++i == V(4)); assert(*++i == V(4));
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -34,5 +34,5 @@ int main()
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
assert(m.key_comp() == Cmp(10)); assert(m.key_comp() == Cmp(10));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -37,5 +37,5 @@ int main()
assert(*++i == V(6)); assert(*++i == V(6));
assert(m.key_comp() == Cmp(10)); assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4)); assert(m.get_allocator() == A(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -32,7 +32,7 @@ int main()
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(m.size() == 0); assert(m.size() == 0);
assert(distance(m.begin(), m.end()) == 0); assert(distance(m.begin(), m.end()) == 0);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
@ -69,11 +69,11 @@ int main()
assert(*next(m.begin(), 6) == 3); assert(*next(m.begin(), 6) == 3);
assert(*next(m.begin(), 7) == 3); assert(*next(m.begin(), 7) == 3);
assert(*next(m.begin(), 8) == 3); assert(*next(m.begin(), 8) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
assert(distance(mo.begin(), mo.end()) == 0); assert(distance(mo.begin(), mo.end()) == 0);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -137,5 +137,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -140,5 +140,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -73,5 +73,5 @@ int main()
assert(m.size() == 1); assert(m.size() == 1);
assert(*r.first == 2); assert(*r.first == 2);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -67,5 +67,5 @@ int main()
assert(m.size() == 1); assert(m.size() == 1);
assert(*r == 2); assert(*r == 2);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -34,5 +34,5 @@ int main()
assert(*++i == V(6)); assert(*++i == V(6));
assert(*++i == V(8)); assert(*++i == V(8));
assert(*++i == V(10)); assert(*++i == V(10));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -45,5 +45,5 @@ int main()
assert(m.size() == 3); assert(m.size() == 3);
assert(*r == 3); assert(*r == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -49,5 +49,5 @@ int main()
assert(m.size() == 3); assert(m.size() == 3);
assert(*r.first == 3); assert(*r.first == 3);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -15,12 +15,12 @@
// const_iterator begin() const; // const_iterator begin() const;
// iterator end(); // iterator end();
// const_iterator end() const; // const_iterator end() const;
// //
// reverse_iterator rbegin(); // reverse_iterator rbegin();
// const_reverse_iterator rbegin() const; // const_reverse_iterator rbegin() const;
// reverse_iterator rend(); // reverse_iterator rend();
// const_reverse_iterator rend() const; // const_reverse_iterator rend() const;
// //
// const_iterator cbegin() const; // const_iterator cbegin() const;
// const_iterator cend() const; // const_iterator cend() const;
// const_reverse_iterator crbegin() const; // const_reverse_iterator crbegin() const;

View File

@ -32,5 +32,5 @@ int main()
assert(*++i == V(4)); assert(*++i == V(4));
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -46,7 +46,7 @@ int main()
assert(*m.begin() == 1); assert(*m.begin() == 1);
assert(*next(m.begin()) == 2); assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3); assert(*next(m.begin(), 2) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -81,7 +81,7 @@ int main()
assert(*m.begin() == 1); assert(*m.begin() == 1);
assert(*next(m.begin()) == 2); assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3); assert(*next(m.begin(), 2) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -90,5 +90,5 @@ int main()
assert(*next(mo.begin()) == 2); assert(*next(mo.begin()) == 2);
assert(*next(mo.begin(), 2) == 3); assert(*next(mo.begin(), 2) == 3);
} }
#endif #endif // _LIBCPP_HAS_NO_ADVANCED_SFINAE
} }

View File

@ -47,7 +47,7 @@ int main()
assert(*m.begin() == 1); assert(*m.begin() == 1);
assert(*next(m.begin()) == 2); assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3); assert(*next(m.begin(), 2) == 3);
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);
@ -82,7 +82,7 @@ int main()
assert(*m.begin() == 1); assert(*m.begin() == 1);
assert(*next(m.begin()) == 2); assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3); assert(*next(m.begin(), 2) == 3);
assert(mo.get_allocator() == A(2)); assert(mo.get_allocator() == A(2));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 3); assert(mo.size() == 3);

View File

@ -31,5 +31,5 @@ int main()
assert(*++i == V(4)); assert(*++i == V(4));
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -34,5 +34,5 @@ int main()
assert(*++i == V(5)); assert(*++i == V(5));
assert(*++i == V(6)); assert(*++i == V(6));
assert(m.key_comp() == Cmp(10)); assert(m.key_comp() == Cmp(10));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -37,5 +37,5 @@ int main()
assert(*++i == V(6)); assert(*++i == V(6));
assert(m.key_comp() == Cmp(10)); assert(m.key_comp() == Cmp(10));
assert(m.get_allocator() == A(4)); assert(m.get_allocator() == A(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -32,7 +32,7 @@ int main()
assert(m.key_comp() == C(5)); assert(m.key_comp() == C(5));
assert(m.size() == 0); assert(m.size() == 0);
assert(distance(m.begin(), m.end()) == 0); assert(distance(m.begin(), m.end()) == 0);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
@ -63,11 +63,11 @@ int main()
assert(*m.begin() == 1); assert(*m.begin() == 1);
assert(*next(m.begin()) == 2); assert(*next(m.begin()) == 2);
assert(*next(m.begin(), 2) == 3); assert(*next(m.begin(), 2) == 3);
assert(mo.get_allocator() == A(7)); assert(mo.get_allocator() == A(7));
assert(mo.key_comp() == C(5)); assert(mo.key_comp() == C(5));
assert(mo.size() == 0); assert(mo.size() == 0);
assert(distance(mo.begin(), mo.end()) == 0); assert(distance(mo.begin(), mo.end()) == 0);
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -137,5 +137,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -140,5 +140,5 @@ int main()
assert(m3.key_comp() == C(5)); assert(m3.key_comp() == C(5));
assert(m1.empty()); assert(m1.empty());
} }
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -36,50 +36,50 @@ test1()
Node b; Node b;
Node c; Node c;
Node d; Node d;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &a; b.__left_ = &a;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = 0; d.__left_ = 0;
d.__right_ = 0; d.__right_ = 0;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &b; a.__parent_ = &b;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = 0; a.__right_ = 0;
a.__is_black_ = false; a.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == &a); assert(b.__left_ == &a);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == 0); assert(d.__left_ == 0);
assert(d.__right_ == 0); assert(d.__right_ == 0);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -91,50 +91,50 @@ test1()
Node b; Node b;
Node c; Node c;
Node d; Node d;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = &a; b.__right_ = &a;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = 0; d.__left_ = 0;
d.__right_ = 0; d.__right_ = 0;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &b; a.__parent_ = &b;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = 0; a.__right_ = 0;
a.__is_black_ = false; a.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__right_ == &a); assert(b.__right_ == &a);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == 0); assert(d.__left_ == 0);
assert(d.__right_ == 0); assert(d.__right_ == 0);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -146,50 +146,50 @@ test1()
Node b; Node b;
Node c; Node c;
Node d; Node d;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = &a; d.__left_ = &a;
d.__right_ = 0; d.__right_ = 0;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &d; a.__parent_ = &d;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = 0; a.__right_ = 0;
a.__is_black_ = false; a.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == &a); assert(d.__left_ == &a);
assert(d.__right_ == 0); assert(d.__right_ == 0);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &d); assert(a.__parent_ == &d);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -201,50 +201,50 @@ test1()
Node b; Node b;
Node c; Node c;
Node d; Node d;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = 0; d.__left_ = 0;
d.__right_ = &a; d.__right_ = &a;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &d; a.__parent_ = &d;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = 0; a.__right_ = 0;
a.__is_black_ = false; a.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == 0); assert(d.__left_ == 0);
assert(d.__right_ == &a); assert(d.__right_ == &a);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &d); assert(a.__parent_ == &d);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -261,24 +261,24 @@ test1()
Node g; Node g;
Node h; Node h;
Node i; Node i;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &a; b.__left_ = &a;
b.__right_ = &g; b.__right_ = &g;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = &h; d.__left_ = &h;
d.__right_ = &i; d.__right_ = &i;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &b; a.__parent_ = &b;
a.__left_ = &e; a.__left_ = &e;
a.__right_ = &f; a.__right_ = &f;
@ -286,40 +286,40 @@ test1()
e.__parent_ = &a; e.__parent_ = &a;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &a; f.__parent_ = &a;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &b; g.__parent_ = &b;
g.__is_black_ = true; g.__is_black_ = true;
h.__parent_ = &d; h.__parent_ = &d;
h.__is_black_ = true; h.__is_black_ = true;
i.__parent_ = &d; i.__parent_ = &d;
i.__is_black_ = true; i.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == &a); assert(b.__left_ == &a);
assert(b.__right_ == &g); assert(b.__right_ == &g);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == &h); assert(d.__left_ == &h);
assert(d.__right_ == &i); assert(d.__right_ == &i);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &e); assert(a.__left_ == &e);
assert(a.__right_ == &f); assert(a.__right_ == &f);
@ -336,24 +336,24 @@ test1()
Node g; Node g;
Node h; Node h;
Node i; Node i;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &g; b.__left_ = &g;
b.__right_ = &a; b.__right_ = &a;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = &h; d.__left_ = &h;
d.__right_ = &i; d.__right_ = &i;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &b; a.__parent_ = &b;
a.__left_ = &e; a.__left_ = &e;
a.__right_ = &f; a.__right_ = &f;
@ -361,40 +361,40 @@ test1()
e.__parent_ = &a; e.__parent_ = &a;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &a; f.__parent_ = &a;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &b; g.__parent_ = &b;
g.__is_black_ = true; g.__is_black_ = true;
h.__parent_ = &d; h.__parent_ = &d;
h.__is_black_ = true; h.__is_black_ = true;
i.__parent_ = &d; i.__parent_ = &d;
i.__is_black_ = true; i.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == &g); assert(b.__left_ == &g);
assert(b.__right_ == &a); assert(b.__right_ == &a);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == &h); assert(d.__left_ == &h);
assert(d.__right_ == &i); assert(d.__right_ == &i);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &e); assert(a.__left_ == &e);
assert(a.__right_ == &f); assert(a.__right_ == &f);
@ -411,24 +411,24 @@ test1()
Node g; Node g;
Node h; Node h;
Node i; Node i;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &g; b.__left_ = &g;
b.__right_ = &h; b.__right_ = &h;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = &a; d.__left_ = &a;
d.__right_ = &i; d.__right_ = &i;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &d; a.__parent_ = &d;
a.__left_ = &e; a.__left_ = &e;
a.__right_ = &f; a.__right_ = &f;
@ -436,40 +436,40 @@ test1()
e.__parent_ = &a; e.__parent_ = &a;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &a; f.__parent_ = &a;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &b; g.__parent_ = &b;
g.__is_black_ = true; g.__is_black_ = true;
h.__parent_ = &b; h.__parent_ = &b;
h.__is_black_ = true; h.__is_black_ = true;
i.__parent_ = &d; i.__parent_ = &d;
i.__is_black_ = true; i.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == &g); assert(b.__left_ == &g);
assert(b.__right_ == &h); assert(b.__right_ == &h);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == &a); assert(d.__left_ == &a);
assert(d.__right_ == &i); assert(d.__right_ == &i);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &d); assert(a.__parent_ == &d);
assert(a.__left_ == &e); assert(a.__left_ == &e);
assert(a.__right_ == &f); assert(a.__right_ == &f);
@ -486,24 +486,24 @@ test1()
Node g; Node g;
Node h; Node h;
Node i; Node i;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &d; c.__right_ = &d;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &g; b.__left_ = &g;
b.__right_ = &h; b.__right_ = &h;
b.__is_black_ = false; b.__is_black_ = false;
d.__parent_ = &c; d.__parent_ = &c;
d.__left_ = &i; d.__left_ = &i;
d.__right_ = &a; d.__right_ = &a;
d.__is_black_ = false; d.__is_black_ = false;
a.__parent_ = &d; a.__parent_ = &d;
a.__left_ = &e; a.__left_ = &e;
a.__right_ = &f; a.__right_ = &f;
@ -511,40 +511,40 @@ test1()
e.__parent_ = &a; e.__parent_ = &a;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &a; f.__parent_ = &a;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &b; g.__parent_ = &b;
g.__is_black_ = true; g.__is_black_ = true;
h.__parent_ = &b; h.__parent_ = &b;
h.__is_black_ = true; h.__is_black_ = true;
i.__parent_ = &d; i.__parent_ = &d;
i.__is_black_ = true; i.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &c); assert(root.__left_ == &c);
assert(c.__parent_ == &root); assert(c.__parent_ == &root);
assert(c.__left_ == &b); assert(c.__left_ == &b);
assert(c.__right_ == &d); assert(c.__right_ == &d);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(b.__parent_ == &c); assert(b.__parent_ == &c);
assert(b.__left_ == &g); assert(b.__left_ == &g);
assert(b.__right_ == &h); assert(b.__right_ == &h);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(d.__parent_ == &c); assert(d.__parent_ == &c);
assert(d.__left_ == &i); assert(d.__left_ == &i);
assert(d.__right_ == &a); assert(d.__right_ == &a);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(a.__parent_ == &d); assert(a.__parent_ == &d);
assert(a.__left_ == &e); assert(a.__left_ == &e);
assert(a.__right_ == &f); assert(a.__right_ == &f);
@ -560,35 +560,35 @@ test2()
Node a; Node a;
Node b; Node b;
Node c; Node c;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &a; c.__left_ = &a;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
a.__parent_ = &c; a.__parent_ = &c;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = &b; a.__right_ = &b;
a.__is_black_ = false; a.__is_black_ = false;
b.__parent_ = &a; b.__parent_ = &a;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &b); std::__tree_balance_after_insert(root.__left_, &b);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -604,30 +604,30 @@ test2()
Node a; Node a;
Node b; Node b;
Node c; Node c;
root.__left_ = &a; root.__left_ = &a;
a.__parent_ = &root; a.__parent_ = &root;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = &c; a.__right_ = &c;
a.__is_black_ = true; a.__is_black_ = true;
c.__parent_ = &a; c.__parent_ = &a;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = false; c.__is_black_ = false;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &b); std::__tree_balance_after_insert(root.__left_, &b);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -637,7 +637,7 @@ test2()
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(b.__parent_ == &root); assert(b.__parent_ == &root);
assert(b.__left_ == &a); assert(b.__left_ == &a);
assert(b.__right_ == &c); assert(b.__right_ == &c);
@ -652,19 +652,19 @@ test2()
Node e; Node e;
Node f; Node f;
Node g; Node g;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &a; c.__left_ = &a;
c.__right_ = &g; c.__right_ = &g;
c.__is_black_ = true; c.__is_black_ = true;
a.__parent_ = &c; a.__parent_ = &c;
a.__left_ = &d; a.__left_ = &d;
a.__right_ = &b; a.__right_ = &b;
a.__is_black_ = false; a.__is_black_ = false;
b.__parent_ = &a; b.__parent_ = &a;
b.__left_ = &e; b.__left_ = &e;
b.__right_ = &f; b.__right_ = &f;
@ -672,27 +672,27 @@ test2()
d.__parent_ = &a; d.__parent_ = &a;
d.__is_black_ = true; d.__is_black_ = true;
e.__parent_ = &b; e.__parent_ = &b;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &b; f.__parent_ = &b;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &c; g.__parent_ = &c;
g.__is_black_ = true; g.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &b); std::__tree_balance_after_insert(root.__left_, &b);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == &f); assert(c.__left_ == &f);
assert(c.__right_ == &g); assert(c.__right_ == &g);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &d); assert(a.__left_ == &d);
assert(a.__right_ == &e); assert(a.__right_ == &e);
@ -724,19 +724,19 @@ test2()
Node e; Node e;
Node f; Node f;
Node g; Node g;
root.__left_ = &a; root.__left_ = &a;
a.__parent_ = &root; a.__parent_ = &root;
a.__left_ = &d; a.__left_ = &d;
a.__right_ = &c; a.__right_ = &c;
a.__is_black_ = true; a.__is_black_ = true;
c.__parent_ = &a; c.__parent_ = &a;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &g; c.__right_ = &g;
c.__is_black_ = false; c.__is_black_ = false;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &e; b.__left_ = &e;
b.__right_ = &f; b.__right_ = &f;
@ -744,27 +744,27 @@ test2()
d.__parent_ = &a; d.__parent_ = &a;
d.__is_black_ = true; d.__is_black_ = true;
e.__parent_ = &b; e.__parent_ = &b;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &b; f.__parent_ = &b;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &c; g.__parent_ = &c;
g.__is_black_ = true; g.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &b); std::__tree_balance_after_insert(root.__left_, &b);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == &f); assert(c.__left_ == &f);
assert(c.__right_ == &g); assert(c.__right_ == &g);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &d); assert(a.__left_ == &d);
assert(a.__right_ == &e); assert(a.__right_ == &e);
@ -797,35 +797,35 @@ test3()
Node a; Node a;
Node b; Node b;
Node c; Node c;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &a; b.__left_ = &a;
b.__right_ = 0; b.__right_ = 0;
b.__is_black_ = false; b.__is_black_ = false;
a.__parent_ = &b; a.__parent_ = &b;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = 0; a.__right_ = 0;
a.__is_black_ = false; a.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -841,30 +841,30 @@ test3()
Node a; Node a;
Node b; Node b;
Node c; Node c;
root.__left_ = &a; root.__left_ = &a;
a.__parent_ = &root; a.__parent_ = &root;
a.__left_ = 0; a.__left_ = 0;
a.__right_ = &b; a.__right_ = &b;
a.__is_black_ = true; a.__is_black_ = true;
b.__parent_ = &a; b.__parent_ = &a;
b.__left_ = 0; b.__left_ = 0;
b.__right_ = &c; b.__right_ = &c;
b.__is_black_ = false; b.__is_black_ = false;
c.__parent_ = &b; c.__parent_ = &b;
c.__left_ = 0; c.__left_ = 0;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = false; c.__is_black_ = false;
std::__tree_balance_after_insert(root.__left_, &c); std::__tree_balance_after_insert(root.__left_, &c);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == 0); assert(a.__left_ == 0);
assert(a.__right_ == 0); assert(a.__right_ == 0);
@ -874,7 +874,7 @@ test3()
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(b.__parent_ == &root); assert(b.__parent_ == &root);
assert(b.__left_ == &a); assert(b.__left_ == &a);
assert(b.__right_ == &c); assert(b.__right_ == &c);
@ -889,14 +889,14 @@ test3()
Node e; Node e;
Node f; Node f;
Node g; Node g;
root.__left_ = &c; root.__left_ = &c;
c.__parent_ = &root; c.__parent_ = &root;
c.__left_ = &b; c.__left_ = &b;
c.__right_ = &g; c.__right_ = &g;
c.__is_black_ = true; c.__is_black_ = true;
b.__parent_ = &c; b.__parent_ = &c;
b.__left_ = &a; b.__left_ = &a;
b.__right_ = &f; b.__right_ = &f;
@ -906,30 +906,30 @@ test3()
a.__left_ = &d; a.__left_ = &d;
a.__right_ = &e; a.__right_ = &e;
a.__is_black_ = false; a.__is_black_ = false;
d.__parent_ = &a; d.__parent_ = &a;
d.__is_black_ = true; d.__is_black_ = true;
e.__parent_ = &a; e.__parent_ = &a;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &b; f.__parent_ = &b;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &c; g.__parent_ = &c;
g.__is_black_ = true; g.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &a); std::__tree_balance_after_insert(root.__left_, &a);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == &f); assert(c.__left_ == &f);
assert(c.__right_ == &g); assert(c.__right_ == &g);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &d); assert(a.__left_ == &d);
assert(a.__right_ == &e); assert(a.__right_ == &e);
@ -961,14 +961,14 @@ test3()
Node e; Node e;
Node f; Node f;
Node g; Node g;
root.__left_ = &a; root.__left_ = &a;
a.__parent_ = &root; a.__parent_ = &root;
a.__left_ = &d; a.__left_ = &d;
a.__right_ = &b; a.__right_ = &b;
a.__is_black_ = true; a.__is_black_ = true;
b.__parent_ = &a; b.__parent_ = &a;
b.__left_ = &e; b.__left_ = &e;
b.__right_ = &c; b.__right_ = &c;
@ -978,30 +978,30 @@ test3()
c.__left_ = &f; c.__left_ = &f;
c.__right_ = &g; c.__right_ = &g;
c.__is_black_ = false; c.__is_black_ = false;
d.__parent_ = &a; d.__parent_ = &a;
d.__is_black_ = true; d.__is_black_ = true;
e.__parent_ = &b; e.__parent_ = &b;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &c; f.__parent_ = &c;
f.__is_black_ = true; f.__is_black_ = true;
g.__parent_ = &c; g.__parent_ = &c;
g.__is_black_ = true; g.__is_black_ = true;
std::__tree_balance_after_insert(root.__left_, &c); std::__tree_balance_after_insert(root.__left_, &c);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__left_ == &b); assert(root.__left_ == &b);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == &f); assert(c.__left_ == &f);
assert(c.__right_ == &g); assert(c.__right_ == &g);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(a.__parent_ == &b); assert(a.__parent_ == &b);
assert(a.__left_ == &d); assert(a.__left_ == &d);
assert(a.__right_ == &e); assert(a.__right_ == &e);

View File

@ -39,57 +39,57 @@ test1()
Node d; Node d;
Node e; Node e;
Node y; Node y;
root.__left_ = &b; root.__left_ = &b;
b.__parent_ = &root; b.__parent_ = &root;
b.__left_ = &y; b.__left_ = &y;
b.__right_ = &d; b.__right_ = &d;
b.__is_black_ = true; b.__is_black_ = true;
y.__parent_ = &b; y.__parent_ = &b;
y.__left_ = 0; y.__left_ = 0;
y.__right_ = 0; y.__right_ = 0;
y.__is_black_ = true; y.__is_black_ = true;
d.__parent_ = &b; d.__parent_ = &b;
d.__left_ = &c; d.__left_ = &c;
d.__right_ = &e; d.__right_ = &e;
d.__is_black_ = false; d.__is_black_ = false;
c.__parent_ = &d; c.__parent_ = &d;
c.__left_ = 0; c.__left_ = 0;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
e.__parent_ = &d; e.__parent_ = &d;
e.__left_ = 0; e.__left_ = 0;
e.__right_ = 0; e.__right_ = 0;
e.__is_black_ = true; e.__is_black_ = true;
std::__tree_remove(root.__left_, &y); std::__tree_remove(root.__left_, &y);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__parent_ == 0); assert(root.__parent_ == 0);
assert(root.__left_ == &d); assert(root.__left_ == &d);
assert(root.__right_ == 0); assert(root.__right_ == 0);
assert(root.__is_black_ == false); assert(root.__is_black_ == false);
assert(d.__parent_ == &root); assert(d.__parent_ == &root);
assert(d.__left_ == &b); assert(d.__left_ == &b);
assert(d.__right_ == &e); assert(d.__right_ == &e);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(b.__parent_ == &d); assert(b.__parent_ == &d);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__right_ == &c); assert(b.__right_ == &c);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(e.__parent_ == &d); assert(e.__parent_ == &d);
assert(e.__left_ == 0); assert(e.__left_ == 0);
assert(e.__right_ == 0); assert(e.__right_ == 0);
@ -104,57 +104,57 @@ test1()
Node d; Node d;
Node e; Node e;
Node y; Node y;
root.__left_ = &b; root.__left_ = &b;
b.__parent_ = &root; b.__parent_ = &root;
b.__right_ = &y; b.__right_ = &y;
b.__left_ = &d; b.__left_ = &d;
b.__is_black_ = true; b.__is_black_ = true;
y.__parent_ = &b; y.__parent_ = &b;
y.__right_ = 0; y.__right_ = 0;
y.__left_ = 0; y.__left_ = 0;
y.__is_black_ = true; y.__is_black_ = true;
d.__parent_ = &b; d.__parent_ = &b;
d.__right_ = &c; d.__right_ = &c;
d.__left_ = &e; d.__left_ = &e;
d.__is_black_ = false; d.__is_black_ = false;
c.__parent_ = &d; c.__parent_ = &d;
c.__right_ = 0; c.__right_ = 0;
c.__left_ = 0; c.__left_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
e.__parent_ = &d; e.__parent_ = &d;
e.__right_ = 0; e.__right_ = 0;
e.__left_ = 0; e.__left_ = 0;
e.__is_black_ = true; e.__is_black_ = true;
std::__tree_remove(root.__left_, &y); std::__tree_remove(root.__left_, &y);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__parent_ == 0); assert(root.__parent_ == 0);
assert(root.__left_ == &d); assert(root.__left_ == &d);
assert(root.__right_ == 0); assert(root.__right_ == 0);
assert(root.__is_black_ == false); assert(root.__is_black_ == false);
assert(d.__parent_ == &root); assert(d.__parent_ == &root);
assert(d.__right_ == &b); assert(d.__right_ == &b);
assert(d.__left_ == &e); assert(d.__left_ == &e);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(b.__parent_ == &d); assert(b.__parent_ == &d);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__left_ == &c); assert(b.__left_ == &c);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(c.__parent_ == &b); assert(c.__parent_ == &b);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__is_black_ == false); assert(c.__is_black_ == false);
assert(e.__parent_ == &d); assert(e.__parent_ == &d);
assert(e.__right_ == 0); assert(e.__right_ == 0);
assert(e.__left_ == 0); assert(e.__left_ == 0);
@ -170,67 +170,67 @@ test1()
Node e; Node e;
Node f; Node f;
Node y; Node y;
root.__left_ = &b; root.__left_ = &b;
b.__parent_ = &root; b.__parent_ = &root;
b.__left_ = &y; b.__left_ = &y;
b.__right_ = &d; b.__right_ = &d;
b.__is_black_ = true; b.__is_black_ = true;
y.__parent_ = &b; y.__parent_ = &b;
y.__left_ = 0; y.__left_ = 0;
y.__right_ = 0; y.__right_ = 0;
y.__is_black_ = true; y.__is_black_ = true;
d.__parent_ = &b; d.__parent_ = &b;
d.__left_ = &c; d.__left_ = &c;
d.__right_ = &e; d.__right_ = &e;
d.__is_black_ = false; d.__is_black_ = false;
c.__parent_ = &d; c.__parent_ = &d;
c.__left_ = &f; c.__left_ = &f;
c.__right_ = 0; c.__right_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
e.__parent_ = &d; e.__parent_ = &d;
e.__left_ = 0; e.__left_ = 0;
e.__right_ = 0; e.__right_ = 0;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &c; f.__parent_ = &c;
f.__left_ = 0; f.__left_ = 0;
f.__right_ = 0; f.__right_ = 0;
f.__is_black_ = false; f.__is_black_ = false;
std::__tree_remove(root.__left_, &y); std::__tree_remove(root.__left_, &y);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__parent_ == 0); assert(root.__parent_ == 0);
assert(root.__left_ == &d); assert(root.__left_ == &d);
assert(root.__right_ == 0); assert(root.__right_ == 0);
assert(root.__is_black_ == false); assert(root.__is_black_ == false);
assert(d.__parent_ == &root); assert(d.__parent_ == &root);
assert(d.__left_ == &f); assert(d.__left_ == &f);
assert(d.__right_ == &e); assert(d.__right_ == &e);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(f.__parent_ == &d); assert(f.__parent_ == &d);
assert(f.__left_ == &b); assert(f.__left_ == &b);
assert(f.__right_ == &c); assert(f.__right_ == &c);
assert(f.__is_black_ == false); assert(f.__is_black_ == false);
assert(b.__parent_ == &f); assert(b.__parent_ == &f);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(c.__parent_ == &f); assert(c.__parent_ == &f);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(e.__parent_ == &d); assert(e.__parent_ == &d);
assert(e.__left_ == 0); assert(e.__left_ == 0);
assert(e.__right_ == 0); assert(e.__right_ == 0);
@ -246,67 +246,67 @@ test1()
Node e; Node e;
Node f; Node f;
Node y; Node y;
root.__left_ = &b; root.__left_ = &b;
b.__parent_ = &root; b.__parent_ = &root;
b.__right_ = &y; b.__right_ = &y;
b.__left_ = &d; b.__left_ = &d;
b.__is_black_ = true; b.__is_black_ = true;
y.__parent_ = &b; y.__parent_ = &b;
y.__right_ = 0; y.__right_ = 0;
y.__left_ = 0; y.__left_ = 0;
y.__is_black_ = true; y.__is_black_ = true;
d.__parent_ = &b; d.__parent_ = &b;
d.__right_ = &c; d.__right_ = &c;
d.__left_ = &e; d.__left_ = &e;
d.__is_black_ = false; d.__is_black_ = false;
c.__parent_ = &d; c.__parent_ = &d;
c.__right_ = &f; c.__right_ = &f;
c.__left_ = 0; c.__left_ = 0;
c.__is_black_ = true; c.__is_black_ = true;
e.__parent_ = &d; e.__parent_ = &d;
e.__right_ = 0; e.__right_ = 0;
e.__left_ = 0; e.__left_ = 0;
e.__is_black_ = true; e.__is_black_ = true;
f.__parent_ = &c; f.__parent_ = &c;
f.__right_ = 0; f.__right_ = 0;
f.__left_ = 0; f.__left_ = 0;
f.__is_black_ = false; f.__is_black_ = false;
std::__tree_remove(root.__left_, &y); std::__tree_remove(root.__left_, &y);
assert(std::__tree_invariant(root.__left_)); assert(std::__tree_invariant(root.__left_));
assert(root.__parent_ == 0); assert(root.__parent_ == 0);
assert(root.__left_ == &d); assert(root.__left_ == &d);
assert(root.__right_ == 0); assert(root.__right_ == 0);
assert(root.__is_black_ == false); assert(root.__is_black_ == false);
assert(d.__parent_ == &root); assert(d.__parent_ == &root);
assert(d.__right_ == &f); assert(d.__right_ == &f);
assert(d.__left_ == &e); assert(d.__left_ == &e);
assert(d.__is_black_ == true); assert(d.__is_black_ == true);
assert(f.__parent_ == &d); assert(f.__parent_ == &d);
assert(f.__right_ == &b); assert(f.__right_ == &b);
assert(f.__left_ == &c); assert(f.__left_ == &c);
assert(f.__is_black_ == false); assert(f.__is_black_ == false);
assert(b.__parent_ == &f); assert(b.__parent_ == &f);
assert(b.__right_ == 0); assert(b.__right_ == 0);
assert(b.__left_ == 0); assert(b.__left_ == 0);
assert(b.__is_black_ == true); assert(b.__is_black_ == true);
assert(c.__parent_ == &f); assert(c.__parent_ == &f);
assert(c.__right_ == 0); assert(c.__right_ == 0);
assert(c.__left_ == 0); assert(c.__left_ == 0);
assert(c.__is_black_ == true); assert(c.__is_black_ == true);
assert(e.__parent_ == &d); assert(e.__parent_ == &d);
assert(e.__right_ == 0); assert(e.__right_ == 0);
assert(e.__left_ == 0); assert(e.__left_ == 0);

View File

@ -248,4 +248,4 @@ operator-(const random_access_iterator<T>& x, const random_access_iterator<U>& y
return x.base() - y.base(); return x.base() - y.base();
} }
#endif #endif // ITERATORS_H

View File

@ -9,21 +9,21 @@
// <array> // <array>
// template <class T, size_t N > // template <class T, size_t N >
// struct array // struct array
// { // {
// // types: // // types:
// typedef T& reference; // typedef T& reference;
// typedef const T& const_reference; // typedef const T& const_reference;
// typedef implementation defined iterator; // typedef implementation defined iterator;
// typedef implementation defined const_iterator; // typedef implementation defined const_iterator;
// typedef T value_type; // typedef T value_type;
// typedef T* pointer; // typedef T* pointer;
// typedef size_t size_type; // typedef size_t size_type;
// typedef ptrdiff_t difference_type; // typedef ptrdiff_t difference_type;
// typedef T value_type; // typedef T value_type;
// typedef std::reverse_iterator<iterator> reverse_iterator; // typedef std::reverse_iterator<iterator> reverse_iterator;
// typedef std::reverse_iterator<const_iterator> const_reverse_iterator; // typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
#include <array> #include <array>
#include <iterator> #include <iterator>

View File

@ -34,7 +34,7 @@ struct test
test(const value_compare& comp, container_type&& c, test(const value_compare& comp, container_type&& c,
const test_allocator<int>& a) : base(comp, std::move(c), a) {} const test_allocator<int>& a) : base(comp, std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
using base::c; using base::c;

View File

@ -34,7 +34,7 @@ struct test
test(const value_compare& comp, container_type&& c, test(const value_compare& comp, container_type&& c,
const test_allocator<int>& a) : base(comp, std::move(c), a) {} const test_allocator<int>& a) : base(comp, std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
using base::c; using base::c;

View File

@ -45,7 +45,7 @@ struct test
test(const value_compare& comp, container_type&& c, test(const value_compare& comp, container_type&& c,
const test_allocator<int>& a) : base(comp, std::move(c), a) {} const test_allocator<int>& a) : base(comp, std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
using base::c; using base::c;

View File

@ -45,7 +45,7 @@ struct test
test(const value_compare& comp, container_type&& c, test(const value_compare& comp, container_type&& c,
const test_allocator<int>& a) : base(comp, std::move(c), a) {} const test_allocator<int>& a) : base(comp, std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
using base::c; using base::c;

View File

@ -52,7 +52,7 @@ struct test
using base::c; using base::c;
}; };
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -64,5 +64,5 @@ int main()
assert(q.size() == 5); assert(q.size() == 5);
assert(q.c.get_allocator() == test_allocator<MoveOnly>(6)); assert(q.c.get_allocator() == test_allocator<MoveOnly>(6));
assert(q.top() == MoveOnly(4)); assert(q.top() == MoveOnly(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -38,5 +38,5 @@ int main()
q = std::move(qo); q = std::move(qo);
assert(q.size() == 5); assert(q.size() == 5);
assert(q.top() == MoveOnly(4)); assert(q.top() == MoveOnly(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -36,5 +36,5 @@ int main()
std::priority_queue<MoveOnly> q(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5)); std::priority_queue<MoveOnly> q(std::less<MoveOnly>(), make<std::vector<MoveOnly> >(5));
assert(q.size() == 5); assert(q.size() == 5);
assert(q.top() == MoveOnly(4)); assert(q.top() == MoveOnly(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,5 +28,5 @@ int main()
std::vector<MoveOnly>(a, a+n/2)); std::vector<MoveOnly>(a, a+n/2));
assert(q.size() == n); assert(q.size() == n);
assert(q.top() == MoveOnly(8)); assert(q.top() == MoveOnly(8));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -37,5 +37,5 @@ int main()
std::priority_queue<MoveOnly> q = std::move(qo); std::priority_queue<MoveOnly> q = std::move(qo);
assert(q.size() == 5); assert(q.size() == 5);
assert(q.top() == MoveOnly(4)); assert(q.top() == MoveOnly(4));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,5 +28,5 @@ int main()
assert(q.top() == Emplaceable(3, 4.5)); assert(q.top() == Emplaceable(3, 4.5));
q.emplace(2, 3.5); q.emplace(2, 3.5);
assert(q.top() == Emplaceable(3, 4.5)); assert(q.top() == Emplaceable(3, 4.5));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -13,7 +13,6 @@
// bool empty() const; // bool empty() const;
#include <queue> #include <queue>
#include <cassert> #include <cassert>

View File

@ -28,5 +28,5 @@ int main()
assert(q.top() == 3); assert(q.top() == 3);
q.push(2); q.push(2);
assert(q.top() == 3); assert(q.top() == 3);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -19,7 +19,7 @@
// typedef typename container_type::reference reference; // typedef typename container_type::reference reference;
// typedef typename container_type::const_reference const_reference; // typedef typename container_type::const_reference const_reference;
// typedef typename container_type::size_type size_type; // typedef typename container_type::size_type size_type;
// //
// protected: // protected:
// container_type c; // container_type c;
// Compare comp; // Compare comp;

View File

@ -27,7 +27,7 @@ struct test
#ifdef _LIBCPP_MOVE #ifdef _LIBCPP_MOVE
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {} test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
}; };

View File

@ -39,7 +39,7 @@ struct test
#ifdef _LIBCPP_MOVE #ifdef _LIBCPP_MOVE
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {} test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
}; };

View File

@ -47,7 +47,7 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();} allocator_type get_allocator() {return this->c.get_allocator();}
}; };
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -55,5 +55,5 @@ int main()
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4)); test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
assert(q.get_allocator() == test_allocator<MoveOnly>(4)); assert(q.get_allocator() == test_allocator<MoveOnly>(4));
assert(q.size() == 5); assert(q.size() == 5);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -47,7 +47,7 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();} allocator_type get_allocator() {return this->c.get_allocator();}
}; };
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -56,5 +56,5 @@ int main()
test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5)); test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));
assert(q2.get_allocator() == test_allocator<MoveOnly>(5)); assert(q2.get_allocator() == test_allocator<MoveOnly>(5));
assert(q2.size() == 5); assert(q2.size() == 5);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -37,5 +37,5 @@ int main()
std::queue<MoveOnly> q2 = std::move(q); std::queue<MoveOnly> q2 = std::move(q);
assert(q2.size() == 5); assert(q2.size() == 5);
assert(q.empty()); assert(q.empty());
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,12 +28,12 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
#ifdef _LIBCPP_MOVE #ifdef _LIBCPP_MOVE
std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5)); std::queue<MoveOnly> q(make<std::deque<MoveOnly> >(5));
assert(q.size() == 5); assert(q.size() == 5);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -38,5 +38,5 @@ int main()
q2 = std::move(q); q2 = std::move(q);
assert(q2.size() == 5); assert(q2.size() == 5);
assert(q.empty()); assert(q.empty());
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -26,5 +26,5 @@ int main()
assert(q.size() == 3); assert(q.size() == 3);
assert(q.front() == Emplaceable(1, 2.5)); assert(q.front() == Emplaceable(1, 2.5));
assert(q.back() == Emplaceable(3, 4.5)); assert(q.back() == Emplaceable(3, 4.5));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -32,5 +32,5 @@ int main()
assert(q.size() == 3); assert(q.size() == 3);
assert(q.front() == MoveOnly(1)); assert(q.front() == MoveOnly(1));
assert(q.back() == MoveOnly(3)); assert(q.back() == MoveOnly(3));
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -18,7 +18,7 @@
// typedef typename container_type::reference reference; // typedef typename container_type::reference reference;
// typedef typename container_type::const_reference const_reference; // typedef typename container_type::const_reference const_reference;
// typedef typename container_type::size_type size_type; // typedef typename container_type::size_type size_type;
// //
// protected: // protected:
// container_type c; // container_type c;
// ... // ...

View File

@ -11,7 +11,7 @@
// template <class T, class Container> // template <class T, class Container>
// bool operator==(const queue<T, Container>& x,const queue<T, Container>& y); // bool operator==(const queue<T, Container>& x,const queue<T, Container>& y);
// //
// template <class T, class Container> // template <class T, class Container>
// bool operator!=(const queue<T, Container>& x,const queue<T, Container>& y); // bool operator!=(const queue<T, Container>& x,const queue<T, Container>& y);

View File

@ -11,13 +11,13 @@
// template <class T, class Container> // template <class T, class Container>
// bool operator< (const queue<T, Container>& x,const queue<T, Container>& y); // bool operator< (const queue<T, Container>& x,const queue<T, Container>& y);
// //
// template <class T, class Container> // template <class T, class Container>
// bool operator> (const queue<T, Container>& x,const queue<T, Container>& y); // bool operator> (const queue<T, Container>& x,const queue<T, Container>& y);
// //
// template <class T, class Container> // template <class T, class Container>
// bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y); // bool operator>=(const queue<T, Container>& x,const queue<T, Container>& y);
// //
// template <class T, class Container> // template <class T, class Container>
// bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y); // bool operator<=(const queue<T, Container>& x,const queue<T, Container>& y);

View File

@ -27,7 +27,7 @@ struct test
#ifdef _LIBCPP_MOVE #ifdef _LIBCPP_MOVE
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {} test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
}; };

View File

@ -39,7 +39,7 @@ struct test
#ifdef _LIBCPP_MOVE #ifdef _LIBCPP_MOVE
test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {} test(container_type&& c, const test_allocator<int>& a) : base(std::move(c), a) {}
test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {} test(test&& q, const test_allocator<int>& a) : base(std::move(q), a) {}
#endif #endif // _LIBCPP_MOVE
test_allocator<int> get_allocator() {return c.get_allocator();} test_allocator<int> get_allocator() {return c.get_allocator();}
}; };

View File

@ -47,7 +47,7 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();} allocator_type get_allocator() {return this->c.get_allocator();}
}; };
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -55,5 +55,5 @@ int main()
test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4)); test<MoveOnly> q(make<C>(5), test_allocator<MoveOnly>(4));
assert(q.get_allocator() == test_allocator<MoveOnly>(4)); assert(q.get_allocator() == test_allocator<MoveOnly>(4));
assert(q.size() == 5); assert(q.size() == 5);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -47,7 +47,7 @@ struct test
allocator_type get_allocator() {return this->c.get_allocator();} allocator_type get_allocator() {return this->c.get_allocator();}
}; };
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -56,5 +56,5 @@ int main()
test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5)); test<MoveOnly> q2(std::move(q), test_allocator<MoveOnly>(5));
assert(q2.get_allocator() == test_allocator<MoveOnly>(5)); assert(q2.get_allocator() == test_allocator<MoveOnly>(5));
assert(q2.size() == 5); assert(q2.size() == 5);
#endif #endif // _LIBCPP_MOVE
} }

View File

@ -28,7 +28,7 @@ make(int n)
return c; return c;
} }
#endif #endif // _LIBCPP_MOVE
int main() int main()
{ {
@ -37,5 +37,5 @@ int main()
std::stack<MoveOnly> q2 = std::move(q); std::stack<MoveOnly> q2 = std::move(q);
assert(q2.size() == 5); assert(q2.size() == 5);
assert(q.empty()); assert(q.empty());
#endif #endif // _LIBCPP_MOVE
} }

Some files were not shown because too many files have changed in this diff Show More