1// Copyright Louis Dionne 2013-2022
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
4
5#include <boost/hana/core/tag_of.hpp>
6#include <boost/hana/ext/std/integral_constant.hpp>
7#include <boost/hana/integral_constant.hpp>
8
9#include <type_traits>
10namespace hana = boost::hana;
11
12
13// Make sure we have the right tag, even when including ext/std/integral_constant.hpp
14static_assert(std::is_same<
15 hana::tag_of_t<hana::integral_constant<int, 10>>,
16 hana::integral_constant_tag<int>
17>{}, "");
18
19struct derived : hana::integral_constant<int, 10> { };
20static_assert(std::is_same<
21 hana::tag_of_t<derived>,
22 hana::integral_constant_tag<int>
23>{}, "");
24
25
26int main() { }
27

source code of boost/libs/hana/test/integral_constant/tag.cpp