MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
multiple_inheritance.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_DETAIL_AT_INDEX_MULTIPLE_INHERITANCE_HPP
13 #define BOOST_MPL11_DETAIL_AT_INDEX_MULTIPLE_INHERITANCE_HPP
14 
18 
19 
20 namespace boost { namespace mpl11 { namespace detail { namespace at_index {
21  template <std_size_t index, typename value>
22  value multi_lookup_impl(index_pair<index, value>*);
23 
24  template <typename indices, typename ...xs>
25  struct indexer_impl;
26 
27  template <std_size_t ...indices, typename ...xs>
28  struct indexer_impl<std_index_sequence<indices...>, xs...>
29  : index_pair<indices, xs>...
30  { };
31 
43  template <std_size_t index, typename ...xs>
44  using multiple_inheritance = decltype(
45  // Disable ADL or the xs... will be instantiated.
46  at_index::multi_lookup_impl<index>(
47  (indexer_impl<
48  typename make_std_index_sequence<sizeof...(xs)>::type, xs...
49  >*)nullptr
50  )
51  );
52 }}}} // end namespace boost::mpl11::detail::at_index
53 
54 #endif // !BOOST_MPL11_DETAIL_AT_INDEX_MULTIPLE_INHERITANCE_HPP
Defines boost::mpl11::detail::std_size_t.
Defines boost::mpl11::detail::std_index_sequence.
Defines boost::mpl11::detail::pair and boost::mpl11::index_pair.