mqtt_cpp
deprecated.hpp
Go to the documentation of this file.
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 
7 #if !defined(MQTT_DEPRECATED_HPP)
8 #define MQTT_DEPRECATED_HPP
9 
10 #if defined(MQTT_USE_DEPRECATED)
11 
12 #define MQTT_DEPRECATED(msg) // for test, ignore it
13 
14 #else // defined(MQTT_USE_DEPRECATED)
15 
16 #if __cplusplus >= 201402L
17 
18 #if defined(_MSC_VER)
19 
20 #define MQTT_DEPRECATED(msg) __declspec(deprecated(msg))
21 
22 #else // _MSC_VER 1914+ with /Zc:__cplusplus, @see https://docs.microsoft.com/cpp/build/reference/zc-cplusplus
23 
24 #define MQTT_DEPRECATED(msg) [[deprecated(msg)]]
25 
26 #endif
27 
28 #else // __cplusplus >= 201402L
29 
30 #define MQTT_DEPRECATED(msg)
31 
32 #endif // __cplusplus >= 201402L
33 
34 #endif // defined(MQTT_USE_DEPRECATED)
35 
36 #endif // MQTT_DEPRECATED_HPP