blob: 06ce536cd45d431f015d1cffe43fb5f567142936 [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001// (C) Copyright John Maddock 2001 - 2003.
2// (C) Copyright Jens Maurer 2001.
3// (C) Copyright Peter Dimov 2001.
4// (C) Copyright David Abrahams 2002.
5// (C) Copyright Guillaume Melquiond 2003.
6// Use, modification and distribution are subject to the
7// Boost Software License, Version 1.0. (See accompanying file
8// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
10// See http://www.boost.org for most recent version.
11
12// Dinkumware standard library config:
13
14#if !defined(_YVALS) && !defined(_CPPLIB_VER)
Jeff Thompson2277ce52013-08-01 17:34:11 -070015#include <ndnboost/config/no_tr1/utility.hpp>
Jeff Thompsonf7d49942013-08-01 16:47:40 -070016#if !defined(_YVALS) && !defined(_CPPLIB_VER)
17#error This is not the Dinkumware lib!
18#endif
19#endif
20
21
22#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
23 // full dinkumware 3.06 and above
24 // fully conforming provided the compiler supports it:
25# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
Jeff Thompson3d613fd2013-10-15 15:39:04 -070026# define NDNBOOST_NO_STDC_NAMESPACE
Jeff Thompsonf7d49942013-08-01 16:47:40 -070027# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070028# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(NDNBOOST_MSVC)
29# define NDNBOOST_NO_STD_ALLOCATOR
Jeff Thompsonf7d49942013-08-01 16:47:40 -070030# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031# define NDNBOOST_HAS_PARTIAL_STD_ALLOCATOR
32# if defined(NDNBOOST_MSVC) && (NDNBOOST_MSVC < 1300)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070033 // if this lib version is set up for vc6 then there is no std::use_facet:
Jeff Thompson3d613fd2013-10-15 15:39:04 -070034# define NDNBOOST_NO_STD_USE_FACET
35# define NDNBOOST_HAS_TWO_ARG_USE_FACET
Jeff Thompsonf7d49942013-08-01 16:47:40 -070036 // C lib functions aren't in namespace std either:
Jeff Thompson3d613fd2013-10-15 15:39:04 -070037# define NDNBOOST_NO_STDC_NAMESPACE
Jeff Thompsonf7d49942013-08-01 16:47:40 -070038 // and nor is <exception>
Jeff Thompson3d613fd2013-10-15 15:39:04 -070039# define NDNBOOST_NO_EXCEPTION_STD_NAMESPACE
Jeff Thompsonf7d49942013-08-01 16:47:40 -070040# endif
41// There's no numeric_limits<long long> support unless _LONGLONG is defined:
42# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070043# define NDNBOOST_NO_MS_INT64_NUMERIC_LIMITS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070044# endif
45// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,
46// and no <slist> at all
47#else
Jeff Thompson3d613fd2013-10-15 15:39:04 -070048# define NDNBOOST_MSVC_STD_ITERATOR 1
49# define NDNBOOST_NO_STD_ITERATOR
50# define NDNBOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
51# define NDNBOOST_NO_STD_ALLOCATOR
52# define NDNBOOST_NO_STDC_NAMESPACE
53# define NDNBOOST_NO_STD_USE_FACET
54# define NDNBOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
55# define NDNBOOST_HAS_MACRO_USE_FACET
Jeff Thompsonf7d49942013-08-01 16:47:40 -070056# ifndef _CPPLIB_VER
57 // Updated Dinkum library defines this, and provides
58 // its own min and max definitions, as does MTA version.
59# ifndef __MTA__
Jeff Thompson3d613fd2013-10-15 15:39:04 -070060# define NDNBOOST_NO_STD_MIN_MAX
Jeff Thompsonf7d49942013-08-01 16:47:40 -070061# endif
Jeff Thompson3d613fd2013-10-15 15:39:04 -070062# define NDNBOOST_NO_MS_INT64_NUMERIC_LIMITS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070063# endif
64#endif
65
66//
67// std extension namespace is stdext for vc7.1 and later,
68// the same applies to other compilers that sit on top
69// of vc7.1 (Intel and Comeau):
70//
71#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070072# define NDNBOOST_STD_EXTENSION_NAMESPACE stdext
Jeff Thompsonf7d49942013-08-01 16:47:40 -070073#endif
74
75
76#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306)
77 // if we're using a dinkum lib that's
78 // been configured for VC6/7 then there is
79 // no iterator traits (true even for icl)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070080# define NDNBOOST_NO_STD_ITERATOR_TRAITS
Jeff Thompsonf7d49942013-08-01 16:47:40 -070081#endif
82
83#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310)
84// Intel C++ chokes over any non-trivial use of <locale>
85// this may be an overly restrictive define, but regex fails without it:
Jeff Thompson3d613fd2013-10-15 15:39:04 -070086# define NDNBOOST_NO_STD_LOCALE
Jeff Thompsonf7d49942013-08-01 16:47:40 -070087#endif
88
89#include <typeinfo>
Jeff Thompsona28eed82013-08-22 16:21:10 -070090#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__)
Jeff Thompson3d613fd2013-10-15 15:39:04 -070091# define NDNBOOST_NO_STD_TYPEINFO
Jeff Thompsonf7d49942013-08-01 16:47:40 -070092#endif
93
94// C++0x headers implemented in 520 (as shipped by Microsoft)
95//
96#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520
Jeff Thompson3d613fd2013-10-15 15:39:04 -070097# define NDNBOOST_NO_CXX11_HDR_ARRAY
98# define NDNBOOST_NO_CXX11_HDR_CODECVT
99# define NDNBOOST_NO_CXX11_HDR_FORWARD_LIST
100# define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST
101# define NDNBOOST_NO_CXX11_HDR_RANDOM
102# define NDNBOOST_NO_CXX11_HDR_REGEX
103# define NDNBOOST_NO_CXX11_HDR_SYSTEM_ERROR
104# define NDNBOOST_NO_CXX11_HDR_UNORDERED_MAP
105# define NDNBOOST_NO_CXX11_HDR_UNORDERED_SET
106# define NDNBOOST_NO_CXX11_HDR_TUPLE
107# define NDNBOOST_NO_CXX11_HDR_TYPEINDEX
108# define NDNBOOST_NO_CXX11_HDR_FUNCTIONAL
109# define NDNBOOST_NO_CXX11_NUMERIC_LIMITS
110# define NDNBOOST_NO_CXX11_SMART_PTR
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700111#endif
112
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700113#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(NDNBOOST_NO_CXX11_HDR_TUPLE)
114# define NDNBOOST_NO_CXX11_HDR_TUPLE
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700115#endif
116
117// C++0x headers implemented in 540 (as shipped by Microsoft)
118//
119#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700120# define NDNBOOST_NO_CXX11_HDR_TYPE_TRAITS
121# define NDNBOOST_NO_CXX11_HDR_CHRONO
122# define NDNBOOST_NO_CXX11_HDR_CONDITION_VARIABLE
123# define NDNBOOST_NO_CXX11_HDR_FUTURE
124# define NDNBOOST_NO_CXX11_HDR_MUTEX
125# define NDNBOOST_NO_CXX11_HDR_RATIO
126# define NDNBOOST_NO_CXX11_HDR_THREAD
127# define NDNBOOST_NO_CXX11_ALLOCATOR
128# define NDNBOOST_NO_CXX11_ATOMIC_SMART_PTR
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700129#endif
130
131//
132// C++0x headers not yet (fully) implemented:
133//
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700134# define NDNBOOST_NO_CXX11_HDR_INITIALIZER_LIST
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700135
136#ifdef _CPPLIB_VER
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700137# define NDNBOOST_DINKUMWARE_STDLIB _CPPLIB_VER
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700138#else
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700139# define NDNBOOST_DINKUMWARE_STDLIB 1
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700140#endif
141
142#ifdef _CPPLIB_VER
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700143# define NDNBOOST_STDLIB "Dinkumware standard library version " NDNBOOST_STRINGIZE(_CPPLIB_VER)
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700144#else
Jeff Thompson3d613fd2013-10-15 15:39:04 -0700145# define NDNBOOST_STDLIB "Dinkumware standard library version 1.x"
Jeff Thompsonf7d49942013-08-01 16:47:40 -0700146#endif
147
148
149
150
151
152
153
154
155