forked from boostorg/type_traits
Add some more traits back.
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#ifdef TEST_STD
|
||||
# include <type_traits>
|
||||
#else
|
||||
# include <boost/type_traits/has_nothrow_constructor.hpp>
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(has_nothrow_constructor)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<bool const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<signed char const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned char const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<char const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned short const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<short const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned int const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned long const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long const volatile>::value, true);
|
||||
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::ulong_long_type const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor< ::boost::long_long_type const volatile>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int8 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int8 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int16 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int16 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int32 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int32 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<unsigned __int64 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<__int64 const volatile>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<float const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<double const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<long double const volatile>::value, true);
|
||||
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<void*>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int*const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f1>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f2>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<f3>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf1>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf2>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mf3>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<mp>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<cmf>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<enum_UDT>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int&>::value, false);
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int&&>::value, false);
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<const int&>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[2]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[3][2]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<int[2][4][5][6][3]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<void>::value, false);
|
||||
// cases we would like to succeed but can't implement in the language:
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_POD_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<POD_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<POD_union_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<empty_POD_union_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_construct_UDT>::value, true, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_assign_UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<nothrow_copy_UDT>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor<test_abc1>::value, false);
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,213 @@
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#include <boost/type_traits/has_new_operator.hpp>
|
||||
|
||||
#ifdef BOOST_INTEL
|
||||
// remark #1720: function "class_with_new_op::operator new" has no corresponding member operator delete (to be called if an exception is thrown during initialization of an allocated object)
|
||||
// void * operator new(std::size_t);
|
||||
// ^
|
||||
#pragma warning(disable:1720)
|
||||
#endif
|
||||
|
||||
#if defined(new)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, >= 1310)
|
||||
# define BOOST_TT_AUX_MACRO_NEW_DEFINED
|
||||
# pragma push_macro("new")
|
||||
# undef new
|
||||
# else
|
||||
# error "Sorry but you can't include this header if 'new' is defined as a macro."
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
struct class_with_new_op {
|
||||
void * operator new(std::size_t);
|
||||
};
|
||||
|
||||
struct derived_class_with_new_op : public class_with_new_op {};
|
||||
|
||||
struct class_with_new_op2 {
|
||||
void* operator new(std::size_t size, const std::nothrow_t&);
|
||||
};
|
||||
|
||||
struct class_with_new_op3 {
|
||||
void* operator new[](std::size_t size);
|
||||
};
|
||||
|
||||
struct class_with_new_op4 {
|
||||
void* operator new[](std::size_t size, const std::nothrow_t&);
|
||||
};
|
||||
|
||||
struct class_with_new_op5 {
|
||||
void* operator new (std::size_t size, void* ptr);
|
||||
};
|
||||
|
||||
struct class_with_new_op6 {
|
||||
void* operator new[] (std::size_t size, void* ptr);
|
||||
};
|
||||
|
||||
struct class_with_all_ops
|
||||
{
|
||||
void * operator new(std::size_t);
|
||||
void* operator new(std::size_t size, const std::nothrow_t&);
|
||||
void* operator new[](std::size_t size);
|
||||
void* operator new[](std::size_t size, const std::nothrow_t&);
|
||||
void* operator new (std::size_t size, void* ptr);
|
||||
void* operator new[] (std::size_t size, void* ptr);
|
||||
};
|
||||
|
||||
TT_TEST_BEGIN(has_new_operator)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<derived_class_with_new_op>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op2>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op3>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op4>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op5>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_new_op6>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<class_with_all_ops>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<bool const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<signed char const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned char const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<char const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned short const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<short const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned int const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned long const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long const volatile>::value, false);
|
||||
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::ulong_long_type const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator< ::boost::long_long_type const volatile>::value, false);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int8 const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int8 const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int16 const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int16 const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int32 const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int32 const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<unsigned __int64 const volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<__int64 const volatile>::value, false);
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<float const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<double const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double volatile>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<long double const volatile>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<void*>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int*const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f1>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f2>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<f3>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf1>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf2>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mf3>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<mp>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<cmf>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<enum_UDT>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int&>::value, false);
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int&&>::value, false);
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<const int&>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[2]>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[3][2]>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<int[2][4][5][6][3]>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<empty_UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_new_operator<void>::value, false);
|
||||
|
||||
TT_TEST_END
|
||||
@@ -0,0 +1,181 @@
|
||||
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#ifdef TEST_STD
|
||||
# include <type_traits>
|
||||
#else
|
||||
# include <boost/type_traits/has_trivial_constructor.hpp>
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(has_trivial_constructor)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<bool const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<signed char const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned char const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<char const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned short const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<short const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned int const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned long const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long const volatile>::value, true);
|
||||
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::ulong_long_type const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor< ::boost::long_long_type const volatile>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int8 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int8 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int16 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int16 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int32 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int32 const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<unsigned __int64 const volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<__int64 const volatile>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<float const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<double const volatile>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double volatile>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<long double const volatile>::value, true);
|
||||
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<void*>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int*const>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f1>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f2>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<f3>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf1>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf2>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mf3>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<mp>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<cmf>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<enum_UDT>::value, true);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int&>::value, false);
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int&&>::value, false);
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<const int&>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[2]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[3][2]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<int[2][4][5][6][3]>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<void>::value, true);
|
||||
// cases we would like to succeed but can't implement in the language:
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_POD_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<POD_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<POD_union_UDT>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<empty_POD_union_UDT>::value, true, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_construct>::value, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_destroy>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_assign>::value, true, false);
|
||||
//BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<trivial_except_copy>::value, true, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_construct> >::value, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_destroy> >::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_assign> >::value, true, false);
|
||||
//BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<wrap<trivial_except_copy> >::value, true, false);
|
||||
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_constructor<test_abc1>::value, false);
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
|
||||
// (C) Copyright John Maddock 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#ifdef TEST_STD
|
||||
# include <type_traits>
|
||||
#else
|
||||
# include <boost/type_traits/has_virtual_destructor.hpp>
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <new>
|
||||
|
||||
class polymorphic_no_virtual_destructor
|
||||
{
|
||||
public:
|
||||
virtual void method() = 0;
|
||||
};
|
||||
|
||||
TT_TEST_BEGIN(has_virtual_destructor)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<const int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<volatile int>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int*>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int* const>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int[2]>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<int&>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<mf4>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<f1>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<enum_UDT>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<empty_UDT>::value, false);
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT*>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT[2]>::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT&>::value, false);
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<UDT&&>::value, false);
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<void>::value, false);
|
||||
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<VB>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<VD>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<test_abc1>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<test_abc2>::value, true, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<polymorphic_no_virtual_destructor>::value, false);
|
||||
#ifndef BOOST_NO_STD_LOCALE
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::iostream>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_streambuf<char> >::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_ios<char> >::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_istream<char> >::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::basic_streambuf<char> >::value, true, false);
|
||||
#endif
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::exception>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::bad_alloc>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::runtime_error>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::out_of_range>::value, true, false);
|
||||
BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_virtual_destructor<std::range_error>::value, true, false);
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
|
||||
// (C) Copyright John Maddock 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_type.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#ifdef TEST_STD
|
||||
# include <type_traits>
|
||||
#else
|
||||
# include <boost/type_traits/make_signed.hpp>
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(make_signed)
|
||||
// signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<signed char>::type, signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<short>::type, short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<int>::type, int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<long>::type, long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<boost::long_long_type>::type, boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<__int64>::type, __int64);
|
||||
#endif
|
||||
// const signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const signed char>::type, const signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const short>::type, const short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const int>::type, const int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const long>::type, const long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const boost::long_long_type>::type, const boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const __int64>::type, const __int64);
|
||||
#endif
|
||||
// volatile signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile signed char>::type, volatile signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile short>::type, volatile short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile int>::type, volatile int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile long>::type, volatile long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile boost::long_long_type>::type, volatile boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile __int64>::type, volatile __int64);
|
||||
#endif
|
||||
// const volatile signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile signed char>::type, const volatile signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile short>::type, const volatile short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile int>::type, const volatile int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile long>::type, const volatile long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile boost::long_long_type>::type, const volatile boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile __int64>::type, const volatile __int64);
|
||||
#endif
|
||||
|
||||
// unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<unsigned char>::type, signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<unsigned short>::type, short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<unsigned int>::type, int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<unsigned long>::type, long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<boost::ulong_long_type>::type, boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<unsigned __int64>::type, __int64);
|
||||
#endif
|
||||
// const unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const unsigned char>::type, const signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const unsigned short>::type, const short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const unsigned int>::type, const int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const unsigned long>::type, const long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const boost::ulong_long_type>::type, const boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const unsigned __int64>::type, const __int64);
|
||||
#endif
|
||||
// volatile unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned char>::type, volatile signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned short>::type, volatile short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned int>::type, volatile int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned long>::type, volatile long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile boost::ulong_long_type>::type, volatile boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<volatile unsigned __int64>::type, volatile __int64);
|
||||
#endif
|
||||
// const volatile unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned char>::type, const volatile signed char);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned short>::type, const volatile short);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned int>::type, const volatile int);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned long>::type, const volatile long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile boost::ulong_long_type>::type, const volatile boost::long_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<const volatile unsigned __int64>::type, const volatile __int64);
|
||||
#endif
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<boost::int128_type>::type, boost::int128_type);
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<boost::uint128_type>::type, boost::int128_type);
|
||||
#endif
|
||||
|
||||
// character types:
|
||||
BOOST_CHECK_TYPE(::tt::make_signed<char>::type, signed char);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_signed<wchar_t>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed< ::tt::make_signed<wchar_t>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_signed<enum_UDT>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_signed< ::tt::make_signed<enum_UDT>::type>::value, true);
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
|
||||
// (C) Copyright John Maddock 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "test.hpp"
|
||||
#include "check_type.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
#ifdef TEST_STD
|
||||
# include <type_traits>
|
||||
#else
|
||||
# include <boost/type_traits/make_unsigned.hpp>
|
||||
#endif
|
||||
|
||||
TT_TEST_BEGIN(make_unsigned)
|
||||
// signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<signed char>::type, unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<short>::type, unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<int>::type, unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<long>::type, unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<boost::long_long_type>::type, boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<__int64>::type, unsigned __int64);
|
||||
#endif
|
||||
// const signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const signed char>::type, const unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const short>::type, const unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const int>::type, const unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const long>::type, const unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const boost::long_long_type>::type, const boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const __int64>::type, const unsigned __int64);
|
||||
#endif
|
||||
// volatile signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile signed char>::type, volatile unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile short>::type, volatile unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile int>::type, volatile unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile long>::type, volatile unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile boost::long_long_type>::type, volatile boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile __int64>::type, volatile unsigned __int64);
|
||||
#endif
|
||||
// const volatile signed types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile signed char>::type, const volatile unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile short>::type, const volatile unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile int>::type, const volatile unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile long>::type, const volatile unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile boost::long_long_type>::type, const volatile boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile __int64>::type, const volatile unsigned __int64);
|
||||
#endif
|
||||
|
||||
// unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned char>::type, unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned short>::type, unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned int>::type, unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned long>::type, unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<boost::ulong_long_type>::type, boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<unsigned __int64>::type, unsigned __int64);
|
||||
#endif
|
||||
// const unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned char>::type, const unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned short>::type, const unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned int>::type, const unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned long>::type, const unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const boost::ulong_long_type>::type, const boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const unsigned __int64>::type, const unsigned __int64);
|
||||
#endif
|
||||
// volatile unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned char>::type, volatile unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned short>::type, volatile unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned int>::type, volatile unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned long>::type, volatile unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile boost::ulong_long_type>::type, volatile boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<volatile unsigned __int64>::type, volatile unsigned __int64);
|
||||
#endif
|
||||
// const volatile unsigned types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned char>::type, const volatile unsigned char);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned short>::type, const volatile unsigned short);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned int>::type, const volatile unsigned int);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned long>::type, const volatile unsigned long);
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile boost::ulong_long_type>::type, const volatile boost::ulong_long_type);
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<const volatile unsigned __int64>::type, const volatile unsigned __int64);
|
||||
#endif
|
||||
#ifdef BOOST_HAS_INT128
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<boost::int128_type>::type, boost::uint128_type);
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<boost::uint128_type>::type, boost::uint128_type);
|
||||
#endif
|
||||
|
||||
// character types:
|
||||
BOOST_CHECK_TYPE(::tt::make_unsigned<char>::type, unsigned char);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_unsigned<wchar_t>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned< ::tt::make_unsigned<wchar_t>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_integral< ::tt::make_unsigned<enum_UDT>::type>::value, true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_unsigned< ::tt::make_unsigned<enum_UDT>::type>::value, true);
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user