Define CROCODDYL_DISABLE_WARNING_DEPRECATED
Defined in File deprecate.hpp
Define Documentation
-
CROCODDYL_DISABLE_WARNING_DEPRECATED
Macros for generating compiler warnings via pragmas (GCC/Clang only).
These macros allow the generation of custom compiler warnings and messages using
#pragmain a portable and readable way. They are useful for alerting users about deprecated headers, features that will be removed, or general warnings during compilation.Supported compilers: GCC and Clang
References: https://stackoverflow.com/questions/171435/portability-of-warning-preprocessor-directive
Usage: CROCODDYL_PRAGMA_WARNING(“This is a warning”) CROCODDYL_PRAGMA_DEPRECATED(“This feature is deprecated”) CROCODDYL_PRAGMA_DEPRECATED_HEADER(“old.hpp”, “new.hpp”) CROCODDYL_PRAGMA_TO_BE_REMOVED_HEADER(“soon_removed.hpp”)
Macros to temporarily disable and re-enable deprecated warnings
These macros allow you to suppress deprecation warnings (e.g., from using [[deprecated]] functions) in a cross-platform way. This is particularly useful when maintaining compatibility while deprecating APIs.
Usage: CROCODDYL_DISABLE_WARNING_DEPRECATED // Code that may trigger deprecation warnings CROCODDYL_ENABLE_WARNING_DEPRECATED
For compilers that support warning pragmas (MSVC, Clang, GCC), the macros use push/pop to ensure the warning state is restored after use. For unknown compilers, these macros expand to nothing.