1/*!
2@file
3Defines `boost::hana::IntegralConstant`.
4
5Copyright Louis Dionne 2013-2022
6Distributed under the Boost Software License, Version 1.0.
7(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
8 */
9
10#ifndef BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP
11#define BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP
12
13#include <boost/hana/fwd/concept/integral_constant.hpp>
14
15#include <boost/hana/config.hpp>
16#include <boost/hana/core/tag_of.hpp>
17#include <boost/hana/detail/integral_constant.hpp>
18
19
20namespace boost { namespace hana {
21 namespace detail {
22 template <typename C, typename Tag = typename tag_of<C>::type>
23 struct integral_constant_dispatch
24 : hana::integral_constant<bool,
25 hana::IntegralConstant<Tag>::value
26 >
27 { };
28
29 template <typename C>
30 struct integral_constant_dispatch<C, C>
31 : hana::integral_constant<bool, false>
32 { };
33 }
34
35 //! @cond
36 template <typename C>
37 struct IntegralConstant
38 : detail::integral_constant_dispatch<C>
39 { };
40 //! @endcond
41}} // end namespace boost::hana
42
43#endif // !BOOST_HANA_CONCEPT_INTEGRAL_CONSTANT_HPP
44

source code of boost/libs/hana/include/boost/hana/concept/integral_constant.hpp