Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:02

0001 /*!
0002 @file
0003 Defines `boost::hana::erase_key`.
0004 
0005 Copyright Louis Dionne 2013-2022
0006 Distributed under the Boost Software License, Version 1.0.
0007 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
0008  */
0009 
0010 #ifndef BOOST_HANA_ERASE_KEY_HPP
0011 #define BOOST_HANA_ERASE_KEY_HPP
0012 
0013 #include <boost/hana/fwd/erase_key.hpp>
0014 
0015 #include <boost/hana/config.hpp>
0016 #include <boost/hana/core/dispatch.hpp>
0017 
0018 
0019 namespace boost { namespace hana {
0020     //! @cond
0021     template <typename Set, typename ...Args>
0022     constexpr decltype(auto) erase_key_t::operator()(Set&& set, Args&& ...args) const {
0023         return erase_key_impl<typename hana::tag_of<Set>::type>::apply(
0024             static_cast<Set&&>(set),
0025             static_cast<Args&&>(args)...
0026         );
0027     }
0028     //! @endcond
0029 
0030     template <typename T, bool condition>
0031     struct erase_key_impl<T, when<condition>> : default_ {
0032         template <typename ...Args>
0033         static constexpr auto apply(Args&& ...) = delete;
0034     };
0035 }} // end namespace boost::hana
0036 
0037 #endif // !BOOST_HANA_ERASE_KEY_HPP