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
170 #if __GNUC__ < 4 || ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 3))
171 #define VIGRA_NO_UNIQUE_PTR
175 #define VIGRA_NO_UNIQUE_PTR
176 #define VIGRA_SHARED_PTR_IN_TR1
185#if defined(__clang__)
188 #if defined(__apple_build_version__)
190 #if __cplusplus >= 201103L
192 #if !defined(_LIBCPP_VERSION)
193 #define VIGRA_NO_UNIQUE_PTR
197 #if !((__clang_major__ >= 4) && defined(_LIBCPP_VERSION))
198 #define VIGRA_SHARED_PTR_IN_TR1
202 #define VIGRA_NO_UNIQUE_PTR
203 #if !defined(_LIBCPP_VERSION)
204 #define VIGRA_SHARED_PTR_IN_TR1
211 #if __cplusplus >= 201103L
212 #if (__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 3))
213 #define VIGRA_SHARED_PTR_IN_TR1
214 #define VIGRA_NO_UNIQUE_PTR
218 #define VIGRA_NO_UNIQUE_PTR
219 #define VIGRA_SHARED_PTR_IN_TR1
230#if defined(__MINGW32__)
231 #define VIGRA_NEED_BIN_STREAMS
234 #define VIGRA_EXPORT __declspec(dllexport)
235 #elif defined(VIGRA_STATIC_LIB)
238 #define VIGRA_EXPORT __declspec(dllimport)
248#if defined(__sgi) && !defined(__GNUC__)
249 #if _COMPILER_VERSION < 720
250 #error "Need SGI C++ 7.2 or later"
252 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721)
253 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
256 typedef std::exception StdException;
259 #define NO_NAMESPACE_STD
261 #define HAS_HASH_CONTAINERS
270#if defined(__sun) && !defined(__GNUC__)
271 #define VIGRA_HAS_ERF
280#ifdef CMATH_NOT_IN_STD
283 #define VIGRA_CSTD std
298#ifdef VIGRA_NO_UNIQUE_PTR
299# define VIGRA_UNIQUE_PTR std::auto_ptr
301# ifdef _GLIBCXX_INCLUDE_AS_TR1
302# define VIGRA_UNIQUE_PTR std::tr1::unique_ptr
304# define VIGRA_UNIQUE_PTR std::unique_ptr
308#ifdef VIGRA_SHARED_PTR_IN_TR1
309# define VIGRA_SHARED_PTR std::tr1::shared_ptr
311# define VIGRA_SHARED_PTR std::shared_ptr
314#ifndef VIGRA_NO_THREADSAFE_STATIC_INIT
318 #define VIGRA_SAFE_STATIC(p, v) v
323#ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED
324 typedef std::exception StdException;
330# define doxygen_overloaded_function(fun) fun(...);
332# define doxygen_overloaded_function(fun)