From 368f2cd9a66f3808b77dfe73e56662d2b1788beb Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Tue, 3 Apr 2018 10:57:38 +0200 Subject: [PATCH] Fix for deprecated macro --- include/CLI/Macros.hpp | 2 ++ include/CLI/Option.hpp | 13 ++++++++----- tests/OptionalTest.cpp | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/CLI/Macros.hpp b/include/CLI/Macros.hpp index 21d584ea..9c10b081 100644 --- a/include/CLI/Macros.hpp +++ b/include/CLI/Macros.hpp @@ -35,6 +35,8 @@ namespace CLI { #if defined(PYBIND11_CPP14) #define CLI11_DEPRECATED(reason) [[deprecated(reason)]] +#elif defined(_MSC_VER) +#define CLI11_DEPRECATED(reason) __declspec(deprecated(reason)) #else #define CLI11_DEPRECATED(reason) __attribute__((deprecated(reason))) #endif diff --git a/include/CLI/Option.hpp b/include/CLI/Option.hpp index 9b8ea03c..6985308a 100644 --- a/include/CLI/Option.hpp +++ b/include/CLI/Option.hpp @@ -306,14 +306,17 @@ class Option : public OptionBase