From efce6546b681d753153c229744b8162f1edaf851 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 9 Jan 2019 11:35:55 -0500 Subject: [PATCH] Use more generic DEPRECATED macro --- include/common.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/common.hpp b/include/common.hpp index 9b83992a..cdbfdb80 100644 --- a/include/common.hpp +++ b/include/common.hpp @@ -15,8 +15,16 @@ #include -/** Deprecation notice for GCC */ -#define DEPRECATED __attribute__ ((deprecated)) +/** Deprecation notice for functions +E.g. + DEPRECATED void foo(); +*/ +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATED __attribute__ ((deprecated)) +#elif defined(_MSC_VER) + #define DEPRECATED __declspec(deprecated) +#endif + /** Concatenates two literals or two macros