member_ccs.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. #define BOOST_FT_AUTODETECT_CALLING_CONVENTIONS
  7. #include <boost/mpl/assert.hpp>
  8. #include <boost/mpl/vector.hpp>
  9. #include <boost/function_types/member_function_pointer.hpp>
  10. #include <boost/function_types/is_callable_builtin.hpp>
  11. #ifndef BOOST_FT_CC_STDCALL
  12. # error "test not supported with this compiler/platform"
  13. #endif
  14. namespace ft = boost::function_types;
  15. namespace mpl = boost::mpl;
  16. typedef ft::stdcall_cc cc;
  17. class C;
  18. BOOST_MPL_ASSERT((
  19. ft::is_callable_builtin<
  20. ft::member_function_pointer<mpl::vector<int, C &>, cc>::type
  21. >
  22. ));
  23. BOOST_MPL_ASSERT((
  24. ft::is_callable_builtin<
  25. ft::member_function_pointer<mpl::vector<int, C const &>, cc>::type
  26. >
  27. ));
  28. BOOST_MPL_ASSERT((
  29. ft::is_callable_builtin<
  30. ft::member_function_pointer<mpl::vector<int, C volatile &>, cc>::type
  31. >
  32. ));
  33. BOOST_MPL_ASSERT((
  34. ft::is_callable_builtin<
  35. ft::member_function_pointer<mpl::vector<int, C const volatile &>, cc>::type
  36. >
  37. ));