#ifndef BOOST_MP11_MAP_HPP_INCLUDED #define BOOST_MP11_MAP_HPP_INCLUDED // Copyright 2015, 2016 Peter Dimov. // // 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 #include #include #include #include #include #include namespace boost { // mp_map_contains template using mp_map_contains = mp_not, void>>; // mp_map_insert template using mp_map_insert = mp_if< mp_map_contains>, M, mp_push_back >; // mp_map_replace namespace detail { template struct mp_map_replace_impl; template class M, class... U, class T> struct mp_map_replace_impl, T> { using K = mp_first; // mp_replace_if is inlined here using a struct _f because of msvc-14.0 template struct _f { using type = mp_if< std::is_same, K>, T, V >; }; using type = mp_if< mp_map_contains, K>, M::type...>, M >; }; } // namespace detail template using mp_map_replace = typename detail::mp_map_replace_impl::type; // mp_map_update // mp_map_erase } // namespace boost #endif // #ifndef BOOST_MP11_MAP_HPP_INCLUDED