From 4b1012e1fe5f49b484accc65be025977d5a03fee Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sat, 17 Jan 2004 10:06:16 +0000 Subject: [PATCH] MSVC 7.1 fix, for enums [SVN r21795] --- include/boost/mpl/equal_to.hpp | 31 ++++++++++++++--------------- include/boost/mpl/greater.hpp | 31 ++++++++++++++--------------- include/boost/mpl/greater_equal.hpp | 31 ++++++++++++++--------------- include/boost/mpl/less.hpp | 31 ++++++++++++++--------------- include/boost/mpl/less_equal.hpp | 31 ++++++++++++++--------------- include/boost/mpl/not_equal_to.hpp | 31 ++++++++++++++--------------- 6 files changed, 90 insertions(+), 96 deletions(-) diff --git a/include/boost/mpl/equal_to.hpp b/include/boost/mpl/equal_to.hpp index e20164f..f01b4cb 100644 --- a/include/boost/mpl/equal_to.hpp +++ b/include/boost/mpl/equal_to.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_EQUAL_TO_HPP_INCLUDED -// + file: boost/mpl/equal_to.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct equal_to { - BOOST_STATIC_CONSTANT(bool, value = ( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - == BOOST_MPL_AUX_VALUE_WKND(T2)::value - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + == BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type; diff --git a/include/boost/mpl/greater.hpp b/include/boost/mpl/greater.hpp index a0d5c50..cafb4b0 100644 --- a/include/boost/mpl/greater.hpp +++ b/include/boost/mpl/greater.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_GREATER_HPP_INCLUDED #define BOOST_MPL_GREATER_HPP_INCLUDED -// + file: boost/mpl/greater.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct greater { - BOOST_STATIC_CONSTANT(bool, value = ( - (BOOST_MPL_AUX_VALUE_WKND(T1)::value) - > (BOOST_MPL_AUX_VALUE_WKND(T2)::value) - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + > BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type; diff --git a/include/boost/mpl/greater_equal.hpp b/include/boost/mpl/greater_equal.hpp index 9e93bcb..79d4f3b 100644 --- a/include/boost/mpl/greater_equal.hpp +++ b/include/boost/mpl/greater_equal.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED #define BOOST_MPL_GREATER_EQUAL_HPP_INCLUDED -// + file: boost/mpl/greater_equal.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct greater_equal { - BOOST_STATIC_CONSTANT(bool, value = ( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - >= BOOST_MPL_AUX_VALUE_WKND(T2)::value - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + >= BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type; diff --git a/include/boost/mpl/less.hpp b/include/boost/mpl/less.hpp index f7db4c8..c3cbc45 100644 --- a/include/boost/mpl/less.hpp +++ b/include/boost/mpl/less.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_LESS_HPP_INCLUDED #define BOOST_MPL_LESS_HPP_INCLUDED -// + file: boost/mpl/less.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct less { - BOOST_STATIC_CONSTANT(bool, value = ( - (BOOST_MPL_AUX_VALUE_WKND(T1)::value) - < (BOOST_MPL_AUX_VALUE_WKND(T2)::value) - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + < BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type; diff --git a/include/boost/mpl/less_equal.hpp b/include/boost/mpl/less_equal.hpp index d3688ae..6ecebbc 100644 --- a/include/boost/mpl/less_equal.hpp +++ b/include/boost/mpl/less_equal.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_LESS_EQUAL_HPP_INCLUDED #define BOOST_MPL_LESS_EQUAL_HPP_INCLUDED -// + file: boost/mpl/less_equal.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct less_equal { - BOOST_STATIC_CONSTANT(bool, value = ( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - <= BOOST_MPL_AUX_VALUE_WKND(T2)::value - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + <= BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type; diff --git a/include/boost/mpl/not_equal_to.hpp b/include/boost/mpl/not_equal_to.hpp index 93780ba..6b42e56 100644 --- a/include/boost/mpl/not_equal_to.hpp +++ b/include/boost/mpl/not_equal_to.hpp @@ -2,22 +2,18 @@ #ifndef BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED #define BOOST_MPL_NOT_EQUAL_TO_HPP_INCLUDED -// + file: boost/mpl/not_equal_to.hpp -// + last modified: 25/feb/03 - -// Copyright (c) 2000-03 -// Aleksey Gurtovoy +// Copyright (c) 2000-03 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. +// 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/mpl for documentation. +// $Source$ +// $Date$ +// $Revision$ + #include "boost/mpl/bool.hpp" #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/value_wknd.hpp" @@ -34,10 +30,13 @@ template< > struct not_equal_to { - BOOST_STATIC_CONSTANT(bool, value = ( - BOOST_MPL_AUX_VALUE_WKND(T1)::value - != BOOST_MPL_AUX_VALUE_WKND(T2)::value - )); + enum + { + msvc71_wknd_ = ( BOOST_MPL_AUX_VALUE_WKND(T1)::value + != BOOST_MPL_AUX_VALUE_WKND(T2)::value ) + }; + + BOOST_STATIC_CONSTANT(bool, value = msvc71_wknd_); #if !defined(__BORLANDC__) typedef bool_ type;