summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-05-08 12:33:33 -0400
committerNat Goodspeed <nat@lindenlab.com>2017-05-08 12:33:33 -0400
commit8502b7dc474094c807e49f2896ab6ff7622f96bb (patch)
treec324d0d29843ca9f1810ed967d56d65a798a81f2 /indra
parentccc42830ee51e4721e6fb9f09ca6953672de7f53 (diff)
DRTVWR-418: Work around VS2013's lack of __has_feature().
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llinstancetracker.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h
index 69c712b656..910c8dbd99 100644
--- a/indra/llcommon/llinstancetracker.h
+++ b/indra/llcommon/llinstancetracker.h
@@ -36,7 +36,14 @@
#include <boost/iterator/indirect_iterator.hpp>
// As of 2017-05-06, as far as nat knows, only clang supports __has_feature().
-#if defined(LL_TEST_llinstancetracker) && defined(__clang__) && __has_feature(cxx_noexcept)
+// Unfortunately VS2013's preprocessor shortcut logic doesn't prevent it from
+// producing (fatal) warnings for defined(__clang__) && __has_feature(...).
+// Have to work around that.
+#if ! defined(__clang__)
+#define __has_feature(x) 0
+#endif // __clang__
+
+#if defined(LL_TEST_llinstancetracker) && __has_feature(cxx_noexcept)
// ~LLInstanceTracker() performs llassert_always() validation. That's fine in
// production code, since the llassert_always() is implemented as an LL_ERRS
// message, which will crash-with-message. In our integration test executable,