From 0bdf1a13e244f550a6be6ebc5160210b390b53a1 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sat, 13 Dec 2003 10:06:06 +0000 Subject: [PATCH] DigitalMars fixes [SVN r21242] --- include/boost/config/compiler/digitalmars.hpp | 28 +++++++++++++++++ .../boost/config/select_compiler_config.hpp | 6 ++-- include/boost/config/stdlib/stlport.hpp | 4 +-- test/boost_no_array_type_spec.ipp | 30 +++++++++++++++++++ 4 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 include/boost/config/compiler/digitalmars.hpp create mode 100644 test/boost_no_array_type_spec.ipp diff --git a/include/boost/config/compiler/digitalmars.hpp b/include/boost/config/compiler/digitalmars.hpp new file mode 100644 index 00000000..265abcb9 --- /dev/null +++ b/include/boost/config/compiler/digitalmars.hpp @@ -0,0 +1,28 @@ +// Copyright (C) Christof Meerwald 2003 +// Copyright (C) Dan Watkins 2003 +// +// 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) + +// Digital Mars C++ compiler setup: +#define BOOST_COMPILER __DMC_VERSION_STRING__ + +#define BOOST_HAS_LONG_LONG + +#define BOOST_NO_TEMPLATE_TEMPLATES +//#define NEEDS_PASTING_TOKEN_FOR_JUXTAPOSING + +#define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS +#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS + +// check for exception handling support: +#ifndef _CPPUNWIND +# define BOOST_NO_EXCEPTIONS +#endif + +#if (__DMC__ < 0x833) +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif diff --git a/include/boost/config/select_compiler_config.hpp b/include/boost/config/select_compiler_config.hpp index 965e8045..e8f75ec0 100644 --- a/include/boost/config/select_compiler_config.hpp +++ b/include/boost/config/select_compiler_config.hpp @@ -16,6 +16,10 @@ // Comeau C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" +#elif defined __DMC__ +// Digital Mars C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" + #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" @@ -77,5 +81,3 @@ # error "Unknown compiler - please configure and report the results to boost.org" #endif - - diff --git a/include/boost/config/stdlib/stlport.hpp b/include/boost/config/stdlib/stlport.hpp index b5392e3a..94d705bb 100644 --- a/include/boost/config/stdlib/stlport.hpp +++ b/include/boost/config/stdlib/stlport.hpp @@ -99,7 +99,7 @@ // BCB6 does cause problems. If we detect C++ Builder, then don't define // BOOST_NO_STDC_NAMESPACE // -#if !defined(__BORLANDC__) +#if !defined(__BORLANDC__) && !defined(__DMC__) // // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations @@ -114,7 +114,7 @@ # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif -#elif __BORLANDC__ < 0x560 +#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 // STLport doesn't import std::abs correctly: #include namespace std { using ::abs; } diff --git a/test/boost_no_array_type_spec.ipp b/test/boost_no_array_type_spec.ipp new file mode 100644 index 00000000..3048669a --- /dev/null +++ b/test/boost_no_array_type_spec.ipp @@ -0,0 +1,30 @@ +// (C) Copyright John Maddock 2001. +// (C) Copyright Aleksey Gurtovoy 2003. +// 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) + +// See http://www.boost.org/libs/config for most recent version. + +// MACRO: BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS +// TITLE: template specialisations of array types +// DESCRIPTION: If the compiler cannot handle template specialisations +// for array types + + +namespace boost_no_array_type_specializations{ + +template< typename T > struct is_array +{ +}; + +template< typename T, int N > struct is_array< T[N] > +{ +}; + +int test() +{ + return 0; +} + +}