]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/hana/core/is_a.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / hana / core / is_a.hpp
CommitLineData
7c673cae
FG
1/*!
2@file
3Defines `boost::hana::is_a` and `boost::hana::is_an`.
4
b32b8144 5@copyright Louis Dionne 2013-2017
7c673cae
FG
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_CORE_IS_A_HPP
11#define BOOST_HANA_CORE_IS_A_HPP
12
13#include <boost/hana/fwd/core/is_a.hpp>
14
15#include <boost/hana/bool.hpp>
16#include <boost/hana/config.hpp>
17#include <boost/hana/core/tag_of.hpp>
18
19#include <type_traits>
20
21
1e59de90 22namespace boost { namespace hana {
7c673cae
FG
23 //////////////////////////////////////////////////////////////////////////
24 // is_a
25 //////////////////////////////////////////////////////////////////////////
26 template <typename DataType, typename T>
27 struct is_a_t<DataType, T>
28 : integral_constant<bool,
29 std::is_same<DataType, typename hana::tag_of<T>::type>::value
30 >
31 { };
32
33 template <typename DataType>
34 struct is_a_t<DataType> {
35 template <typename T>
36 constexpr auto operator()(T const&) const
37 { return hana::is_a<DataType, T>; }
38 };
1e59de90 39}} // end namespace boost::hana
7c673cae
FG
40
41#endif // !BOOST_HANA_CORE_IS_A_HPP