summaryrefslogtreecommitdiff
path: root/libs/unordered/test/helpers/memory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/unordered/test/helpers/memory.hpp')
-rw-r--r--libs/unordered/test/helpers/memory.hpp58
1 files changed, 6 insertions, 52 deletions
diff --git a/libs/unordered/test/helpers/memory.hpp b/libs/unordered/test/helpers/memory.hpp
index af75328a5f..a30d752270 100644
--- a/libs/unordered/test/helpers/memory.hpp
+++ b/libs/unordered/test/helpers/memory.hpp
@@ -8,10 +8,8 @@
#include <memory>
#include <map>
-#include <boost/mpl/apply.hpp>
#include <boost/assert.hpp>
-#include <boost/unordered/detail/allocator_helpers.hpp>
-#include <boost/mpl/aux_/config/eti.hpp>
+#include <boost/unordered/detail/allocate.hpp>
#include "../helpers/test.hpp"
namespace test
@@ -53,30 +51,10 @@ namespace test
}
};
- template <class Alloc>
- struct allocator_memory_type_gen {
- typedef std::map<memory_area, memory_track, memory_area_compare,
- Alloc> type;
- };
-
-#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
- template <>
- struct allocator_memory_type_gen<int> {
- typedef std::map<memory_area, memory_track, memory_area_compare>
- type;
- };
-#endif
-
- template <class Alloc = std::allocator<int> >
struct memory_tracker {
- typedef BOOST_DEDUCED_TYPENAME
- ::boost::unordered::detail::rebind_wrap<Alloc,
- std::pair<memory_area const, memory_track> >::type
- allocator_type;
-
- typedef BOOST_DEDUCED_TYPENAME
- allocator_memory_type_gen<allocator_type>::type
- allocated_memory_type;
+ typedef std::map<memory_area, memory_track, memory_area_compare,
+ std::allocator<std::pair<memory_area const, memory_track> >
+ > allocated_memory_type;
allocated_memory_type allocated_memory;
unsigned int count_allocators;
@@ -139,7 +117,7 @@ namespace test
void track_deallocate(void* ptr, std::size_t n, std::size_t size,
int tag, bool check_tag_ = true)
{
- BOOST_DEDUCED_TYPENAME allocated_memory_type::iterator pos =
+ allocated_memory_type::iterator pos =
allocated_memory.find(
memory_area(ptr, (char*) ptr + n * size));
if(pos == allocated_memory.end()) {
@@ -177,33 +155,9 @@ namespace test
//
// boostinspect:nounnamed
namespace {
- test::detail::memory_tracker<std::allocator<int> > tracker;
+ test::detail::memory_tracker tracker;
}
}
-
- template <int Value>
- struct bool_type {
- enum { value = (Value ? true : false) };
- };
-
- struct true_type {
- enum { value = true };
- };
-
- struct false_type {
- enum { value = false };
- };
-
- struct convert_from_anything
- {
- template <typename T>
- convert_from_anything(T const&) {}
- };
-
- int selected_count(convert_from_anything)
- {
- return 0;
- }
}
#endif