modifiers.cpp 767 B

12345678910111213141516171819
  1. // Copyright (C) 2006 Arkadiy Vertleyb
  2. // Use, modification and distribution is subject to the Boost Software
  3. // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
  4. #include "test.hpp"
  5. #include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
  6. struct x{};
  7. BOOST_TYPEOF_REGISTER_TYPE(x)
  8. BOOST_STATIC_ASSERT(boost::type_of::test<x*>::value);
  9. BOOST_STATIC_ASSERT(boost::type_of::test<x&>::value);
  10. BOOST_STATIC_ASSERT(boost::type_of::test<x[20]>::value);
  11. BOOST_STATIC_ASSERT(boost::type_of::test<const x>::value);
  12. BOOST_STATIC_ASSERT(boost::type_of::test<volatile x>::value);
  13. BOOST_STATIC_ASSERT(boost::type_of::test<volatile const x>::value);
  14. BOOST_STATIC_ASSERT(boost::type_of::test<const x&>::value);
  15. BOOST_STATIC_ASSERT(boost::type_of::test<const x*>::value);