From eb995b36714c6c8639da25ea90f8f4f73017e8ca Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Wed, 2 Oct 2019 16:17:46 -0700 Subject: [PATCH] deprecating strided_span --- include/gsl/multi_span | 2 +- tests/bounds_tests.cpp | 4 +++- tests/multi_span_tests.cpp | 4 +++- tests/strided_span_tests.cpp | 4 +++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/include/gsl/multi_span b/include/gsl/multi_span index e67b811..eac4397 100644 --- a/include/gsl/multi_span +++ b/include/gsl/multi_span @@ -1781,7 +1781,7 @@ GSL_SUPPRESS(bounds.4) // NO-FORMAT: attribute // strided_span is an extension that is not strictly part of the GSL at this time. // It is kept here while the multidimensional interface is still being defined. template -class strided_span +class [[deprecated]] strided_span { public: using bounds_type = strided_bounds; diff --git a/tests/bounds_tests.cpp b/tests/bounds_tests.cpp index 1de4e1a..29c198a 100644 --- a/tests/bounds_tests.cpp +++ b/tests/bounds_tests.cpp @@ -17,7 +17,9 @@ #ifdef _MSC_VER // blanket turn off warnings from CppCoreCheck from catch // so people aren't annoyed by them when running the tool. -#pragma warning(disable : 26440 26426 4996) // from catch deprecated +#pragma warning(disable : 26440 26426) // from catch +#pragma warning(disable : 4996) // use of function or classes marked [[deprecated]] + #endif #include // for AssertionHandler, StringRef, TEST_CASE diff --git a/tests/multi_span_tests.cpp b/tests/multi_span_tests.cpp index 3aaf2f9..97b2271 100644 --- a/tests/multi_span_tests.cpp +++ b/tests/multi_span_tests.cpp @@ -17,7 +17,9 @@ #ifdef _MSC_VER // blanket turn off warnings from CppCoreCheck from catch // so people aren't annoyed by them when running the tool. -#pragma warning(disable : 26440 26426 4996) // from catch deprecated +#pragma warning(disable : 26440 26426) // from catch +#pragma warning(disable : 4996) // multi_span is in the process of being deprecated. + // Suppressing warnings until it is completely removed #endif diff --git a/tests/strided_span_tests.cpp b/tests/strided_span_tests.cpp index 949b1c2..0d0896a 100644 --- a/tests/strided_span_tests.cpp +++ b/tests/strided_span_tests.cpp @@ -17,7 +17,9 @@ #ifdef _MSC_VER // blanket turn off warnings from CppCoreCheck from catch // so people aren't annoyed by them when running the tool. -#pragma warning(disable : 26440 26426 4996) // from catch deprecated +#pragma warning(disable : 26440 26426) // from catch deprecated +#pragma warning(disable : 4996) // strided_span is in the process of being deprecated. + // Suppressing warnings until it is completely removed #endif