deprecated.h 613 B

123456789101112131415161718192021
  1. #ifndef IGL_DEPRECATED_H
  2. #define IGL_DEPRECATED_H
  3. // Macro for marking a function as deprecated.
  4. //
  5. // http://stackoverflow.com/a/295229/148668
  6. #ifdef __GNUC__
  7. #define IGL_DEPRECATED(func) func __attribute__ ((deprecated))
  8. #elif defined(_MSC_VER)
  9. #define IGL_DEPRECATED(func) __declspec(deprecated) func
  10. #else
  11. #pragma message("WARNING: You need to implement IGL_DEPRECATED for this compiler")
  12. #define IGL_DEPRECATED(func) func
  13. #endif
  14. // Usage:
  15. //
  16. // template <typename T> IGL_INLINE void my_func(Arg1 a);
  17. //
  18. // becomes
  19. //
  20. // template <typename T> IGL_INLINE IGL_DEPRECATED(void my_func(Arg1 a));
  21. #endif