is_abstract.qbk 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. [/
  2. Copyright 2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:is_abstract is_abstract]
  8. template <class T>
  9. struct is_abstract : public __tof {};
  10. __inherit If T is a (possibly cv-qualified) abstract type then inherits from
  11. __true_type, otherwise inherits from __false_type.
  12. __std_ref 10.3.
  13. __header ` #include <boost/type_traits/is_abstract.hpp>` or ` #include <boost/type_traits.hpp>`
  14. __compat The compiler must support DR337 (as of April 2005: GCC 3.4, VC++ 7.1 (and later),
  15. Intel C++ 7 (and later), and Comeau 4.3.2).
  16. Otherwise behaves the same as __is_polymorphic;
  17. this is the "safe fallback position" for which polymorphic types are always
  18. regarded as potentially abstract. The macro BOOST_NO_IS_ABSTRACT is used to
  19. signify that the implementation is buggy, users should check for this in their
  20. own code if the "safe fallback" is not suitable for their particular use-case.
  21. __examples
  22. [:Given: `class abc{ virtual ~abc() = 0; };` ]
  23. [:`is_abstract<abc>` inherits from `__true_type`.]
  24. [:`is_abstract<abc>::type` is the type `__true_type`.]
  25. [:`is_abstract<abc const>::value` is an integral constant
  26. expression that evaluates to /true/.]
  27. [:`is_abstract<T>::value_type` is the type `bool`.]
  28. [endsect]