Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 9 | #ifndef NDNBOOST_FT_CONFIG_HPP_INCLUDED |
| 10 | #define NDNBOOST_FT_CONFIG_HPP_INCLUDED |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 11 | |
| 12 | #include <ndnboost/function_types/config/compiler.hpp> |
| 13 | #include <ndnboost/function_types/config/cc_names.hpp> |
| 14 | |
| 15 | // maximum allowed arity |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 16 | #ifndef NDNBOOST_FT_MAX_ARITY |
| 17 | #define NDNBOOST_FT_MAX_ARITY 20 |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 18 | #endif |
| 19 | |
| 20 | // the most common calling conventions for x86 architecture can be enabled at |
| 21 | // once in the compiler config |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 22 | #ifdef NDNBOOST_FT_COMMON_X86_CCs |
| 23 | # ifndef NDNBOOST_FT_CC_CDECL |
| 24 | # define NDNBOOST_FT_CC_CDECL NDNBOOST_FT_COMMON_X86_CCs |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 25 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 26 | # ifndef NDNBOOST_FT_CC_STDCALL |
| 27 | # define NDNBOOST_FT_CC_STDCALL non_variadic|NDNBOOST_FT_COMMON_X86_CCs |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 28 | # endif |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 29 | # ifndef NDNBOOST_FT_CC_FASTCALL |
| 30 | # define NDNBOOST_FT_CC_FASTCALL non_variadic|NDNBOOST_FT_COMMON_X86_CCs |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 31 | # endif |
| 32 | #endif |
| 33 | |
| 34 | // where to place the cc specifier (the common way) |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 35 | #ifndef NDNBOOST_FT_SYNTAX |
| 36 | # define NDNBOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \ |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 43 | #ifndef NDNBOOST_FT_NULLARY_PARAM |
| 44 | #define NDNBOOST_FT_NULLARY_PARAM |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 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 |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 49 | #ifndef NDNBOOST_FT_NO_CV_FUNC_SUPPORT |
| 50 | #define NDNBOOST_FT_NO_CV_FUNC_SUPPORT 1 |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 51 | #endif |
| 52 | |
| 53 | // full preprocessing implies preprocessing of the ccs |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 54 | #if defined(NDNBOOST_FT_PREPROCESSING_MODE) && !defined(NDNBOOST_FT_CC_PREPROCESSING) |
| 55 | # define NDNBOOST_FT_CC_PREPROCESSING 1 |
Jeff Thompson | a28eed8 | 2013-08-22 16:21:10 -0700 | [diff] [blame] | 56 | #endif |
| 57 | |
| 58 | #endif |
| 59 | |