Unordered: Merge from trunk.

Anotehr overhaul. Can now use `void_pointer` for links between nodes, although
it doesn't as I don't think `void_pointer` support is strong enough in existing
allocators.

Also no longer relies on using base pointers for custome pointer types.  And
scaled back member function detection to just detect if an allocator has a
member, not what its signature is. I found that the trait could be confused by
ambiguous overloads. This might be fixable.

Better documentation of C++11 compliance to come.


[SVN r74859]
This commit is contained in:
Daniel James
2011-10-09 18:30:10 +00:00
parent 17ba6c9916
commit 50e8df5e12
26 changed files with 3429 additions and 3251 deletions

View File

@@ -136,8 +136,17 @@ void test_allocator1()
// allocator 2
template <typename Alloc>
struct allocator2_base
{
Alloc select_on_container_copy_construction() const {
++selected;
return Alloc();
}
};
template <typename T>
struct allocator2
struct allocator2 : allocator2_base<allocator2<T> >
{
typedef T value_type;
typedef T* pointer;
@@ -149,12 +158,6 @@ struct allocator2
typedef no_type propagate_on_container_copy_assignment;
typedef no_type propagate_on_container_move_assignment;
typedef no_type propagate_on_container_swap;
// Note: Not const - so it shouldn't be called.
allocator2<T> select_on_container_copy_construction() {
++selected;
return allocator2<T>();
}
};
void test_allocator2()
@@ -169,7 +172,7 @@ void test_allocator2()
BOOST_TEST(!traits::propagate_on_container_copy_assignment::value);
BOOST_TEST(!traits::propagate_on_container_move_assignment::value);
BOOST_TEST(!traits::propagate_on_container_swap::value);
BOOST_TEST(call_select<allocator>() == 0);
BOOST_TEST(call_select<allocator>() == 1);
}
// allocator 3