forked from boostorg/type_traits
Add tests for scoped_enums.
See https://github.com/boostorg/type_traits/issues/80 and https://svn.boost.org/trac10/ticket/9913.
This commit is contained in:
@ -259,4 +259,9 @@ TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 &, ret const & >::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014, C014 const &, ret const & >::value), 1);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< C014 const, C014, ret const >::value), 1);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::has_plus< scoped_enum, scoped_enum >::value), 0);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
@ -222,7 +222,9 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,9 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -219,6 +219,9 @@ void specific() {
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)
|
||||
|
@ -322,6 +322,12 @@ enum enum2
|
||||
three_,four_
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
|
||||
enum class scoped_enum { one, two, three };
|
||||
|
||||
#endif
|
||||
|
||||
struct VB
|
||||
{
|
||||
virtual ~VB(){};
|
||||
|
Reference in New Issue
Block a user