1 // boost lockfree: allocator rebind helper
3 // Copyright (C) 2017 Minmin Gong
5 // Distributed under the Boost Software License, Version 1.0. (See
6 // accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 #ifndef BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
10 #define BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED
18 template <class allocator_type, class value_type>
19 struct allocator_rebind_helper
21 #if !defined( BOOST_NO_CXX11_ALLOCATOR )
22 typedef typename std::allocator_traits<allocator_type>::template rebind_alloc<value_type> type;
24 typedef typename allocator_type::template rebind<value_type>::other type;
28 } /* namespace detail */
29 } /* namespace lockfree */
30 } /* namespace boost */
32 #endif /* BOOST_LOCKFREE_ALLOCATOR_REBIND_HELPER_HPP_INCLUDED */