]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/is_enum_test.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_enum_test.cpp
CommitLineData
7c673cae
FG
1
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)
6
7c673cae
FG
7#ifdef TEST_STD
8# include <type_traits>
9#else
10# include <boost/type_traits/is_enum.hpp>
11#endif
11fdf7f2
TL
12#include "test.hpp"
13#include "check_integral_constant.hpp"
7c673cae
FG
14
15#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
16
17enum class test_enum
18{
19 a, b
20};
21
22#endif
23
24TT_TEST_BEGIN(is_enum)
25
26BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int>::value, false);
27BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<enum_UDT>::value, true);
28BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int_convertible>::value, false);
29BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int&>::value, false);
30#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
31BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<int&&>::value, false);
32#endif
33BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<boost::noncopyable>::value, false);
34BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<void>::value, false);
35BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<test_abc1>::value, false);
36#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
37BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_enum<test_enum>::value, true);
38#endif
39
40TT_TEST_END
41
42
43
44
45
46
47
48