deprecated.hpp 832 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright Takatoshi Kondo 2019
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #if !defined(MQTT_DEPRECATED_HPP)
  7. #define MQTT_DEPRECATED_HPP
  8. #if defined(MQTT_USE_DEPRECATED)
  9. #define MQTT_DEPRECATED(msg) // for test, ignore it
  10. #else // defined(MQTT_USE_DEPRECATED)
  11. #if __cplusplus >= 201402L
  12. #if defined(_MSC_VER)
  13. #define MQTT_DEPRECATED(msg) __declspec(deprecated(msg))
  14. #else // _MSC_VER 1914+ with /Zc:__cplusplus, @see https://docs.microsoft.com/cpp/build/reference/zc-cplusplus
  15. #define MQTT_DEPRECATED(msg) [[deprecated(msg)]]
  16. #endif
  17. #else // __cplusplus >= 201402L
  18. #define MQTT_DEPRECATED(msg)
  19. #endif // __cplusplus >= 201402L
  20. #endif // defined(MQTT_USE_DEPRECATED)
  21. #endif // MQTT_DEPRECATED_HPP