⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcl_config_compiler.h.in

📁 InsightToolkit-1.4.0(有大量的优化算法程序)
💻 IN
📖 第 1 页 / 共 2 页
字号:
#ifndef vcl_config_compiler_h_
#define vcl_config_compiler_h_
//:
// \file
// This file either is or was generated from vcl_config_compiler.h.in

//----------------------------------------------------------------------
// syntax-like things.

//: VCL_HAS_BOOL
// Set to 1 if "bool" is accepted by the compiler as a built-in type.
#define VCL_HAS_BOOL @VCL_HAS_BOOL@


//: VCL_HAS_DYNAMIC_CAST
//
// True if the compiler supports dynamic cast.
//
#define VCL_HAS_DYNAMIC_CAST @VCL_HAS_DYNAMIC_CAST@


//: VCL_HAS_TYPENAME
//
// True if the compiler supports the "typename" keyword
//
#define VCL_HAS_TYPENAME @VCL_HAS_TYPENAME@


//: VCL_HAS_EXPORT
//
// True if the compiler supports the "export" keyword
//
#define VCL_HAS_EXPORT @VCL_HAS_EXPORT@

//: VCL_HAS_MUTABLE
//
// True if the compiler supports the "mutable" keyword
//
#define VCL_HAS_MUTABLE @VCL_HAS_MUTABLE@


//: VCL_HAS_EXPLICIT
//
// True if the compiler supports the "explicit" keyword
//
#define VCL_HAS_EXPLICIT @VCL_HAS_EXPLICIT@


//: VCL_FOR_SCOPE_HACK:
//
// True if the compiler uses old-style 'for' loop scoping.
// Setting this nonzero causes the Henderson trick to be used.
#define VCL_FOR_SCOPE_HACK @VCL_FOR_SCOPE_HACK@


//: VCL_DEFAULT_VALUE(x)
//
// Used to provide default values for function args in definition
// Some compilers (GCC272) require defaults in template function definitions
// Other compilers (VC50) disallow defaults in both decls and defs

//#define VCL_DEFAULT_VALUE(x) /* no need */
//#define VCL_DEFAULT_VALUE(x) = x
#define VCL_DEFAULT_VALUE(x) @VCL_DEFAULT_VALUE@


//----------------------------------------------------------------------
// constant initializer issues.

//: VCL_STATIC_CONST_INIT_INT_DECL(x)
//
// ANSI allows
// \code
//     class A {
//       static const int x = 27;
//     };
// \endcode
// And there is a speed advantage, so we want to use it where supported.
// However, the standard also requires (9.4.2/4) that the constant be
// defined in namespace scope. (That is, space must be allocated.)
// To use the macro, use VCL_STATIC_CONST_INIT_DECL in the class
// definition (header file). This declares the constant.
// \code
//     class A {
//       static const int x VCL_STATIC_CONST_INIT_INT_DECL(27);
//     };
// \endcode
// Use VCL_STATIC_CONST_INIT_DEFN in some .cxx file to define
// the constant.
// \code
//     const int A::x VCL_STATIC_CONST_INIT_DEFN(27);
// \endcode
//
// In order to be able to query the setting of this, one actually must
// define VCL_CAN_STATIC_CONST_INIT_INT to either 0 or 1.

//#define VCL_CAN_STATIC_CONST_INIT_INT 1 /* allowed */
//#define VCL_CAN_STATIC_CONST_INIT_INT 0 /* not allowed */
#ifndef VCL_CAN_STATIC_CONST_INIT_INT
#define VCL_CAN_STATIC_CONST_INIT_INT @VCL_STATIC_CONST_INIT_INT@
#endif
#if VCL_CAN_STATIC_CONST_INIT_INT
#define VCL_STATIC_CONST_INIT_INT_DECL(x) = x
#define VCL_STATIC_CONST_INIT_INT_DEFN(x) /* initialized at declaration */
#else
#define VCL_STATIC_CONST_INIT_INT_DECL(x) /* not allowed */
#define VCL_STATIC_CONST_INIT_INT_DEFN(x) = x
#endif


//: VCL_STATIC_CONST_INIT_FLOAT(x)
//
// GCC allows the above, but with floating point types, ANSI doesn't.
// Again, we'll use it if we've got it.
//
// In order to be able to query the setting of this, one actually must
// define VCL_CAN_STATIC_CONST_INIT_FLOAT to either 0 or 1.

//#define VCL_CAN_STATIC_CONST_INIT_FLOAT 1 /* allowed */
//#define VCL_CAN_STATIC_CONST_INIT_FLOAT 0 /* not allowed */
#ifndef VCL_CAN_STATIC_CONST_INIT_FLOAT
#define VCL_CAN_STATIC_CONST_INIT_FLOAT @VCL_STATIC_CONST_INIT_FLOAT@
#endif
#if VCL_CAN_STATIC_CONST_INIT_FLOAT
#define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) = x
#define VCL_STATIC_CONST_INIT_FLOAT_DEFN(x) /* initialized at declaration */
#else
#define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) /* not allowed */
#define VCL_STATIC_CONST_INIT_FLOAT_DEFN(x) = x
#endif


//----------------------------------------------------------------------
// various template issues.

//: VCL_HAS_MEMBER_TEMPLATES
//
// True if the compiler supports template members of template classes.  e.g.
// \code
//     template <class U> class A {
//       template <class V> void f(V);
//     }
// \endcode
#define VCL_HAS_MEMBER_TEMPLATES @VCL_HAS_MEMBER_TEMPLATES@


//: VCL_CAN_DO_PARTIAL_SPECIALIZATION
//
// True if the compiler supports partial specializations of templates. e.g.
// \code
// template <class T>
// class vector<T*> : public vector<void *> { .. inline methods .. };
// \endcode
//
#define VCL_CAN_DO_PARTIAL_SPECIALIZATION @VCL_CAN_DO_PARTIAL_SPECIALIZATION@


//: VCL_DEFINE_SPECIALIZATION
//
// In order to *define* a template (function or class) specialization, the
// definition must be preceded by "template <>" on ISO-conforming compilers.
// Some compilers (eg gcc 2.7.2) make no distinction between an instance
// of a templated function and a function with the same name and signature,
// and so do not support the use of "template <>". Use VCL_DEFINE_SPECIALIZATION
// instead.
//
// Note that you DO NOT need to forward declare a specialization. E.g. if
// foo.h says "template <class T> void foo(T *);" and foo.cxx specializes
// void foo<int>(int *), the client doesn't need to know that the template
// symbol he links against is a specialization.

//#define VCL_DEFINE_SPECIALIZATION /* template <> */
//#define VCL_DEFINE_SPECIALIZATION template <>
#define VCL_DEFINE_SPECIALIZATION @VCL_DEFINE_SPECIALIZATION@


//: VCL_NULL_TMPL_ARGS
//
// Define to <> for compilers that require them in friend template function
// declarations (i.e., EGCS).

//#define VCL_NULL_TMPL_ARGS /* <> */
//#define VCL_NULL_TMPL_ARGS <>
#define VCL_NULL_TMPL_ARGS @VCL_NULL_TMPL_ARGS@


//----------------------------------------------------------------------
// template instantiation

//: VCL_ALLOWS_INLINE_INSTANTIATION
//
// True if the compiler allows explicit instantiation of inline
// function templates. The native SGI CC 7.2.1 does not.
#define VCL_ALLOWS_INLINE_INSTANTIATION @VCL_ALLOWS_INLINE_INSTANTIATION@


//: VCL_NEEDS_INLINE_INSTANTIATION
//
// True if the compiler needs explicit instantiation of inline
// function templates. gcc 2.7.2 (with -fno-implicit-templates) does.
#define VCL_NEEDS_INLINE_INSTANTIATION @VCL_NEEDS_INLINE_INSTANTIATION@


//: VCL_DO_NOT_INSTANTIATE(text, ret)
//
// If a method is defined on some template, but makes no sense for some
// instances of that template, the compiler should not complain unless the
// method is actually used.  For example
// \code
//     template <class T>
//     class T {
//       int bad_method() {
//         return T::f();  // Requires T to have static method f
//       }
//     };
// \endcode
//
// The language allows you to use a T<int> even though int::f() is garbage,
// *providing* you never call T.bad_method().
//
// Most compilers don't implement that yet, so the solution is to provide a
// dummy specialization of T::bad_method that returns something mundane and
// stops the standard bad_method from being generated.  For this, use:
// \code
//     VCL_DO_NOT_INSTANTIATE(int T::bad_method(), some_return_value)
// \endcode
// if the function is void, use VCL_VOID_RETURN as the return value

//#define VCL_DO_NOT_INSTANTIATE(text, ret) text { return ret; }
//#define VCL_DO_NOT_INSTANTIATE(text, ret) template <> text { return ret; }
//#define VCL_DO_NOT_INSTANTIATE(text, ret) /* no need -- magic compiler */
//FIXME #define VCL_DO_NOT_INSTANTIATE(text, ret) @VCL_DO_NOT_INSTANTIATE@
#define VCL_DO_NOT_INSTANTIATE(text, ret) \
VCL_DEFINE_SPECIALIZATION \
text { return ret; }


//: VCL_UNINSTANTIATE_SPECIALIZATION(symbol)
//
// OK, various compilers do various silly things about instantiation of
// functions/methods that have been specialized.  Use this macro to tell
// the compiler not to generate code for methods which have been specialized
// \code
//      VCL_UNINSTANTIATE_SPECIALIZATION(int T::specialized_method())
// \endcode
// It should be placed after the "template class A<T>;"

//#define VCL_UNINSTANTIATE_SPECIALIZATION(symbol)  @pragma do_not_instantiate text@
//#define VCL_UNINSTANTIATE_SPECIALIZATION(symbol) /* no need - sensible compiler */
//FIXME #define VCL_UNINSTANTIATE_SPECIALIZATION(symbol) @VCL_UNINSTANTIATE_SPECIALIZATION@

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -