blob: 5e85532fe68decb1444a205ba30c86fb793c5394 [file] [log] [blame]
Jeff Thompsona28eed82013-08-22 16:21:10 -07001
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 Thompson3d613fd2013-10-15 15:39:04 -07009#ifndef NDNBOOST_FT_CONFIG_HPP_INCLUDED
10#define NDNBOOST_FT_CONFIG_HPP_INCLUDED
Jeff Thompsona28eed82013-08-22 16:21:10 -070011
12#include <ndnboost/function_types/config/compiler.hpp>
13#include <ndnboost/function_types/config/cc_names.hpp>
14
15// maximum allowed arity
Jeff Thompson3d613fd2013-10-15 15:39:04 -070016#ifndef NDNBOOST_FT_MAX_ARITY
17#define NDNBOOST_FT_MAX_ARITY 20
Jeff Thompsona28eed82013-08-22 16:21:10 -070018#endif
19
20// the most common calling conventions for x86 architecture can be enabled at
21// once in the compiler config
Jeff Thompson3d613fd2013-10-15 15:39:04 -070022#ifdef NDNBOOST_FT_COMMON_X86_CCs
23# ifndef NDNBOOST_FT_CC_CDECL
24# define NDNBOOST_FT_CC_CDECL NDNBOOST_FT_COMMON_X86_CCs
Jeff Thompsona28eed82013-08-22 16:21:10 -070025# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# ifndef NDNBOOST_FT_CC_STDCALL
27# define NDNBOOST_FT_CC_STDCALL non_variadic|NDNBOOST_FT_COMMON_X86_CCs
Jeff Thompsona28eed82013-08-22 16:21:10 -070028# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# ifndef NDNBOOST_FT_CC_FASTCALL
30# define NDNBOOST_FT_CC_FASTCALL non_variadic|NDNBOOST_FT_COMMON_X86_CCs
Jeff Thompsona28eed82013-08-22 16:21:10 -070031# endif
32#endif
33
34// where to place the cc specifier (the common way)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070035#ifndef NDNBOOST_FT_SYNTAX
36# define NDNBOOST_FT_SYNTAX(result,lparen,cc_spec,type_mod,name,rparen) \
Jeff Thompsona28eed82013-08-22 16:21:10 -070037 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 Thompson3d613fd2013-10-15 15:39:04 -070043#ifndef NDNBOOST_FT_NULLARY_PARAM
44#define NDNBOOST_FT_NULLARY_PARAM
Jeff Thompsona28eed82013-08-22 16:21:10 -070045#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 Thompson3d613fd2013-10-15 15:39:04 -070049#ifndef NDNBOOST_FT_NO_CV_FUNC_SUPPORT
50#define NDNBOOST_FT_NO_CV_FUNC_SUPPORT 1
Jeff Thompsona28eed82013-08-22 16:21:10 -070051#endif
52
53// full preprocessing implies preprocessing of the ccs
Jeff Thompson3d613fd2013-10-15 15:39:04 -070054#if defined(NDNBOOST_FT_PREPROCESSING_MODE) && !defined(NDNBOOST_FT_CC_PREPROCESSING)
55# define NDNBOOST_FT_CC_PREPROCESSING 1
Jeff Thompsona28eed82013-08-22 16:21:10 -070056#endif
57
58#endif
59