]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/is_scoped_enum_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_scoped_enum_test.cpp
CommitLineData
20effc67
TL
1/*
2Copyright 2020 Glen Joseph Fernandes
3(glenjofe@gmail.com)
4
5Distributed under the Boost Software License,
6Version 1.0. (See accompanying file LICENSE_1_0.txt
7or copy at http://www.boost.org/LICENSE_1_0.txt)
8*/
9#ifdef TEST_STD
10#include <type_traits>
11#else
12#include <boost/type_traits/is_scoped_enum.hpp>
13#endif
14#include "check_integral_constant.hpp"
15
16enum Unscoped {
17 Constant = 1
18};
19
20#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS)
21enum class Scoped {
22 Constant = 2
23};
24#endif
25
26TT_TEST_BEGIN(is_scoped_enum)
27
28BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scoped_enum<void>::value, false);
29BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scoped_enum<int>::value, false);
30BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scoped_enum<Unscoped>::value, false);
31
32#if !defined(BOOST_NO_CXX11_SCOPED_ENUMS)
33BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_scoped_enum<Scoped>::value, true);
34#endif
35
36TT_TEST_END