From 13a227a96e3bc61d8e24244580c32c3b6c56fc15 Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Thu, 21 Dec 2017 19:47:03 +0100 Subject: [PATCH] std::allocator is deprecated in C++17 silence the deprecation warning Signed-off-by: Daniela Engert --- test/vector_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/vector_test.cpp b/test/vector_test.cpp index 25fe1af..6c1597a 100644 --- a/test/vector_test.cpp +++ b/test/vector_test.cpp @@ -7,6 +7,13 @@ // See http://www.boost.org/libs/container for documentation. // ////////////////////////////////////////////////////////////////////////////// + +// the tests trigger deprecation warnings when compiled with msvc in C++17 mode +#if defined(_MSVC_LANG) && _MSVC_LANG > 201402 +// warning STL4009: std::allocator is deprecated in C++17 +# define _SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING +#endif + #include #include