![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
This file is intended to be the first file included to any Open CASCADE source. It defines platform-specific pre-processor macros necessary for correct compilation of Open CASCADE code. More...
Macros | |
| #define | Standard_DEPRECATED_WARNING(theMsg) |
| Core helper emitting a compile-time warning about deprecated usage. Honors OCCT_NO_DEPRECATED and provides a single backend used by other deprecation macros. | |
| #define | Standard_MACRO_DEPRECATED(theMsg) Standard_DEPRECATED_WARNING(theMsg) |
| Macro for marking preprocessor macros as deprecated. When a deprecated macro is used, a compile-time warning will be issued. Unlike Standard_DEPRECATED which marks functions/classes, this is for deprecating macros themselves. | |
| #define | Standard_HEADER_DEPRECATED(theMsg) Standard_DEPRECATED_WARNING(theMsg) |
| Macro for marking header inclusions as deprecated; place near the top of a deprecated header to emit a compile-time warning when it is included. | |
| #define | Standard_OVERRIDE Standard_MACRO_DEPRECATED("Standard_OVERRIDE is deprecated, use override directly") override |
| Should be used in declarations of virtual methods overridden in the derived classes, to cause compilation error in the case if that virtual function disappears or changes its signature in the base class. | |
| #define | Standard_DELETE Standard_MACRO_DEPRECATED("Standard_DELETE is deprecated, use = delete directly") = delete |
| Alias for C++11 keyword "=delete" marking methods to be deleted. | |
| #define | Standard_FALLTHROUGH |
| Should be used in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that next label (i.e. does not end with "break" or "return" etc.). This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough. | |
| #define | Standard_NODISCARD |
| This attribute may appear in a function declaration, enumeration declaration or class declaration. It tells the compiler to issue a warning, if a return value marked by that attribute is discarded. | |
| #define | Standard_UNUSED |
| Macro for marking variables / functions as possibly unused so that compiler will not emit redundant "unused" warnings. | |
| #define | Standard_NOINLINE |
| Macro for disallowing function inlining. Expands to "__attribute__((noinline))" on GCC and CLang. | |
| #define | Standard_THREADLOCAL |
| Define Standard_THREADLOCAL modifier as C++11 thread_local keyword where it is available. | |
| #define | Standard_DEPRECATED(theMsg) |
| Can be used in declaration of a method or a class to mark it as deprecated. Use of such method or class will cause compiler warning (if supported by compiler and unless disabled). If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED is defined empty. | |
| #define | Standard_DEPRECATED_STD(theMsg) [[deprecated(theMsg)]] |
| Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty. | |
| #define | Standard_DISABLE_DEPRECATION_WARNINGS |
| Disables warnings on use of deprecated features (see Standard_DEPRECATED), from the current point till appearance of Standard_ENABLE_DEPRECATION_WARNINGS macro. This is useful for sections of code kept for backward compatibility and scheduled for removal. | |
| #define | Standard_ENABLE_DEPRECATION_WARNINGS |
| Enables warnings on use of deprecated features previously disabled by Standard_DISABLE_DEPRECATION_WARNINGS. | |
| #define | Standard_IMPORT extern |
| #define | Standard_IMPORTC extern "C" |
| #define | Standard_HIDDEN |
| This macro should be used in declarations of methods or functions to ensure that they are hidden and not exported from the shared library. | |
| #define | Standard_HASATOMIC |
| #define | Standard_ATOMIC(theType) |
| Definition of Standard_ATOMIC for C++11 or visual studio that supports it. | |
| #define | Standard_Noexcept Standard_MACRO_DEPRECATED("Standard_Noexcept is deprecated, use noexcept directly") noexcept |
| Definition of Standard_Noexcept: | |
| #define | Standard_CPP17_OR_HIGHER 0 |
| Macro to check if C++ standard version is C++17 or higher. | |
This file is intended to be the first file included to any Open CASCADE source. It defines platform-specific pre-processor macros necessary for correct compilation of Open CASCADE code.
| #define Standard_ATOMIC | ( | theType | ) |
Definition of Standard_ATOMIC for C++11 or visual studio that supports it.
| #define Standard_CPP17_OR_HIGHER 0 |
Macro to check if C++ standard version is C++17 or higher.
Expands to 1 if C++17 or higher is available, 0 otherwise. Uses _MSVC_LANG for MSVC (available since VS 2017.3) which correctly reports the language standard regardless of /Zc:__cplusplus flag. For other compilers or as fallback, uses __cplusplus standard macro.
| #define Standard_DELETE Standard_MACRO_DEPRECATED("Standard_DELETE is deprecated, use = delete directly") = delete |
Alias for C++11 keyword "=delete" marking methods to be deleted.
Can be used in declaration of a method or a class to mark it as deprecated. Use of such method or class will cause compiler warning (if supported by compiler and unless disabled). If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED is defined empty.
Marks a declaration as deprecated using the standard C++ [[deprecated]] attribute. Use this instead of Standard_DEPRECATED in contexts where only standard C++ attributes are grammatically valid, such as using-alias declarations: using OldName Standard_DEPRECATED_STD("msg") = NewName; MSVC rejects declspec(deprecated) and GCC/Clang reject __attribute((deprecated)) when placed between the alias name and the = token, so Standard_DEPRECATED cannot be used there. If macro OCCT_NO_DEPRECATED is defined, Standard_DEPRECATED_STD is defined empty.
Core helper emitting a compile-time warning about deprecated usage. Honors OCCT_NO_DEPRECATED and provides a single backend used by other deprecation macros.
| #define Standard_DISABLE_DEPRECATION_WARNINGS |
Disables warnings on use of deprecated features (see Standard_DEPRECATED), from the current point till appearance of Standard_ENABLE_DEPRECATION_WARNINGS macro. This is useful for sections of code kept for backward compatibility and scheduled for removal.
| #define Standard_ENABLE_DEPRECATION_WARNINGS |
Enables warnings on use of deprecated features previously disabled by Standard_DISABLE_DEPRECATION_WARNINGS.
| #define Standard_FALLTHROUGH |
Should be used in a switch statement immediately before a case label, if code associated with the previous case label may fall through to that next label (i.e. does not end with "break" or "return" etc.). This macro indicates that the fall through is intentional and should not be diagnosed by a compiler that warns on fallthrough.
| #define Standard_HASATOMIC |
| #define Standard_HEADER_DEPRECATED | ( | theMsg | ) | Standard_DEPRECATED_WARNING(theMsg) |
Macro for marking header inclusions as deprecated; place near the top of a deprecated header to emit a compile-time warning when it is included.
| #define Standard_HIDDEN |
This macro should be used in declarations of methods or functions to ensure that they are hidden and not exported from the shared library.
Expands to "__attribute__((visibility("hidden")))" on GCC and Clang
| #define Standard_MACRO_DEPRECATED | ( | theMsg | ) | Standard_DEPRECATED_WARNING(theMsg) |
Macro for marking preprocessor macros as deprecated. When a deprecated macro is used, a compile-time warning will be issued. Unlike Standard_DEPRECATED which marks functions/classes, this is for deprecating macros themselves.
| #define Standard_NODISCARD |
This attribute may appear in a function declaration, enumeration declaration or class declaration. It tells the compiler to issue a warning, if a return value marked by that attribute is discarded.
| #define Standard_Noexcept Standard_MACRO_DEPRECATED("Standard_Noexcept is deprecated, use noexcept directly") noexcept |
Definition of Standard_Noexcept:
| #define Standard_NOINLINE |
Macro for disallowing function inlining. Expands to "__attribute__((noinline))" on GCC and CLang.
| #define Standard_OVERRIDE Standard_MACRO_DEPRECATED("Standard_OVERRIDE is deprecated, use override directly") override |
Should be used in declarations of virtual methods overridden in the derived classes, to cause compilation error in the case if that virtual function disappears or changes its signature in the base class.
| #define Standard_THREADLOCAL |
Define Standard_THREADLOCAL modifier as C++11 thread_local keyword where it is available.
| #define Standard_UNUSED |
Macro for marking variables / functions as possibly unused so that compiler will not emit redundant "unused" warnings.