blob: 8effeec74fd1f4b5fa6408d3c4496428b6ea8674 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001
2// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6//
7// See http://www.boost.org/libs/type_traits for most recent version including documentation.
8
Jeff Thompson3d613fd2013-10-15 15:39:04 -07009#ifndef NDNBOOST_TT_CONFIG_HPP_INCLUDED
10#define NDNBOOST_TT_CONFIG_HPP_INCLUDED
Jeff Thompsonf7d49942013-08-01 16:47:40 -070011
Jeff Thompson3d613fd2013-10-15 15:39:04 -070012#ifndef NDNBOOST_CONFIG_HPP
Jeff Thompson2277ce52013-08-01 17:34:11 -070013#include <ndnboost/config.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070014#endif
15
Jeff Thompson2277ce52013-08-01 17:34:11 -070016#include <ndnboost/detail/workaround.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070017
18//
19// whenever we have a conversion function with ellipses
20// it needs to be declared __cdecl to suppress compiler
21// warnings from MS and Borland compilers (this *must*
22// appear before we include is_same.hpp below):
Jeff Thompson3d613fd2013-10-15 15:39:04 -070023#if defined(NDNBOOST_MSVC) || (defined(__BORLANDC__) && !defined(NDNBOOST_DISABLE_WIN32))
24# define NDNBOOST_TT_DECL __cdecl
Jeff Thompsonf7d49942013-08-01 16:47:40 -070025#else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# define NDNBOOST_TT_DECL /**/
Jeff Thompsonf7d49942013-08-01 16:47:40 -070027#endif
28
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# if (NDNBOOST_WORKAROUND(__MWERKS__, < 0x3000) \
30 || NDNBOOST_WORKAROUND(NDNBOOST_MSVC, <= 1301) \
31 || !defined(__EDG_VERSION__) && NDNBOOST_WORKAROUND(__GNUC__, < 3) \
32 || NDNBOOST_WORKAROUND(__IBMCPP__, < 600 ) \
33 || NDNBOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \
Jeff Thompsonf7d49942013-08-01 16:47:40 -070034 || defined(__ghs) \
Jeff Thompson3d613fd2013-10-15 15:39:04 -070035 || NDNBOOST_WORKAROUND(__HP_aCC, < 60700) \
36 || NDNBOOST_WORKAROUND(MPW_CPLUS, NDNBOOST_TESTED_AT(0x890)) \
37 || NDNBOOST_WORKAROUND(__SUNPRO_CC, NDNBOOST_TESTED_AT(0x580))) \
38 && defined(NDNBOOST_NO_IS_ABSTRACT)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070039
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040# define NDNBOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070041
42#endif
43
Jeff Thompson3d613fd2013-10-15 15:39:04 -070044#ifndef NDNBOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION
45# define NDNBOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -070046#endif
47
48//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070049// Define NDNBOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
Jeff Thompsonf7d49942013-08-01 16:47:40 -070050// when we can't test for function types with elipsis:
51//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070052#if NDNBOOST_WORKAROUND(__GNUC__, < 3)
53# define NDNBOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING
Jeff Thompsonf7d49942013-08-01 16:47:40 -070054#endif
55
56//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070057// define NDNBOOST_TT_TEST_MS_FUNC_SIGS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070058// when we want to test __stdcall etc function types with is_function etc
59// (Note, does not work with Borland, even though it does support __stdcall etc):
60//
61#if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070062# define NDNBOOST_TT_TEST_MS_FUNC_SIGS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070063#endif
64
65//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070066// define NDNBOOST_TT_NO_CV_FUNC_TEST
Jeff Thompsonf7d49942013-08-01 16:47:40 -070067// if tests for cv-qualified member functions don't
68// work in is_member_function_pointer
69//
Jeff Thompson3d613fd2013-10-15 15:39:04 -070070#if NDNBOOST_WORKAROUND(__MWERKS__, < 0x3000) || NDNBOOST_WORKAROUND(__IBMCPP__, <= 600)
71# define NDNBOOST_TT_NO_CV_FUNC_TEST
Jeff Thompsonf7d49942013-08-01 16:47:40 -070072#endif
73
Jeff Thompson3d613fd2013-10-15 15:39:04 -070074#endif // NDNBOOST_TT_CONFIG_HPP_INCLUDED
Jeff Thompsonf7d49942013-08-01 16:47:40 -070075
76