boost_has_sgi_type_traits.ipp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // (C) Copyright John Maddock 2001.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_HAS_SGI_TYPE_TRAITS
  7. // TITLE: SGI style <type_traits.h>
  8. // DESCRIPTION: The standard library has it's own type_traits implementation.
  9. #include <type_traits.h>
  10. namespace boost_has_sgi_type_traits{
  11. struct foo_type{};
  12. int test()
  13. {
  14. ::__true_type t;
  15. ::__false_type f;
  16. typedef ::__type_traits<int>::has_trivial_destructor td;
  17. typedef ::__type_traits<double>::has_trivial_assignment_operator ta;
  18. typedef ::__type_traits<float>::has_trivial_copy_constructor tc;
  19. typedef ::__type_traits<char>::has_trivial_default_constructor tdc;
  20. typedef ::__type_traits<foo_type>::is_POD_type isp;
  21. (void) &t; // avoid "unused variable" warnings
  22. (void) &f;
  23. return 0;
  24. }
  25. }