From c9bd23e94acfeb834bf0d0304a0cdaa50cd57d9a Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Mon, 18 Nov 2002 10:31:38 +0000 Subject: [PATCH] new config headers [SVN r16308] --- include/boost/mpl/aux_/config/ctps.hpp | 2 + include/boost/mpl/aux_/config/ntp.hpp | 56 +++++++++++++++++++ .../mpl/aux_/config/use_preprocessed.hpp | 2 +- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 include/boost/mpl/aux_/config/ntp.hpp diff --git a/include/boost/mpl/aux_/config/ctps.hpp b/include/boost/mpl/aux_/config/ctps.hpp index 55c0adc..dfc9d0b 100644 --- a/include/boost/mpl/aux_/config/ctps.hpp +++ b/include/boost/mpl/aux_/config/ctps.hpp @@ -24,4 +24,6 @@ # define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION #endif +// BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp" + #endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/ntp.hpp b/include/boost/mpl/aux_/config/ntp.hpp new file mode 100644 index 0000000..039d028 --- /dev/null +++ b/include/boost/mpl/aux_/config/ntp.hpp @@ -0,0 +1,56 @@ +//----------------------------------------------------------------------------- +// boost mpl/aux_/config/ntp.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2001-02 +// Aleksey Gurtovoy +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appears in all copies and +// that both the copyright notice and this permission notice appear in +// supporting documentation. No representations are made about the +// suitability of this software for any purpose. It is provided "as is" +// without express or implied warranty. + +#ifndef BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED + +#include "boost/config.hpp" + +// MSVC 6.5 ICE-s on the code as simple as this: +/* + namespace std { + template< typename Char > struct string; + } + + void foo(std::string); + + namespace boost { + namespace mpl { + + template< int > struct arg; + + }} +*/ +// the only way to get around the bug is to replace the normal non-type +// template parameter ('int', 'long', etc.) by an 'enum' type + +#if defined(BOOST_MSVC) && BOOST_MSVC < 1300 + +namespace boost { namespace mpl { namespace aux { +enum ntp { max_value = 0xffffffff }; +}}} + +# define BOOST_MPL_AUX_NTP_DECL(T, x) aux::ntp x /**/ +# define BOOST_MPL_AUX_NTP_VALUE(n) aux::ntp(n) /**/ + +#else + +# define BOOST_MPL_AUX_NTP_DECL(T, x) T x /**/ +# define BOOST_MPL_AUX_NTP_VALUE(n) n /**/ + +#endif + +#endif // BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/use_preprocessed.hpp b/include/boost/mpl/aux_/config/use_preprocessed.hpp index 0165449..2ed83dd 100644 --- a/include/boost/mpl/aux_/config/use_preprocessed.hpp +++ b/include/boost/mpl/aux_/config/use_preprocessed.hpp @@ -17,6 +17,6 @@ #ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED -#define BOOST_MPL_USE_PREPROCESSED_HEADERS +//#define BOOST_MPL_USE_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED