blob: 6a59b4e919cf50db84ec54ced4d22be064c09e2e [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001# /* **************************************************************************
2# * *
3# * (C) Copyright Paul Mensonides 2002-2011. *
4# * (C) Copyright Edward Diener 2011. *
5# * Distributed under the Boost Software License, Version 1.0. (See *
6# * accompanying file LICENSE_1_0.txt or copy at *
7# * http://www.boost.org/LICENSE_1_0.txt) *
8# * *
9# ************************************************************************** */
10#
11# /* See http://www.boost.org for most recent version. */
12#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070013# ifndef NDNBOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
14# define NDNBOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
Jeff Thompsonf7d49942013-08-01 16:47:40 -070015#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070016# /* NDNBOOST_PP_CONFIG_FLAGS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070017#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070018# define NDNBOOST_PP_CONFIG_STRICT() 0x0001
19# define NDNBOOST_PP_CONFIG_IDEAL() 0x0002
Jeff Thompsonf7d49942013-08-01 16:47:40 -070020#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070021# define NDNBOOST_PP_CONFIG_MSVC() 0x0004
22# define NDNBOOST_PP_CONFIG_MWCC() 0x0008
23# define NDNBOOST_PP_CONFIG_BCC() 0x0010
24# define NDNBOOST_PP_CONFIG_EDG() 0x0020
25# define NDNBOOST_PP_CONFIG_DMC() 0x0040
Jeff Thompsonf7d49942013-08-01 16:47:40 -070026#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070027# ifndef NDNBOOST_PP_CONFIG_FLAGS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070028# if defined(__GCCXML__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070030# elif defined(__WAVE__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070032# elif defined(__MWERKS__) && __MWERKS__ >= 0x3200
Jeff Thompson3d613fd2013-10-15 15:39:04 -070033# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070034# elif defined(__EDG__) || defined(__EDG_VERSION__)
35# if defined(_MSC_VER) && __EDG_VERSION__ >= 308
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_MSVC())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070037# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070038# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_EDG() | NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070039# endif
40# elif defined(__MWERKS__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070041# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_MWCC())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070042# elif defined(__DMC__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070043# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_DMC())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070044# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581
Jeff Thompson3d613fd2013-10-15 15:39:04 -070045# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070046# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070047# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_BCC())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070048# elif defined(_MSC_VER)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070049# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_MSVC())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070050# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070051# define NDNBOOST_PP_CONFIG_FLAGS() (NDNBOOST_PP_CONFIG_STRICT())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070052# endif
53# endif
54#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055# /* NDNBOOST_PP_CONFIG_EXTENDED_LINE_INFO */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070056#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070057# ifndef NDNBOOST_PP_CONFIG_EXTENDED_LINE_INFO
58# define NDNBOOST_PP_CONFIG_EXTENDED_LINE_INFO 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070059# endif
60#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070061# /* NDNBOOST_PP_CONFIG_ERRORS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070062#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070063# ifndef NDNBOOST_PP_CONFIG_ERRORS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070064# ifdef NDEBUG
Jeff Thompson3d613fd2013-10-15 15:39:04 -070065# define NDNBOOST_PP_CONFIG_ERRORS 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070066# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070067# define NDNBOOST_PP_CONFIG_ERRORS 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070068# endif
69# endif
70#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070071# /* NDNBOOST_PP_VARIADICS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070072#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070073# if !defined NDNBOOST_PP_VARIADICS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070074# /* variadic support explicitly disabled for all untested compilers */
75# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI
Jeff Thompson3d613fd2013-10-15 15:39:04 -070076# define NDNBOOST_PP_VARIADICS 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070077# /* VC++ (C/C++) */
78# elif defined _MSC_VER && _MSC_VER >= 1400 && !defined __EDG__
79# if _MSC_VER >= 1400
Jeff Thompson3d613fd2013-10-15 15:39:04 -070080# define NDNBOOST_PP_VARIADICS 1
81# define NDNBOOST_PP_VARIADICS_MSVC 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070082# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070083# define NDNBOOST_PP_VARIADICS 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070084# endif
85# /* Wave (C/C++), GCC (C++) */
86# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && __GXX_EXPERIMENTAL_CXX0X__
Jeff Thompson3d613fd2013-10-15 15:39:04 -070087# define NDNBOOST_PP_VARIADICS 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070088# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
89# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
Jeff Thompson3d613fd2013-10-15 15:39:04 -070090# define NDNBOOST_PP_VARIADICS 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070091# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070092# define NDNBOOST_PP_VARIADICS 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070093# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070094# elif !NDNBOOST_PP_VARIADICS + 1 < 2
95# undef NDNBOOST_PP_VARIADICS
96# define NDNBOOST_PP_VARIADICS 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070097# if defined _MSC_VER && _MSC_VER >= 1400 && !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070098# define NDNBOOST_PP_VARIADICS_MSVC 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070099# endif
100# else
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700101# undef NDNBOOST_PP_VARIADICS
102# define NDNBOOST_PP_VARIADICS 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700103# endif
104#
105# endif