📄 vcl_config_compiler.h
字号:
#ifndef vcl_config_compiler_h_config_win32_vc70_
#define vcl_config_compiler_h_config_win32_vc70_
//:
// \file
// This file is *not* generated.
//----------------------------------------------------------------------
// 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 1
//: VCL_HAS_DYNAMIC_CAST
//
// True if the compiler supports dynamic cast.
//
#define VCL_HAS_DYNAMIC_CAST 1
//: VCL_HAS_RTTI
//
// True if the compiler supports RTTI, viz the 'typeid' function.
//
#define VCL_HAS_RTTI 0
//: VCL_HAS_TYPENAME
//
// True if the compiler supports the "typename" keyword
//
#define VCL_HAS_TYPENAME 1
//: VCL_HAS_EXPORT
//
// True if the compiler supports the "export" keyword. FIXME.
//
#define VCL_HAS_EXPORT 0
//: VCL_HAS_MUTABLE
//
// True if the compiler supports the "mutable" keyword
//
#define VCL_HAS_MUTABLE 1
//: VCL_HAS_EXPLICIT
//
// True if the compiler supports the "explicit" keyword
//
#define VCL_HAS_EXPLICIT 1
//: 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 1
//: VCL_COMPLEX_POW_WORKS
//
// It appears several programmers have (independently)
// not realised their lack of knowledge of complex numbers.
// pow(complex(-1,0),0.5) should return (0,1) not (Nan,0), etc.
#define VCL_COMPLEX_POW_WORKS 0
//: 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) /* no need */
//----------------------------------------------------------------------
// 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 make matters worse, some compilers (at least VC 7) mistakenly
// allocate storage without the definition in namespace scope,
// which results in multiply defined symbols.
// To use the macro, use VCL_STATIC_CONST_INIT_INT_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_INT_DEFN in some .cxx file to define
// the constant, but only if VCL_STATIC_CONST_INIT_INT_NO_DEFN
// evaluates to false.
// \code
// #if !VCL_STATIC_CONST_INIT_INT_NO_DEFN
// const int A::x VCL_STATIC_CONST_INIT_INT_DEFN(27);
// #endif
// \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 0
#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 */
# define VCL_STATIC_CONST_INIT_INT_NO_DEFN 0
#else
# define VCL_STATIC_CONST_INIT_INT_DECL(x) /* not allowed */
# define VCL_STATIC_CONST_INIT_INT_DEFN(x) = x
# define VCL_STATIC_CONST_INIT_INT_NO_DEFN 0
#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 0
#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 */
# define VCL_STATIC_CONST_INIT_FLOAT_NO_DEFN 0
#else
# define VCL_STATIC_CONST_INIT_FLOAT_DECL(x) /* not allowed */
# define VCL_STATIC_CONST_INIT_FLOAT_DEFN(x) = x
# define VCL_STATIC_CONST_INIT_FLOAT_NO_DEFN 0
#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 1
//: 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 0
//: 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 <>
// !!! different from VC6
#define VCL_DEFINE_SPECIALIZATION template <>
//: VCL_CANNOT_SPECIALIZE_CV
//
// Template specialization considers top-level cv-qualifiers of the
// argument type. For example, A<int> and A<int const> are distinct
// types. Some compilers (eg Borland 5.5) do not make this distinction.
// Specializations using top-level cv-qualifiers should not be defined
// in addition to the unqualified equivalents unless
// VCL_CANNOT_SPECIALIZE_CV is false.
//#define VCL_CANNOT_SPECIALIZE_CV 1 /* cannot specialize with cv-qualifiers */
//#define VCL_CANNOT_SPECIALIZE_CV 0 /* can specialize with cv-qualifiers */
#define VCL_CANNOT_SPECIALIZE_CV 0
//: VCL_TEMPLATE_MATCHES_TOO_OFTEN
//
// A function template is selected by overload resolution only if no
// non-template requires equal or better conversions. Some compilers
// (eg MSVC 6.x and 7.0, Borland 5.5 and 5.6) select the template
// incorrectly in a case like this:
// \code
// class A {};
// template <class T> void f(T);
// void f(const A&);
// void g() { f(A()); } // should call non-template
// \endcode
//
// The work-around is to explicitly give the template a worse
// conversion than the non-templated overloads:
// \code
// class A {};
// template <class T> inline void f(T t) { f(t, 1); }
// template <class T> void f(T t, long);
// void f(const A&, int);
// void g() { f(A()); } // will call non-template
// \endcode
// In this example, the inline one-argument template will always be
// called, which will call the real function with an "int" passed to
// the second argument. The templated two-argument function has a
// "long" second argument while the others have "int". Therefore, the
// template will be chosen only if no non-templates match.
//
// The VCL_TEMPLATE_MATCHES_TOO_OFTEN macro is set to 1
// if this work-around is required and 0 otherwise.
//#define VCL_TEMPLATE_MATCHES_TOO_OFTEN 1 /* need work-around */
//#define VCL_TEMPLATE_MATCHES_TOO_OFTEN 0 /* do not need it */
#ifdef VCL_VC71 // If C++.NET 2003 Version 7.1
# define VCL_TEMPLATE_MATCHES_TOO_OFTEN 0
#else
# define VCL_TEMPLATE_MATCHES_TOO_OFTEN 1
#endif
//: VCL_HAS_SLICED_DESTRUCTOR_BUG
//
// Consider this example code that creates a temporary in the call to f:
// \code
// struct A { A(); A(const A&); ~A(); };
// struct B: public A { B(); B(const B& b); ~B(); };
// struct C { operator B(); };
// void f(A);
// void g(C c) { f(c); } // fails to call ~B() on 2nd temporary B
// \endcode
// Compilers will call c.operator B() to implement the conversion
// necessary to call f(c). Some compilers will then create a
// temporary A by copy-constructing the temporary B to bind the
// argument of f. Others will create a second temporary B by
// copy-constructing the first temporary B and bind the A-portion of
// the object to the argument of f. Some compilers (at least Intel
// C++ 7.0 and 7.1) will create a second temporary B but forget to
// call ~B() when destroying it. This can cause resource leaks.
//
// The VCL_HAS_SLICED_DESTRUCTOR_BUG is set to 1 if this bug exists in
// the compiler and 0 otherwise.
//#define VCL_HAS_SLICED_DESTRUCTOR_BUG 1 /* bug exists */
//#define VCL_HAS_SLICED_DESTRUCTOR_BUG 0 /* bug does not exist */
#define VCL_HAS_SLICED_DESTRUCTOR_BUG 0
//: VCL_NULL_TMPL_ARGS
//
// Define to <> for compilers that require them in friend template function
// declarations (i.e., EGCS, VC C++.NET 2003).
#ifdef VCL_VC71 // If C++.NET 2003 Version 7.1
# define VCL_NULL_TMPL_ARGS <>
#else
# define VCL_NULL_TMPL_ARGS /* <> */
#endif
//----------------------------------------------------------------------
// 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 1
//: 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 0
//: 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 {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -