2 // (C) Copyright Tobias Schwinger
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).
7 //------------------------------------------------------------------------------
9 #ifndef BOOST_FT_CONFIG_HPP_INCLUDED
10 #define BOOST_FT_CONFIG_HPP_INCLUDED
12 #include <boost/function_types/config/compiler.hpp>
13 #include <boost/function_types/config/cc_names.hpp>
15 // maximum allowed arity
16 #ifndef BOOST_FT_MAX_ARITY
17 #define BOOST_FT_MAX_ARITY 20
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
26 # ifndef BOOST_FT_CC_STDCALL
27 # define BOOST_FT_CC_STDCALL non_variadic|BOOST_FT_COMMON_X86_CCs
29 # ifndef BOOST_FT_CC_FASTCALL
30 # define BOOST_FT_CC_FASTCALL non_variadic|BOOST_FT_COMMON_X86_CCs
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()
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
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
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