summaryrefslogtreecommitdiff
path: root/boost/type_erasure/is_placeholder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/type_erasure/is_placeholder.hpp')
-rw-r--r--boost/type_erasure/is_placeholder.hpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/boost/type_erasure/is_placeholder.hpp b/boost/type_erasure/is_placeholder.hpp
index 055ee621ad..a1e67fc165 100644
--- a/boost/type_erasure/is_placeholder.hpp
+++ b/boost/type_erasure/is_placeholder.hpp
@@ -12,16 +12,27 @@
#define BOOST_TYPE_ERASURE_DETAIL_IS_PLACEHOLDER_HPP_INCLUDED
#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/type_erasure/placeholder.hpp>
namespace boost {
namespace type_erasure {
+#ifdef BOOST_TYPE_ERASURE_DOXYGEN
+
/** A metafunction that indicates whether a type is a @ref placeholder. */
template<class T>
-struct is_placeholder : ::boost::is_base_and_derived<placeholder, T> {};
+struct is_placeholder {};
+
+#else
+
+template<class T, class Enable = void>
+struct is_placeholder : ::boost::mpl::false_ {};
+
+template<class T>
+struct is_placeholder<T, typename T::_boost_type_erasure_is_placeholder> :
+ ::boost::mpl::true_ {};
+
+#endif
}
}