1 2 // (C) Copyright Tobias Schwinger 3 // 4 // Use modification and distribution are subject to the boost Software License, 5 // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt). 6 7 //------------------------------------------------------------------------------ 8 9 #ifndef BOOST_FT_CONFIG_HPP_INCLUDED 10 #define BOOST_FT_CONFIG_HPP_INCLUDED 11 12 #include <boost/function_types/config/compiler.hpp> 13 #include <boost/function_types/config/cc_names.hpp> 14 15 // maximum allowed arity 16 #ifndef BOOST_FT_MAX_ARITY 17 #define BOOST_FT_MAX_ARITY 20 18 #endif 19 20 // the most common calling conventions for x86 architecture can be enabled at 21 // once in the compiler config 22 #ifdef BOOST_FT_COMMON_X86_CCs 23 # ifndef BOOST_FT_CC_CDECL 24 # define BOOST_FT_CC_CDECL BOOST_FT_COMMON_X86_CCs 25 # endif 26 # ifndef BOOST_FT_CC_STDCALL 27 # define BOOST_FT_CC_STDCALL non_variadic|BOOST_FT_COMMON_X86_CCs 28 # endif 29 # ifndef BOOST_FT_CC_FASTCALL 30 # define BOOST_FT_CC_FASTCALL non_variadic|BOOST_FT_COMMON_X86_CCs 31 # endif 32 #endif 33 34 // where to place the cc specifier (the common way) 35 #ifndef BOOST_FT_SYNTAX 36 # define BOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \ 37 result() lparen() cc_spec() type_mod() name() rparen() 38 #endif 39 40 // param for nullary functions 41 // set to "void" for compilers that require nullary functions to read 42 // "R (void)" in template partial specialization 43 #ifndef BOOST_FT_NULLARY_PARAM 44 #define BOOST_FT_NULLARY_PARAM 45 #endif 46 47 // there is a pending defect report on cv qualified function types, so support 48 // for these types is disabled, unless for compilers where it's known to work 49 #ifndef BOOST_FT_NO_CV_FUNC_SUPPORT 50 #define BOOST_FT_NO_CV_FUNC_SUPPORT 1 51 #endif 52 53 // full preprocessing implies preprocessing of the ccs 54 #if defined(BOOST_FT_PREPROCESSING_MODE) && !defined(BOOST_FT_CC_PREPROCESSING) 55 # define BOOST_FT_CC_PREPROCESSING 1 56 #endif 57 58 #endif 59 60