3 Defines `boost::hana::is_a` and `boost::hana::is_an`.
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_CORE_IS_A_HPP
11 #define BOOST_HANA_CORE_IS_A_HPP
13 #include <boost/hana/fwd/core/is_a.hpp>
15 #include <boost/hana/bool.hpp>
16 #include <boost/hana/config.hpp>
17 #include <boost/hana/core/tag_of.hpp>
19 #include <type_traits>
22 BOOST_HANA_NAMESPACE_BEGIN
23 //////////////////////////////////////////////////////////////////////////
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
33 template <typename DataType>
34 struct is_a_t<DataType> {
36 constexpr auto operator()(T const&) const
37 { return hana::is_a<DataType, T>; }
39 BOOST_HANA_NAMESPACE_END
41 #endif // !BOOST_HANA_CORE_IS_A_HPP