// boost lockfree // // Copyright (C) 2011, 2016 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_DETAIL_PARAMETER_HPP #define BOOST_LOCKFREE_DETAIL_PARAMETER_HPP #include #include #include #include #include #include #include namespace boost { namespace lockfree { namespace detail { namespace mpl = boost::mpl; template struct has_arg { typedef typename parameter::binding::type type; static const bool value = mpl::is_not_void_::type::value; }; template struct extract_capacity { static const bool has_capacity = has_arg::value; typedef typename mpl::if_c::type, mpl::size_t< 0 > >::type capacity_t; static const std::size_t capacity = capacity_t::value; }; template struct extract_allocator { static const bool has_allocator = has_arg::value; typedef typename mpl::if_c::type, boost::alignment::aligned_allocator >::type allocator_arg; typedef typename boost::allocator_rebind::type type; }; template struct extract_fixed_sized { static const bool has_fixed_sized = has_arg::value; typedef typename mpl::if_c::type, mpl::bool_ >::type type; static const bool value = type::value; }; } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_DETAIL_PARAMETER_HPP */