Unordered: More portable allocator_traits.

[SVN r74067]
This commit is contained in:
Daniel James
2011-08-26 08:11:46 +00:00
parent cfd52c8f38
commit 099a893678
6 changed files with 317 additions and 61 deletions

View File

@@ -186,9 +186,14 @@ namespace test
};
template <typename T, typename Flags = propagate_swap,
bool SelectCopy = Flags::is_select_on_copy ? true : false>
struct cxx11_allocator :
public cxx11_allocator_base<T>,
typename Enable = void>
struct cxx11_allocator;
template <typename T, typename Flags>
struct cxx11_allocator<
T, Flags,
typename boost::disable_if_c<Flags::is_select_on_copy>::type
> : public cxx11_allocator_base<T>,
public swap_allocator_base<Flags>,
public assign_allocator_base<Flags>,
public move_allocator_base<Flags>,
@@ -228,8 +233,10 @@ namespace test
};
template <typename T, typename Flags>
struct cxx11_allocator<T, Flags, true> :
public cxx11_allocator_base<T>,
struct cxx11_allocator<
T, Flags,
typename boost::enable_if_c<Flags::is_select_on_copy>::type
> : public cxx11_allocator_base<T>,
public swap_allocator_base<Flags>,
public assign_allocator_base<Flags>,
public move_allocator_base<Flags>,

View File

@@ -26,7 +26,7 @@ namespace test
object generate(object const*);
implicitly_convertible generate(implicitly_convertible const*);
class object : globally_counted_object
class object : private globally_counted_object
{
friend class hash;
friend class equal_to;
@@ -64,7 +64,7 @@ namespace test
}
};
class implicitly_convertible : globally_counted_object
class implicitly_convertible : private globally_counted_object
{
int tag1_, tag2_;
public: