37#ifndef VIGRA_CONFIG_HXX
38#define VIGRA_CONFIG_HXX
40#include "config_version.hxx"
54 #error "Need VisualC++ 5.0, Service Pack 2, or later"
59 #define TEMPLATE_COPY_CONSTRUCTOR_BUG
60 #define NO_STL_MEMBER_TEMPLATES
61 #define NO_INLINE_STATIC_CONST_DEFINITION
62 #define CMATH_NOT_IN_STD
63 #define NO_COVARIANT_RETURN_TYPES
65 #ifdef VIGRA_NO_STD_MINMAX
69 const T& min(
const T& x,
const T& y)
77 const T& max(
const T& x,
const T& y)
88 #pragma warning( disable : 4786 4250 4244 4305)
90 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION
91 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES
94 #ifdef _MSC_EXTENSIONS
95 #ifndef CMATH_NOT_IN_STD
98 inline double abs(
double v) {
return fabs(v); }
99 inline float abs(
float v) {
return fabs(v); }
100 #ifndef CMATH_NOT_IN_STD
107 #define VIGRA_NO_WORKING_STRINGSTREAM
111 #define VIGRA_NO_UNIQUE_PTR
115 #define VIGRA_NO_VARIADIC_TEMPLATES
118 #define VIGRA_NEED_BIN_STREAMS
120 #define VIGRA_NO_THREADSAFE_STATIC_INIT
125 #define VIGRA_SAFE_STATIC(p, v) \
126 0; while(p == 0) ::vigra::detail::safeStaticInit(&p, v)
128 namespace vigra {
namespace detail {
130 inline void safeStaticInit(T ** p, T * v)
132 if (InterlockedCompareExchangePointer((PVOID *)p, v, 0) != 0)
137 #ifndef VIGRA_ENABLE_ANNOYING_WARNINGS
138 #pragma warning ( disable: 4244 4267)
142 #define VIGRA_EXPORT __declspec(dllexport)
143 #elif defined(VIGRA_STATIC_LIB)
146 #define VIGRA_EXPORT __declspec(dllimport)
156#if defined(__GNUC__) && !defined(__clang__)
157 #if __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8))
158 #error "Need at least g++ 2.95"
161 #define VIGRA_NO_WORKING_STRINGSTREAM
163 #define HAS_HASH_CONTAINERS
166 #pragma GCC diagnostic ignored "-Wshadow"
168 #if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L
169 #if defined(__APPLE__)
170 #define VIGRA_NO_UNIQUE_PTR
174 #define VIGRA_NO_UNIQUE_PTR
175 #define VIGRA_SHARED_PTR_IN_TR1
184#if defined(__clang__)
187 #if defined(__apple_build_version__)
190 #define VIGRA_NO_UNIQUE_PTR
191 #if __cplusplus >= 201103L
194 #if !((__clang_major__ >= 4) && defined(_LIBCPP_VERSION))
195 #define VIGRA_SHARED_PTR_IN_TR1
199 #define VIGRA_NO_UNIQUE_PTR
200 #if !defined(_LIBCPP_VERSION)
201 #define VIGRA_SHARED_PTR_IN_TR1
208 #if __cplusplus >= 201103L
209 #if (__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 3))
210 #define VIGRA_SHARED_PTR_IN_TR1
211 #define VIGRA_NO_UNIQUE_PTR
215 #define VIGRA_NO_UNIQUE_PTR
216 #define VIGRA_SHARED_PTR_IN_TR1
227#if defined(__MINGW32__)
228 #define VIGRA_NEED_BIN_STREAMS
231 #define VIGRA_EXPORT __declspec(dllexport)
232 #elif defined(VIGRA_STATIC_LIB)
235 #define VIGRA_EXPORT __declspec(dllimport)
245#if defined(__sgi) && !defined(__GNUC__)
246 #if _COMPILER_VERSION < 720
247 #error "Need SGI C++ 7.2 or later"
249 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721)
250 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
253 typedef std::exception StdException;
256 #define NO_NAMESPACE_STD
258 #define HAS_HASH_CONTAINERS
267#if defined(__sun) && !defined(__GNUC__)
268 #define VIGRA_HAS_ERF
277#ifdef CMATH_NOT_IN_STD
280 #define VIGRA_CSTD std
295#ifdef VIGRA_NO_UNIQUE_PTR
296# define VIGRA_UNIQUE_PTR std::auto_ptr
298# ifdef _GLIBCXX_INCLUDE_AS_TR1
299# define VIGRA_UNIQUE_PTR std::tr1::unique_ptr
301# define VIGRA_UNIQUE_PTR std::unique_ptr
305#ifdef VIGRA_SHARED_PTR_IN_TR1
306# define VIGRA_SHARED_PTR std::tr1::shared_ptr
308# define VIGRA_SHARED_PTR std::shared_ptr
311#ifndef VIGRA_NO_THREADSAFE_STATIC_INIT
315 #define VIGRA_SAFE_STATIC(p, v) v
320#ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
321 typedef std::exception StdException;
327# define doxygen_overloaded_function(fun) fun(...);
329# define doxygen_overloaded_function(fun)