Commit 36091109 authored by Casey Carter's avatar Casey Carter
Browse files

Implement _LIBCPP_SUPPRESS_DEPRECATED_XXX when testing MSVC's STL

...to properly silence clang deprecation warnings in `test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp`.
parent 09f4bdc0
Loading
Loading
Loading
Loading
+14 −2
Original line number Diff line number Diff line
@@ -91,7 +91,19 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
#endif

#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
#define _LIBCPP_SUPPRESS_DEPRECATED_PUSH
#define _LIBCPP_SUPPRESS_DEPRECATED_POP

#ifdef __clang__
#define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \
    _Pragma("GCC diagnostic push") \
    _Pragma("GCC diagnostic ignored \"-Wdeprecated\"")
#define _LIBCPP_SUPPRESS_DEPRECATED_POP \
    _Pragma("GCC diagnostic pop")
#else // ^^^ clang / MSVC vvv
#define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \
    __pragma(warning(push)) \
    __pragma(warning(disable : 4996))
#define _LIBCPP_SUPPRESS_DEPRECATED_POP \
    __pragma(warning(pop))
#endif // __clang__

#endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_H