forked from boostorg/typeof
Changes required to common in order to make vintage implementation work.
[SVN r2359]
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#ifndef BOOST_TYPEOF_CONFIG_HPP_INCLUDED
|
||||
#define BOOST_TYPEOF_CONFIG_HPP_INCLUDED
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if !defined(BOOST_TYPEOF_COMPLIANT) && !defined(BOOST_TYPEOF_VINTAGE) && !defined(BOOST_TYPEOF_NATIVE)
|
||||
|
||||
# if defined __GNUC__
|
||||
@@ -13,7 +15,7 @@
|
||||
# elif defined __MWERKS__
|
||||
# define BOOST_TYPEOF_NATIVE
|
||||
|
||||
# elif defined BOOST_TYPEOF_NO_PARTIAL_TEMPLATE_SPECIALIZATION
|
||||
# elif defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_TYPEOF_VINTAGE
|
||||
|
||||
# else
|
||||
@@ -23,4 +25,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TYPEOF_VINTAGE
|
||||
#include <boost/typeof/vintage/config.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
#endif//BOOST_TYPEOF_CONFIG_HPP_INCLUDED
|
||||
|
@@ -17,32 +17,29 @@
|
||||
|
||||
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
|
||||
|
||||
#ifndef BOOST_TYPEOF_FUN_PARAMS_SUPPORTED
|
||||
#define BOOST_TYPEOF_FUN_PARAMS_SUPPORTED 10
|
||||
#ifndef BOOST_TYPEOF_LIMIT_FUNCTION_ARITY
|
||||
#define BOOST_TYPEOF_LIMIT_FUNCTION_ARITY 10
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
FUN_ID = BOOST_TYPEOF_UNIQUE_ID(),
|
||||
VOID_FUN_ID = FUN_ID + 1 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
MEM_FUN_ID = FUN_ID + 2 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
CONST_MEM_FUN_ID = FUN_ID + 3 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
VOID_MEM_FUN_ID = FUN_ID + 4 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
CONST_VOID_MEM_FUN_ID = FUN_ID + 5 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
VOLATILE_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 7 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
VOLATILE_VOID_MEM_FUN_ID = FUN_ID + 8 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED),
|
||||
VOLATILE_CONST_VOID_MEM_FUN_ID = FUN_ID + 9 * BOOST_PP_INC(BOOST_TYPEOF_FUN_PARAMS_SUPPORTED)
|
||||
FUN_REF_ID = FUN_ID + 1 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
MEM_FUN_ID = FUN_ID + 2 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
CONST_MEM_FUN_ID = FUN_ID + 3 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
CONST_VOID_MEM_FUN_ID = FUN_ID + 4 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
VOLATILE_MEM_FUN_ID = FUN_ID + 5 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
VOLATILE_CONST_MEM_FUN_ID = FUN_ID + 6 * BOOST_PP_INC(BOOST_TYPEOF_LIMIT_FUNCTION_ARITY),
|
||||
};
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace type_of
|
||||
{
|
||||
namespace
|
||||
{
|
||||
namespace
|
||||
{
|
||||
# define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPEOF_FUN_PARAMS_SUPPORTED)
|
||||
// BOOST_PP_FILENAME_1 is defined outside
|
||||
# define BOOST_PP_ITERATION_LIMITS (0, BOOST_TYPEOF_LIMIT_FUNCTION_ARITY)
|
||||
// BOOST_PP_FILENAME_1 is defined outside
|
||||
# include BOOST_PP_ITERATE()
|
||||
}
|
||||
}
|
||||
|
@@ -9,17 +9,55 @@
|
||||
|
||||
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(char);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(short);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(int);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(long);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned char);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned short);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned int);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned long);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(float);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(double);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(bool);
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned char)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned short)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned int)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned long)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(signed char)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(signed short)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(signed int)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(signed long)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(bool)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(char)
|
||||
|
||||
BOOST_TYPEOF_REGISTER_TYPE(float)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(double)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(long double)
|
||||
|
||||
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// If the following line fails to compile and you're using the Intel
|
||||
// compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php,
|
||||
// and define BOOST_NO_INTRINSIC_WCHAR_T on the command line.
|
||||
BOOST_TYPEOF_REGISTER_TYPE(wchar_t)
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_MSVC) && (BOOST_MSVC == 1200)) \
|
||||
|| (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \
|
||||
|| (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER == 1200))
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int8)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(__int8)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int16)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(__int16)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int32)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(__int32)
|
||||
#ifdef __BORLANDC__
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int64)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(__int64)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# if defined(BOOST_HAS_LONG_LONG)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(::boost::ulong_long_type)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(::boost::long_long_type)
|
||||
#elif defined(BOOST_HAS_MS_INT64)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(unsigned __int64)
|
||||
BOOST_TYPEOF_REGISTER_TYPE(__int64)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_TYPEOF_COMPLIANT
|
||||
BOOST_TYPEOF_REGISTER_TYPE(void);
|
||||
#endif
|
||||
|
||||
#endif//BOOST_TYPEOF_REGISTER_FUNDAMENTAL_HPP_INCLUDED
|
||||
|
@@ -15,7 +15,7 @@
|
||||
# include <boost/typeof/compliant/typeof_impl.hpp>
|
||||
|
||||
#elif defined(BOOST_TYPEOF_VINTAGE)
|
||||
// include something to define BOOST_TYPEOF, BOOST_TYPEOF_TPL
|
||||
# include <boost/typeof/vintage/typeof_impl.hpp>
|
||||
|
||||
#else//BOOST_TYPEOF_NATIVE
|
||||
|
||||
@@ -27,14 +27,12 @@
|
||||
#endif
|
||||
|
||||
// auto
|
||||
|
||||
#define BOOST_AUTO(Var, Expr) BOOST_TYPEOF(Expr) Var(Expr)
|
||||
#define BOOST_AUTO_TPL(Var, Expr) BOOST_TYPEOF_TPL(Expr) Var(Expr)
|
||||
|
||||
// lvalue typeof
|
||||
|
||||
#if defined(BOOST_TYPEOF_VINTAGE)
|
||||
// include lvalue_typeof definition
|
||||
# include <boost/typeof/vintage/lvalue_typeof.hpp>
|
||||
#else
|
||||
# include <boost/typeof/compliant/lvalue_typeof.hpp>
|
||||
#endif
|
||||
@@ -45,7 +43,8 @@
|
||||
# include <boost/typeof/compliant/type_encoding.hpp>
|
||||
# include <boost/typeof/compliant/template_encoding.hpp>
|
||||
#elif defined(BOOST_TYPEOF_VINTAGE)
|
||||
// include type encoding definitions
|
||||
# include <boost/typeof/vintage/type_encoding.hpp>
|
||||
# include <boost/typeof/vintage/template_encoding.hpp>
|
||||
#else//BOOST_TYPEOF_NATIVE
|
||||
# define BOOST_TYPEOF_REGISTER_TYPE(x)
|
||||
# define BOOST_TYPEOF_REGISTER_TEMPLATE_X(x, params)
|
||||
@@ -76,7 +75,10 @@
|
||||
# include <boost/typeof/register_functions.hpp>
|
||||
|
||||
#elif defined(BOOST_TYPEOF_VINTAGE)
|
||||
// include stuff here
|
||||
# include <boost/typeof/vintage/modifiers.hpp>
|
||||
# include <boost/typeof/vintage/pointers_data_members.hpp>
|
||||
# define BOOST_PP_FILENAME_1 <boost/typeof/vintage/register_functions_iterate.hpp>
|
||||
# include <boost/typeof/register_functions.hpp>
|
||||
#else //BOOST_TYPEOF_NATIVE
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user