From 3155044abde5051c202553765f5c616903297770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Fri, 5 Dec 2003 21:38:43 +0000 Subject: [PATCH] added dummy versions of enable_if templates for platforms that have BOOST_NO_SFINAE defined [SVN r21154] --- include/boost/utility/enable_if.hpp | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/boost/utility/enable_if.hpp b/include/boost/utility/enable_if.hpp index 0498d36..df126c1 100644 --- a/include/boost/utility/enable_if.hpp +++ b/include/boost/utility/enable_if.hpp @@ -15,6 +15,7 @@ #define BOOST_UTILITY_ENABLE_IF_HPP #include +#include // Even the definition of enable_if causes problems on some compilers, // so it's macroed out for all compilers that do not support SFINAE @@ -71,6 +72,46 @@ namespace boost } // namespace boost +#else + +namespace boost { + + BOOST_STATIC_CONSTANT(bool, enable_if_does_not_work_on_this_compiler = false); + + template + struct enable_if_c + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct disable_if_c + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct lazy_enable_if_c + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct lazy_disable_if_c + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct enable_if + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct disable_if + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct lazy_enable_if + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + + template + struct lazy_disable_if + { BOOST_STATIC_ASSERT(enable_if_does_not_work_on_this_compiler); }; + +} // namespace boost + #endif // BOOST_NO_SFINAE #endif