[ 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.2.0, Aug 07 2003 ) */ 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 00090 #endif // _MSC_VER 00091 00092 /////////////////////////////////////////////////////////// 00093 // // 00094 // egcs 1.1 // 00095 // // 00096 /////////////////////////////////////////////////////////// 00097 00098 #if defined(__GNUC__) 00099 #if __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8)) 00100 #error "Need at least egcs 1.1 or g++ 2.95" 00101 #endif 00102 #define HAS_HASH_CONTAINERS 00103 #endif // __GNUC__ 00104 00105 /////////////////////////////////////////////////////////// 00106 // // 00107 // SGI C++ 7.2 // 00108 // // 00109 /////////////////////////////////////////////////////////// 00110 00111 #if defined(__sgi) && !defined(__GNUC__) 00112 #if _COMPILER_VERSION < 720 00113 #error "Need SGI C++ 7.2 or later" 00114 #endif 00115 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721) 00116 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00117 00118 namespace vigra { 00119 typedef std::exception StdException; // must be above next #define !! 00120 } 00121 #define std 00122 #define NO_NAMESPACE_STD 00123 #endif // _COMPILER_VERSION 00124 #define HAS_HASH_CONTAINERS 00125 #endif // __sgi 00126 00127 /////////////////////////////////////////////////////////// 00128 // // 00129 // general // 00130 // // 00131 /////////////////////////////////////////////////////////// 00132 00133 #ifdef CMATH_NOT_IN_STD 00134 #define VIGRA_CSTD 00135 #else 00136 #define VIGRA_CSTD std 00137 #endif 00138 00139 #ifdef NO_TYPENAME 00140 #define typename 00141 #endif 00142 00143 #ifdef NO_EXPLICIT 00144 #define explicit 00145 #endif 00146 00147 namespace vigra { 00148 00149 #ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00150 typedef std::exception StdException; 00151 #endif 00152 00153 } // namespace vigra 00154 00155 #endif // VIGRA_CONFIG_HXX
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|