MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
single_inheritance.hpp
Go to the documentation of this file.
1 
12 #ifndef BOOST_MPL11_DETAIL_AT_KEY_SINGLE_INHERITANCE_HPP
13 #define BOOST_MPL11_DETAIL_AT_KEY_SINGLE_INHERITANCE_HPP
14 
16 
17 
18 namespace boost { namespace mpl11 { namespace detail { namespace at_key {
19  template <typename ...pairs>
20  struct single_map_impl {
21  template <typename fail = void>
22  static typename fail::key_not_found at_key_impl(...);
23  };
24 
25  template <typename key, typename value, typename ...pairs>
26  struct single_map_impl<pair<key, value>, pairs...>
27  : single_map_impl<pairs...>
28  {
29  using single_map_impl<pairs...>::at_key_impl;
30  static value at_key_impl(key*);
31  };
32 
38  template <typename key, typename ...pairs>
39  using single_inheritance = decltype(
40  single_map_impl<pairs...>::at_key_impl((key*)nullptr)
41  );
42 }}}} // end namespace boost::mpl11::detail::at_key
43 
44 #endif // !BOOST_MPL11_DETAIL_AT_KEY_SINGLE_INHERITANCE_HPP
Defines boost::mpl11::detail::pair and boost::mpl11::index_pair.