-// // boost heap: d-ary heap as containter adaptor
+// // boost heap: d-ary heap as container adaptor
//
// Copyright (C) 2010 Tim Blechmann
//
typedef typename heap_base_maker::type super_t;
typedef typename super_t::internal_type internal_type;
+#ifdef BOOST_NO_CXX11_ALLOCATOR
typedef typename heap_base_maker::allocator_argument::template rebind<internal_type>::other internal_type_allocator;
+#else
+ typedef typename std::allocator_traits<typename heap_base_maker::allocator_argument>::template rebind_alloc<internal_type> internal_type_allocator;
+#endif
typedef std::vector<internal_type, internal_type_allocator> container_type;
typedef typename container_type::const_iterator container_iterator;
{
static const bool is_mutable = extract_mutable<BoundArgs>::value;
- typedef typename mpl::if_c< is_mutable,
+ typedef typename boost::conditional< is_mutable,
priority_queue_mutable_wrapper<d_ary_heap<T, BoundArgs, nop_index_updater > >,
d_ary_heap<T, BoundArgs, nop_index_updater >
>::type type;
}
/// \copydoc boost::heap::priority_queue::push
- typename mpl::if_c<is_mutable, handle_type, void>::type push(value_type const & v)
+ typename boost::conditional<is_mutable, handle_type, void>::type push(value_type const & v)
{
return super_t::push(v);
}
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
/// \copydoc boost::heap::priority_queue::emplace
template <class... Args>
- typename mpl::if_c<is_mutable, handle_type, void>::type emplace(Args&&... args)
+ typename boost::conditional<is_mutable, handle_type, void>::type emplace(Args&&... args)
{
return super_t::emplace(std::forward<Args>(args)...);
}