From c4a2ce6cc8aa2a638b088711a2547234c67b2ea3 Mon Sep 17 00:00:00 2001 From: Jordan Maples Date: Fri, 29 May 2020 10:53:30 -0700 Subject: wrapping string_view checks in deduction guide checks to prevent 'macro unused' errors --- tests/span_tests.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/span_tests.cpp b/tests/span_tests.cpp index d27d645..ee23009 100644 --- a/tests/span_tests.cpp +++ b/tests/span_tests.cpp @@ -31,12 +31,15 @@ #include // for vector #include +// the string_view include and macro are used in the deduciton guide verification +#if (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L)) #ifdef __has_include #if __has_include() #include #define HAS_STRING_VIEW -#endif -#endif +#endif // __has_include() +#endif // __has_include +#endif // (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L)) using namespace std; using namespace gsl; -- cgit v1.2.3