is_placeholder.hpp 830 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Boost.TypeErasure library
  2. //
  3. // Copyright 2011 Steven Watanabe
  4. //
  5. // Distributed under the Boost Software License Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. //
  9. // $Id$
  10. #ifndef BOOST_TYPE_ERASURE_DETAIL_IS_PLACEHOLDER_HPP_INCLUDED
  11. #define BOOST_TYPE_ERASURE_DETAIL_IS_PLACEHOLDER_HPP_INCLUDED
  12. #include <boost/mpl/bool.hpp>
  13. namespace boost {
  14. namespace type_erasure {
  15. #ifdef BOOST_TYPE_ERASURE_DOXYGEN
  16. /** A metafunction that indicates whether a type is a @ref placeholder. */
  17. template<class T>
  18. struct is_placeholder {};
  19. #else
  20. template<class T, class Enable = void>
  21. struct is_placeholder : ::boost::mpl::false_ {};
  22. template<class T>
  23. struct is_placeholder<T, typename T::_boost_type_erasure_is_placeholder> :
  24. ::boost::mpl::true_ {};
  25. #endif
  26. }
  27. }
  28. #endif