[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
vigra/config.hxx | ![]() |
---|
00001 /************************************************************************/ 00002 /* */ 00003 /* Copyright 1998-2002 by Ullrich Koethe */ 00004 /* Cognitive Systems Group, University of Hamburg, Germany */ 00005 /* */ 00006 /* This file is part of the VIGRA computer vision library. */ 00007 /* ( Version 1.3.3, Aug 18 2005 ) */ 00008 /* You may use, modify, and distribute this software according */ 00009 /* to the terms stated in the LICENSE file included in */ 00010 /* the VIGRA distribution. */ 00011 /* */ 00012 /* The VIGRA Website is */ 00013 /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ 00014 /* Please direct questions, bug reports, and contributions to */ 00015 /* koethe@informatik.uni-hamburg.de */ 00016 /* */ 00017 /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ 00018 /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */ 00019 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ 00020 /* */ 00021 /************************************************************************/ 00022 00023 00024 #ifndef VIGRA_CONFIG_HXX 00025 #define VIGRA_CONFIG_HXX 00026 00027 #include <stdexcept> 00028 00029 /////////////////////////////////////////////////////////// 00030 // // 00031 // VisualC++ 5.0 // 00032 // // 00033 /////////////////////////////////////////////////////////// 00034 00035 #ifdef _MSC_VER 00036 #if(_MSC_VER < 1100) // before VisualC++ 5.0 00037 #error "Need VisualC++ 5.0, Service Pack 2, or later" 00038 #endif // _MSC_VER < 1100 00039 00040 #pragma warning( disable : 4786 4250 4244 4305) 00041 00042 #if (_MSC_VER < 1300) 00043 #define NO_TYPENAME // no 'typename' keyword 00044 #define TEMPLATE_COPY_CONSTRUCTOR_BUG 00045 #define NO_STL_MEMBER_TEMPLATES 00046 #define NO_INLINE_STATIC_CONST_DEFINITION 00047 #define CMATH_NOT_IN_STD 00048 #define NO_COVARIANT_RETURN_TYPES 00049 00050 #ifdef VIGRA_NO_STD_MINMAX // activate if necessary 00051 namespace std { 00052 00053 template<class T> 00054 const T& min(const T& x, const T& y) 00055 { 00056 return (y < x) 00057 ? y 00058 : x; 00059 } 00060 00061 template<class T> 00062 const T& max(const T& x, const T& y) 00063 { 00064 return (x < y) 00065 ? y 00066 : x; 00067 } 00068 } 00069 #endif // VIGRA_NO_STD_MINMAX 00070 #endif // (_MSC_VER < 1300) 00071 00072 #if _MSC_VER < 1310 00073 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION 00074 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES 00075 #include <cmath> 00076 00077 #ifdef _MSC_EXTENSIONS 00078 #ifndef CMATH_NOT_IN_STD 00079 namespace std { 00080 #endif // CMATH_NOT_IN_STD 00081 inline double abs(double v) { return fabs(v); } 00082 inline float abs(float v) { return fabs(v); } 00083 #ifndef CMATH_NOT_IN_STD 00084 } 00085 #endif // CMATH_NOT_IN_STD 00086 #endif // _MSC_EXTENSIONS 00087 #endif // _MSC_VER < 1310 00088 00089 #define VIGRA_NEED_BIN_STREAMS 00090 #endif // _MSC_VER 00091 00092 /////////////////////////////////////////////////////////// 00093 // // 00094 // gcc // 00095 // // 00096 /////////////////////////////////////////////////////////// 00097 00098 #if defined(__GNUC__) 00099 #if __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8)) 00100 #error "Need at least g++ 2.95" 00101 #endif 00102 #define HAS_HASH_CONTAINERS 00103 #endif // __GNUC__ 00104 00105 /////////////////////////////////////////////////////////// 00106 // // 00107 // MingW // 00108 // // 00109 /////////////////////////////////////////////////////////// 00110 00111 #if defined(__MINGW32__) 00112 #define VIGRA_NEED_BIN_STREAMS 00113 #endif // __MINGW32__ 00114 00115 /////////////////////////////////////////////////////////// 00116 // // 00117 // SGI C++ 7.2 // 00118 // // 00119 /////////////////////////////////////////////////////////// 00120 00121 #if defined(__sgi) && !defined(__GNUC__) 00122 #if _COMPILER_VERSION < 720 00123 #error "Need SGI C++ 7.2 or later" 00124 #endif 00125 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721) 00126 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00127 00128 namespace vigra { 00129 typedef std::exception StdException; // must be above next #define !! 00130 } 00131 #define std 00132 #define NO_NAMESPACE_STD 00133 #endif // _COMPILER_VERSION 00134 #define HAS_HASH_CONTAINERS 00135 #endif // __sgi 00136 00137 /////////////////////////////////////////////////////////// 00138 // // 00139 // general // 00140 // // 00141 /////////////////////////////////////////////////////////// 00142 00143 #ifdef CMATH_NOT_IN_STD 00144 #define VIGRA_CSTD 00145 #else 00146 #define VIGRA_CSTD std 00147 #endif 00148 00149 #ifdef NO_TYPENAME 00150 #define typename 00151 #endif 00152 00153 #ifdef NO_EXPLICIT 00154 #define explicit 00155 #endif 00156 00157 namespace vigra { 00158 00159 #ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00160 typedef std::exception StdException; 00161 #endif 00162 00163 } // namespace vigra 00164 00165 #endif // VIGRA_CONFIG_HXX
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|