mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-05 15:54:39 +02:00
add BOOST_MPL_AUX_NTTP_DECL macro
[SVN r16554]
This commit is contained in:
23
include/boost/mpl/aux_/config/msvc.hpp
Normal file
23
include/boost/mpl/aux_/config/msvc.hpp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/msvc.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-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_MSVC_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
|
||||||
|
|
||||||
|
// BOOST_MSVC is defined here:
|
||||||
|
#include "boost/config.hpp"
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED
|
@@ -1,5 +1,5 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// boost mpl/aux_/config/ntp.hpp header file
|
// boost mpl/aux_/config/nttp.hpp header file
|
||||||
// See http://www.boost.org for updates, documentation, and revision history.
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
@@ -14,43 +14,41 @@
|
|||||||
// suitability of this software for any purpose. It is provided "as is"
|
// suitability of this software for any purpose. It is provided "as is"
|
||||||
// without express or implied warranty.
|
// without express or implied warranty.
|
||||||
|
|
||||||
#ifndef BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED
|
#ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
||||||
#define BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED
|
#define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
||||||
|
|
||||||
#include "boost/config.hpp"
|
#include "boost/mpl/aux_/config/msvc.hpp"
|
||||||
|
|
||||||
// MSVC 6.5 ICE-s on the code as simple as this:
|
// MSVC 6.5 ICE-s on the code as simple as this:
|
||||||
/*
|
//
|
||||||
namespace std {
|
// namespace std {
|
||||||
template< typename Char > struct string;
|
// template< typename Char > struct string;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
void foo(std::string<char>);
|
// void foo(std::string<char>);
|
||||||
|
//
|
||||||
namespace boost {
|
// namespace boost { namespace mpl {
|
||||||
namespace mpl {
|
// template< int > struct arg;
|
||||||
|
// }}
|
||||||
template< int > struct arg;
|
//
|
||||||
|
// fortunately, a workaround is simple as well:
|
||||||
}}
|
//
|
||||||
*/
|
// typedef int nttp_int;
|
||||||
// the only way to get around the bug is to replace the normal non-type
|
// template< nttp_int > struct arg;
|
||||||
// template parameter ('int', 'long', etc.) by an 'enum' type
|
|
||||||
|
|
||||||
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
#if defined(BOOST_MSVC) && BOOST_MSVC < 1300
|
||||||
|
|
||||||
namespace boost { namespace mpl { namespace aux {
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
enum ntp { max_value = 0xffffffff };
|
namespace boost { namespace mpl {
|
||||||
}}}
|
typedef int nttp_int;
|
||||||
|
typedef long nttp_long;
|
||||||
# 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
|
||||||
|
|
||||||
#endif // BOOST_MPL_AUX_CONFIG_NTP_HPP_INCLUDED
|
# define BOOST_MPL_AUX_NTTP_DECL(T, x) nttp_##T x /**/
|
||||||
|
|
||||||
|
#else
|
||||||
|
# define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED
|
25
include/boost/mpl/aux_/config/static_constant.hpp
Normal file
25
include/boost/mpl/aux_/config/static_constant.hpp
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// boost mpl/aux_/config/static_constant.hpp header file
|
||||||
|
// See http://www.boost.org for updates, documentation, and revision history.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Copyright (c) 2000-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_STATIC_CONSTANT_HPP_INCLUDED
|
||||||
|
#define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
|
||||||
|
|
||||||
|
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||||
|
// BOOST_STATIC_CONSTANT is defined here:
|
||||||
|
# include "boost/config.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED
|
Reference in New Issue
Block a user