Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:37:40

0001 /*!
0002 @file
0003 Defines `boost::hana::Metafunction`.
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_CONCEPT_METAFUNCTION_HPP
0011 #define BOOST_HANA_CONCEPT_METAFUNCTION_HPP
0012 
0013 #include <boost/hana/fwd/concept/metafunction.hpp>
0014 
0015 #include <boost/hana/config.hpp>
0016 #include <boost/hana/core/tag_of.hpp>
0017 #include <boost/hana/detail/integral_constant.hpp>
0018 
0019 
0020 namespace boost { namespace hana {
0021     namespace detail {
0022         template <typename F, typename Tag = typename tag_of<F>::type>
0023         struct metafunction_dispatch
0024             : hana::integral_constant<bool,
0025                 Metafunction<Tag>::value
0026             >
0027         { };
0028 
0029         template <typename F>
0030         struct metafunction_dispatch<F, F>
0031             : hana::integral_constant<bool, false>
0032         { };
0033     }
0034 
0035     template <typename F>
0036     struct Metafunction
0037         : detail::metafunction_dispatch<F>
0038     { };
0039 }} // end namespace boost::hana
0040 
0041 #endif // !BOOST_HANA_CONCEPT_METAFUNCTION_HPP