config.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. #ifndef BOOST_FT_CONFIG_HPP_INCLUDED
  7. #define BOOST_FT_CONFIG_HPP_INCLUDED
  8. #include <boost/function_types/config/compiler.hpp>
  9. #include <boost/function_types/config/cc_names.hpp>
  10. // maximum allowed arity
  11. #ifndef BOOST_FT_MAX_ARITY
  12. #define BOOST_FT_MAX_ARITY 20
  13. #endif
  14. // the most common calling conventions for x86 architecture can be enabled at
  15. // once in the compiler config
  16. #ifdef BOOST_FT_COMMON_X86_CCs
  17. # ifndef BOOST_FT_CC_CDECL
  18. # define BOOST_FT_CC_CDECL BOOST_FT_COMMON_X86_CCs
  19. # endif
  20. # ifndef BOOST_FT_CC_STDCALL
  21. # define BOOST_FT_CC_STDCALL non_variadic|BOOST_FT_COMMON_X86_CCs
  22. # endif
  23. # ifndef BOOST_FT_CC_FASTCALL
  24. # define BOOST_FT_CC_FASTCALL non_variadic|BOOST_FT_COMMON_X86_CCs
  25. # endif
  26. #endif
  27. // where to place the cc specifier (the common way)
  28. #ifndef BOOST_FT_SYNTAX
  29. # define BOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \
  30. result() lparen() cc_spec() type_mod() name() rparen()
  31. #endif
  32. // param for nullary functions
  33. // set to "void" for compilers that require nullary functions to read
  34. // "R (void)" in template partial specialization
  35. #ifndef BOOST_FT_NULLARY_PARAM
  36. #define BOOST_FT_NULLARY_PARAM
  37. #endif
  38. // there is a pending defect report on cv qualified function types, so support
  39. // for these types is disabled, unless for compilers where it's known to work
  40. #ifndef BOOST_FT_NO_CV_FUNC_SUPPORT
  41. #define BOOST_FT_NO_CV_FUNC_SUPPORT 1
  42. #endif
  43. // full preprocessing implies preprocessing of the ccs
  44. #if defined(BOOST_FT_PREPROCESSING_MODE) && !defined(BOOST_FT_CC_PREPROCESSING)
  45. # define BOOST_FT_CC_PREPROCESSING 1
  46. #endif
  47. #endif