2
0
mirror of https://github.com/boostorg/hana.git synced 2026-01-27 19:02:12 +00:00
Files
hana/test/bugs/integral_strip_cv.cpp
2015-02-01 21:02:18 -05:00

37 lines
940 B
C++

/*
@copyright Louis Dionne 2014
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/hana/integral_constant.hpp>
#include <boost/hana/assert.hpp>
#include <boost/hana/type.hpp>
using namespace boost::hana;
template <typename T>
constexpr void test_for() {
BOOST_HANA_CONSTANT_CHECK(equal(
decltype_(integral_constant<T const, 0>),
decltype_(integral_constant<T, 0>)
));
BOOST_HANA_CONSTANT_CHECK(equal(
decltype_(integral_constant<T volatile, 0>),
decltype_(integral_constant<T, 0>)
));
BOOST_HANA_CONSTANT_CHECK(equal(
decltype_(integral_constant<T const volatile, 0>),
decltype_(integral_constant<T, 0>)
));
}
int main() {
test_for<bool>();
test_for<int>();
test_for<unsigned int>();
test_for<char>();
test_for<unsigned long long>();
}