]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/type_traits/test/is_enum_test.cpp
2 // (C) Copyright John Maddock 2000.
3 // Use, modification and distribution are subject to the
4 // Boost Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 # include <type_traits>
10 # include <boost/type_traits/is_enum.hpp>
13 #include "check_integral_constant.hpp"
15 #ifndef BOOST_NO_CXX11_SCOPED_ENUMS
24 TT_TEST_BEGIN(is_enum
)
26 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<int>::value
, false);
27 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<enum_UDT
>::value
, true);
28 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<int_convertible
>::value
, false);
29 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<int&>::value
, false);
30 #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
31 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<int&&>::value
, false);
33 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<boost::noncopyable
>::value
, false);
34 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<void>::value
, false);
35 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<test_abc1
>::value
, false);
36 #ifndef BOOST_NO_CXX11_SCOPED_ENUMS
37 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum
<test_enum
>::value
, true);