nonmember_ccs.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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/function_type.hpp>
  10. #include <boost/function_types/function_pointer.hpp>
  11. #include <boost/function_types/function_reference.hpp>
  12. #include <boost/function_types/is_callable_builtin.hpp>
  13. #ifndef BOOST_FT_CC_STDCALL
  14. # error "test not supported with this compiler/platform"
  15. #endif
  16. namespace ft = boost::function_types;
  17. namespace mpl = boost::mpl;
  18. typedef ft::stdcall_cc cc;
  19. BOOST_MPL_ASSERT((
  20. ft::is_callable_builtin<
  21. ft::function_type<mpl::vector<void,int>, cc>::type
  22. >
  23. ));
  24. BOOST_MPL_ASSERT((
  25. ft::is_callable_builtin<
  26. ft::function_pointer<mpl::vector<void,int>, cc>::type
  27. >
  28. ));
  29. BOOST_MPL_ASSERT((
  30. ft::is_callable_builtin<
  31. ft::function_reference<mpl::vector<void,int>, cc>::type
  32. >
  33. ));