From 4d47b983aa1857715f6dde45d3f5fc3bbb84e6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaakko=20J=C3=A4rvi?= Date: Fri, 5 Sep 2003 18:22:40 +0000 Subject: [PATCH] supporting mpl aware enable if now [SVN r1504] --- include/boost/utility/enable_if.hpp | 36 ++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/include/boost/utility/enable_if.hpp b/include/boost/utility/enable_if.hpp index 4a0a408..53a4f25 100644 --- a/include/boost/utility/enable_if.hpp +++ b/include/boost/utility/enable_if.hpp @@ -66,27 +66,51 @@ namespace boost { template - struct enable_if { + struct enable_if_c { typedef T type; }; template - struct enable_if {}; + struct enable_if_c {}; + template + struct enable_if : public enable_if_c {}; template - struct enable_if_lazy { + struct lazy_enable_if_c { typedef typename T::type type; }; template - struct enable_if_lazy {}; + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + template - struct disable_if: public enable_if< !B, T> {}; + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; template - struct disable_if_lazy: public enable_if_lazy< !B, T> {}; + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + + } // namespace boost