member_object_pointer.cpp 664 B

123456789101112131415161718192021222324252627
  1. // (C) Copyright Tobias Schwinger
  2. //
  3. // Use modification and distribution are subject to the boost Software License,
  4. // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
  5. //------------------------------------------------------------------------------
  6. #include <boost/mpl/assert.hpp>
  7. #include <boost/mpl/vector.hpp>
  8. #include <boost/type_traits/is_same.hpp>
  9. #include <boost/function_types/member_object_pointer.hpp>
  10. namespace ft = boost::function_types;
  11. namespace mpl = boost::mpl;
  12. using boost::is_same;
  13. class C;
  14. typedef int C::* expected;
  15. BOOST_MPL_ASSERT((
  16. is_same< ft::member_object_pointer< mpl::vector<int,C> >::type
  17. , expected >
  18. ));