Formatting changes, mostly to fit within 80 characters.

Also, some C casts converted to static_cast.

[SVN r58692]
This commit is contained in:
Daniel James
2010-01-04 22:49:39 +00:00
parent 0f0161a5a2
commit 71096f4d26
42 changed files with 761 additions and 360 deletions
+33 -7
View File
@@ -190,13 +190,37 @@ namespace test
template <class U> struct rebind { typedef allocator<U> other; };
explicit allocator(int t = 0) : tag_(t) { detail::tracker.allocator_ref(); }
template <class Y> allocator(allocator<Y> const& x) : tag_(x.tag_) { detail::tracker.allocator_ref(); }
allocator(allocator const& x) : tag_(x.tag_) { detail::tracker.allocator_ref(); }
~allocator() { detail::tracker.allocator_unref(); }
explicit allocator(int t = 0) : tag_(t)
{
detail::tracker.allocator_ref();
}
template <class Y> allocator(allocator<Y> const& x)
: tag_(x.tag_)
{
detail::tracker.allocator_ref();
}
pointer address(reference r) { return pointer(&r); }
const_pointer address(const_reference r) { return const_pointer(&r); }
allocator(allocator const& x)
: tag_(x.tag_)
{
detail::tracker.allocator_ref();
}
~allocator()
{
detail::tracker.allocator_unref();
}
pointer address(reference r)
{
return pointer(&r);
}
const_pointer address(const_reference r)
{
return const_pointer(&r);
}
pointer allocate(size_type n) {
pointer ptr(static_cast<T*>(::operator new(n * sizeof(T))));
@@ -250,7 +274,9 @@ namespace test
};
template <class T>
bool equivalent_impl(allocator<T> const& x, allocator<T> const& y, test::derived_type) {
bool equivalent_impl(allocator<T> const& x, allocator<T> const& y,
test::derived_type)
{
return x == y;
}