diff --git a/include/boost/typeof/modifiers.hpp b/include/boost/typeof/modifiers.hpp index 104af7c..4d00788 100644 --- a/include/boost/typeof/modifiers.hpp +++ b/include/boost/typeof/modifiers.hpp @@ -37,7 +37,7 @@ #define BOOST_TYPEOF_pointer_fun(T) T* #define BOOST_TYPEOF_reference_fun(T) T& -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(__BORLANDC__) && !defined(__clang__) && (__BORLANDC__ < 0x600) //Borland incorrectly handles T const, T const volatile and T volatile. //It drops the decoration no matter what, so we need to try to handle T* const etc. without loosing the top modifier. #define BOOST_TYPEOF_const_pointer_fun(T) T const * @@ -56,7 +56,7 @@ BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_co BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_pointer_fun); BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_reference_fun); -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(__BORLANDC__) && !defined(__clang__) && (__BORLANDC__ < 0x600) BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_pointer_fun); BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_reference_fun); BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_pointer_fun); @@ -74,7 +74,7 @@ BOOST_TYPEOF_END_ENCODE_NS #undef BOOST_TYPEOF_pointer_fun #undef BOOST_TYPEOF_reference_fun -#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +#if defined(__BORLANDC__) && !defined(__clang__) && (__BORLANDC__ < 0x600) #undef BOOST_TYPEOF_const_pointer_fun #undef BOOST_TYPEOF_const_reference_fun #undef BOOST_TYPEOF_volatile_pointer_fun diff --git a/include/boost/typeof/register_fundamental.hpp b/include/boost/typeof/register_fundamental.hpp index a6164ba..3053afa 100644 --- a/include/boost/typeof/register_fundamental.hpp +++ b/include/boost/typeof/register_fundamental.hpp @@ -35,14 +35,14 @@ BOOST_TYPEOF_REGISTER_TYPE(wchar_t) #endif #if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ - || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER == 1200)) + || (defined(BOOST_BORLANDC) && (BOOST_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__ +#ifdef BOOST_BORLANDC BOOST_TYPEOF_REGISTER_TYPE(unsigned __int64) BOOST_TYPEOF_REGISTER_TYPE(__int64) #endif diff --git a/include/boost/typeof/std/string.hpp b/include/boost/typeof/std/string.hpp index bcafff3..be7f16f 100644 --- a/include/boost/typeof/std/string.hpp +++ b/include/boost/typeof/std/string.hpp @@ -16,7 +16,7 @@ BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 1) BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 2) BOOST_TYPEOF_REGISTER_TEMPLATE(std::basic_string, 3) -#ifndef __BORLANDC__ +#ifndef BOOST_BORLANDC //Borland chokes on this "double definition" of string BOOST_TYPEOF_REGISTER_TYPE(std::string) #endif diff --git a/include/boost/typeof/template_encoding.hpp b/include/boost/typeof/template_encoding.hpp index 0bb7ed3..48c1336 100644 --- a/include/boost/typeof/template_encoding.hpp +++ b/include/boost/typeof/template_encoding.hpp @@ -23,7 +23,7 @@ #include #include -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC #define BOOST_TYPEOF_QUALIFY(P) self_t::P #else #define BOOST_TYPEOF_QUALIFY(P) P diff --git a/include/boost/typeof/template_template_param.hpp b/include/boost/typeof/template_template_param.hpp index 6f0a329..93fad42 100644 --- a/include/boost/typeof/template_template_param.hpp +++ b/include/boost/typeof/template_template_param.hpp @@ -93,7 +93,7 @@ namespace boost { namespace type_of { #define BOOST_TYPEOF_TYPEDEF_INT_PN(z,n,Params) typedef int BOOST_PP_CAT(P,n); -#ifdef __BORLANDC__ +#if defined(__BORLANDC__) && !defined(__clang__) #define BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME BOOST_PP_CAT(\ BOOST_PP_CAT(\ BOOST_PP_CAT(\ diff --git a/include/boost/typeof/typeof.hpp b/include/boost/typeof/typeof.hpp index d2c49fb..37488ca 100644 --- a/include/boost/typeof/typeof.hpp +++ b/include/boost/typeof/typeof.hpp @@ -84,7 +84,7 @@ # define BOOST_TYPEOF_KEYWORD __typeof__ # endif # endif -#elif defined __CODEGEARC__ +#elif defined BOOST_CODEGEARC # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_EMULATION_UNSUPPORTED @@ -92,7 +92,7 @@ # else # define BOOST_TYPEOF_EMULATION_UNSUPPORTED # endif -#elif defined __BORLANDC__ +#elif defined BOOST_BORLANDC # ifndef BOOST_TYPEOF_EMULATION # ifndef BOOST_TYPEOF_NATIVE # define BOOST_TYPEOF_EMULATION_UNSUPPORTED @@ -142,8 +142,8 @@ # error native typeof is not supported # endif -#elif defined(__BORLANDC__) -# if (__BORLANDC__ < 0x590) +#elif defined(BOOST_BORLANDC) +# if (BOOST_BORLANDC < 0x590) # define BOOST_TYPEOF_NO_FUNCTION_TYPES # define BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES # endif diff --git a/include/boost/typeof/typeof_impl.hpp b/include/boost/typeof/typeof_impl.hpp index 73a25df..dd058d3 100644 --- a/include/boost/typeof/typeof_impl.hpp +++ b/include/boost/typeof/typeof_impl.hpp @@ -107,7 +107,7 @@ namespace boost { namespace type_of { typedef _typeof_encode_fraction fraction_type; #endif -#ifdef __BORLANDC__ +#ifdef BOOST_BORLANDC namespace boost { namespace type_of { template struct generic_typeof_fraction_iter {