diff --git a/include/boost/unordered/detail/implementation.hpp b/include/boost/unordered/detail/implementation.hpp index 1352d462..4d411b31 100644 --- a/include/boost/unordered/detail/implementation.hpp +++ b/include/boost/unordered/detail/implementation.hpp @@ -352,17 +352,16 @@ namespace boost { // insert_size/initial_size template - inline std::size_t insert_size(I i, I j, - typename boost::unordered::detail::enable_if_forward::type = - 0) + inline typename boost::unordered::detail::enable_if_forward::type + insert_size(I i, I j) { return static_cast(std::distance(i, j)); } template - inline std::size_t insert_size(I, I, - typename boost::unordered::detail::disable_if_forward::type = - 0) + inline typename boost::unordered::detail::disable_if_forward::type insert_size(I, I) { return 1; } @@ -1186,41 +1185,37 @@ namespace boost { namespace func { template - inline Alloc call_select_on_container_copy_construction( - const Alloc& rhs, - typename boost::enable_if_c< - boost::unordered::detail::has_select_on_container_copy_construction< - Alloc>::value, - void*>::type = 0) + inline typename boost::enable_if< + boost::unordered::detail::has_select_on_container_copy_construction< + Alloc>, + Alloc>::type + call_select_on_container_copy_construction(const Alloc& rhs) { return rhs.select_on_container_copy_construction(); } template - inline Alloc call_select_on_container_copy_construction( - const Alloc& rhs, - typename boost::disable_if_c< - boost::unordered::detail::has_select_on_container_copy_construction< - Alloc>::value, - void*>::type = 0) + inline typename boost::disable_if< + boost::unordered::detail::has_select_on_container_copy_construction< + Alloc>, + Alloc>::type + call_select_on_container_copy_construction(const Alloc& rhs) { return rhs; } template - inline SizeType call_max_size(const Alloc& a, - typename boost::enable_if_c< - boost::unordered::detail::has_max_size::value, void*>::type = - 0) + inline typename boost::enable_if< + boost::unordered::detail::has_max_size, SizeType>::type + call_max_size(const Alloc& a) { return a.max_size(); } template - inline SizeType call_max_size(const Alloc&, - typename boost::disable_if_c< - boost::unordered::detail::has_max_size::value, void*>::type = - 0) + inline typename boost::disable_if< + boost::unordered::detail::has_max_size, SizeType>::type + call_max_size(const Alloc&) { return (std::numeric_limits::max)(); } @@ -1362,41 +1357,41 @@ namespace boost { // the only construct method that old fashioned allocators support. template - static void construct(Alloc& a, T* p, T const& x, - typename boost::enable_if_c< - boost::unordered::detail::has_construct::value && - boost::is_same::value, - void*>::type = 0) + static typename boost::enable_if_c< + boost::unordered::detail::has_construct::value && + boost::is_same::value, + void>::type + construct(Alloc& a, T* p, T const& x) { a.construct(p, x); } template - static void construct(Alloc&, T* p, T const& x, - typename boost::disable_if_c< - boost::unordered::detail::has_construct::value && - boost::is_same::value, - void*>::type = 0) + static typename boost::disable_if_c< + boost::unordered::detail::has_construct::value && + boost::is_same::value, + void>::type + construct(Alloc&, T* p, T const& x) { new (static_cast(p)) T(x); } template - static void destroy(Alloc& a, T* p, - typename boost::enable_if_c< - boost::unordered::detail::has_destroy::value && - boost::is_same::value, - void*>::type = 0) + static typename boost::enable_if_c< + boost::unordered::detail::has_destroy::value && + boost::is_same::value, + void>::type + destroy(Alloc& a, T* p) { a.destroy(p); } template - static void destroy(Alloc&, T* p, - typename boost::disable_if_c< - boost::unordered::detail::has_destroy::value && - boost::is_same::value, - void*>::type = 0) + static typename boost::disable_if_c< + boost::unordered::detail::has_destroy::value && + boost::is_same::value, + void>::type + destroy(Alloc&, T* p) { boost::unordered::detail::func::destroy(p); } @@ -1897,9 +1892,9 @@ namespace boost { template - inline void construct_from_args(Alloc& alloc, std::pair* address, - boost::unordered::detail::emplace_args3 const& args, - typename enable_if, void*>::type = 0) + inline typename enable_if, void>::type + construct_from_args(Alloc& alloc, std::pair* address, + boost::unordered::detail::emplace_args3 const& args) { boost::unordered::detail::func::construct_from_tuple( alloc, boost::addressof(address->first), args.a1); @@ -4337,9 +4332,8 @@ namespace boost { // if hash function throws, or inserting > 1 element, basic exception // safety. Strong otherwise template - void insert_range_equiv(I i, I j, - typename boost::unordered::detail::enable_if_forward::type = - 0) + typename boost::unordered::detail::enable_if_forward::type + insert_range_equiv(I i, I j) { if (i == j) return; @@ -4361,9 +4355,8 @@ namespace boost { } template - void insert_range_equiv(I i, I j, - typename boost::unordered::detail::disable_if_forward::type = 0) + typename boost::unordered::detail::disable_if_forward::type + insert_range_equiv(I i, I j) { for (; i != j; ++i) { emplace_equiv(boost::unordered::detail::func::construct_node( diff --git a/include/boost/unordered/unordered_map.hpp b/include/boost/unordered/unordered_map.hpp index 6951a30e..a9387ef3 100644 --- a/include/boost/unordered/unordered_map.hpp +++ b/include/boost/unordered/unordered_map.hpp @@ -385,10 +385,9 @@ namespace boost { } template - std::pair insert(BOOST_RV_REF(P2) obj, - typename boost::enable_if_c< - boost::is_constructible::value, - void*>::type = 0) + typename boost::enable_if< + boost::is_constructible, + std::pair >::type insert(BOOST_RV_REF(P2) obj) { return this->emplace(boost::forward(obj)); } @@ -404,10 +403,9 @@ namespace boost { } template - iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj, - typename boost::enable_if_c< - boost::is_constructible::value, - void*>::type = 0) + typename boost::enable_if< + boost::is_constructible, iterator>::type + insert(const_iterator hint, BOOST_RV_REF(P2) obj) { return this->emplace_hint(hint, boost::forward(obj)); } @@ -1249,10 +1247,9 @@ namespace boost { } template - iterator insert(BOOST_RV_REF(P2) obj, - typename boost::enable_if_c< - boost::is_constructible::value, - void*>::type = 0) + typename boost::enable_if< + boost::is_constructible, + iterator>::type insert(BOOST_RV_REF(P2) obj) { return this->emplace(boost::forward(obj)); } @@ -1268,10 +1265,10 @@ namespace boost { } template - iterator insert(const_iterator hint, BOOST_RV_REF(P2) obj, - typename boost::enable_if_c< - boost::is_constructible::value, - void*>::type = 0) + typename boost::enable_if< + boost::is_constructible, + iterator>::type + insert(const_iterator hint, BOOST_RV_REF(P2) obj) { return this->emplace_hint(hint, boost::forward(obj)); }