summaryrefslogtreecommitdiff
path: root/src/components/include/utils/macro.h
diff options
context:
space:
mode:
authorJacob Keeler <jacob.keeler@livioradio.com>2018-04-05 15:00:43 -0400
committerGitHub <noreply@github.com>2018-04-05 15:00:43 -0400
commit61fd83fed0dc584019b305bebc82512d2c42b9e7 (patch)
tree5432b4212b003d07029911423d64bdf185ea0c9d /src/components/include/utils/macro.h
parent6212599da217e95899d63d4b33088082489841bd (diff)
parentc2bdb27e117e30752d0f223ec0e244f207883795 (diff)
downloadsdl_core-61fd83fed0dc584019b305bebc82512d2c42b9e7.tar.gz
Merge pull request #2005 from smartdevicelink/release/4.5.04.5.0
Release/4.5.0
Diffstat (limited to 'src/components/include/utils/macro.h')
-rw-r--r--src/components/include/utils/macro.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/include/utils/macro.h b/src/components/include/utils/macro.h
index 4cf76fe022..e6f3b6b3ca 100644
--- a/src/components/include/utils/macro.h
+++ b/src/components/include/utils/macro.h
@@ -145,4 +145,22 @@
#define FRIEND_TEST(test_case_name, test_name)
#endif // BUILD_TESTS
+/*
+* @brief deprecate a method declaration, a warning will be thrown by your
+* compiler if a method with this macro is used
+*/
+#if __cplusplus > 201103L
+#define DEPRECATED [[deprecated]]
+#else
+#ifdef __GNUC__
+#define DEPRECATED __attribute__((deprecated))
+#define DEPRECATED_CLASS __attribute__((deprecated))
+#elif defined(_MSC_VER)
+#define DEPRECATED __declspec(deprecated)
+#else
+#pragma message("WARNING: You need to implement DEPRECATED for this compiler")
+#define DEPRECATED
+#endif
+#endif
+
#endif // SRC_COMPONENTS_INCLUDE_UTILS_MACRO_H_