From caad29f22ab1c2f1cf89b489381509bbe58c3c7d Mon Sep 17 00:00:00 2001 From: Pavol Droba Date: Wed, 14 Jul 2004 21:21:54 +0000 Subject: [PATCH] Added vacpp workaround for static constants [SVN r23557] --- .../algorithm/string/sequence_traits.hpp | 24 +++++++++++++++---- .../algorithm/string/std/list_traits.hpp | 24 ++++++++++++++----- .../algorithm/string/std/rope_traits.hpp | 24 +++++++++++++++---- .../algorithm/string/std/slist_traits.hpp | 18 +++++++++++--- .../algorithm/string/std/string_traits.hpp | 9 +++++-- 5 files changed, 80 insertions(+), 19 deletions(-) diff --git a/include/boost/algorithm/string/sequence_traits.hpp b/include/boost/algorithm/string/sequence_traits.hpp index 063c72a..d6875b2 100644 --- a/include/boost/algorithm/string/sequence_traits.hpp +++ b/include/boost/algorithm/string/sequence_traits.hpp @@ -92,8 +92,12 @@ namespace boost { BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_native_replace_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - public: + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -116,8 +120,12 @@ namespace boost { BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_stable_iterators_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - public: + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_ type; @@ -139,8 +147,12 @@ namespace boost { BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_insert_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - public: + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_ type; @@ -162,8 +174,12 @@ namespace boost { BOOST_STATIC_CONSTANT(bool, value=( sizeof(has_const_time_erase_tester(t))==sizeof(yes_type) ) ); #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - public: + public: +# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = false }; +# else BOOST_STATIC_CONSTANT(bool, value=false); +# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION typedef mpl::bool_ type; diff --git a/include/boost/algorithm/string/std/list_traits.hpp b/include/boost/algorithm/string/std/list_traits.hpp index db6da45..92e4b5c 100644 --- a/include/boost/algorithm/string/std/list_traits.hpp +++ b/include/boost/algorithm/string/std/list_traits.hpp @@ -36,30 +36,42 @@ namespace boost { #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - // stable iterators trait + // stable iterators trait template class has_stable_iterators< ::std::list > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; - // const time insert trait + // const time insert trait template class has_const_time_insert< ::std::list > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; - // const time erase trait + // const time erase trait template class has_const_time_erase< ::std::list > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; #endif diff --git a/include/boost/algorithm/string/std/rope_traits.hpp b/include/boost/algorithm/string/std/rope_traits.hpp index 85fb63e..98f3451 100644 --- a/include/boost/algorithm/string/std/rope_traits.hpp +++ b/include/boost/algorithm/string/std/rope_traits.hpp @@ -43,8 +43,12 @@ namespace boost { template class has_native_replace< std::rope > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; @@ -52,8 +56,12 @@ namespace boost { template class has_stable_iterators< std::rope > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; @@ -61,8 +69,12 @@ namespace boost { template class has_const_time_insert< std::rope > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; @@ -70,8 +82,12 @@ namespace boost { template class has_const_time_erase< std::rope > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; #endif diff --git a/include/boost/algorithm/string/std/slist_traits.hpp b/include/boost/algorithm/string/std/slist_traits.hpp index c25fc8a..13d23ac 100644 --- a/include/boost/algorithm/string/std/slist_traits.hpp +++ b/include/boost/algorithm/string/std/slist_traits.hpp @@ -39,8 +39,12 @@ namespace boost { template class has_stable_iterators< std::slist > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; @@ -48,8 +52,12 @@ namespace boost { template class has_const_time_insert< std::slist > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; @@ -57,8 +65,12 @@ namespace boost { template class has_const_time_erase< std::slist > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true }; +#else BOOST_STATIC_CONSTANT(bool, value=true); +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) typedef mpl::bool_ type; }; #endif diff --git a/include/boost/algorithm/string/std/string_traits.hpp b/include/boost/algorithm/string/std/string_traits.hpp index 8b28c1c..89b7543 100644 --- a/include/boost/algorithm/string/std/string_traits.hpp +++ b/include/boost/algorithm/string/std/string_traits.hpp @@ -31,9 +31,14 @@ namespace boost { template class has_native_replace< std::basic_string > { - public: + public: +#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + enum { value = true } ; +#else BOOST_STATIC_CONSTANT(bool, value=true); - typedef mpl::bool_ type; +#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) + + typedef mpl::bool_ type; };