is_volatile.qbk 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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_volatile is_volatile]
  8. template <class T>
  9. struct is_volatile : public __tof {};
  10. __inherit If T is a (top level) volatile-qualified type then inherits from __true_type,
  11. otherwise inherits from __false_type.
  12. __std_ref 3.9.3.
  13. [all_compilers]
  14. __header ` #include <boost/type_traits/is_volatile.hpp>` or ` #include <boost/type_traits.hpp>`
  15. __examples
  16. [:`is_volatile<volatile int>` inherits from `__true_type`.]
  17. [:`is_volatile<const volatile int>::type` is the type `__true_type`.]
  18. [:`is_volatile<int* volatile>::value` is an integral constant
  19. expression that evaluates to /true/.]
  20. [:`is_volatile<int volatile*>::value` is an integral constant
  21. expression that evaluates to /false/: the volatile qualifier is not
  22. at the top level in this case.]
  23. [:`is_volatile<T>::value_type` is the type `bool`.]
  24. [endsect]