3 Defines `boost::hana::erase_key`.
5 @copyright Louis Dionne 2013-2017
6 Distributed under the Boost Software License, Version 1.0.
7 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
10 #ifndef BOOST_HANA_ERASE_KEY_HPP
11 #define BOOST_HANA_ERASE_KEY_HPP
13 #include <boost/hana/fwd/erase_key.hpp>
15 #include <boost/hana/config.hpp>
16 #include <boost/hana/core/dispatch.hpp>
19 BOOST_HANA_NAMESPACE_BEGIN
21 template <typename Set, typename ...Args>
22 constexpr decltype(auto) erase_key_t::operator()(Set&& set, Args&& ...args) const {
23 return erase_key_impl<typename hana::tag_of<Set>::type>::apply(
24 static_cast<Set&&>(set),
25 static_cast<Args&&>(args)...
30 template <typename T, bool condition>
31 struct erase_key_impl<T, when<condition>> : default_ {
32 template <typename ...Args>
33 static constexpr auto apply(Args&& ...) = delete;
35 BOOST_HANA_NAMESPACE_END
37 #endif // !BOOST_HANA_ERASE_KEY_HPP