Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/GSL.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJordan Maples <jomaples@microsoft.com>2020-05-29 20:53:30 +0300
committerJordan Maples <jomaples@microsoft.com>2020-05-29 20:53:30 +0300
commitc4a2ce6cc8aa2a638b088711a2547234c67b2ea3 (patch)
tree342917b8d3dc5b73d43498c42d7d264d2212bed7 /tests
parent9720cc552ac6565bcba343bfaaa5d9bf2dccaa29 (diff)
wrapping string_view checks in deduction guide checks to prevent 'macro unused' errors
Diffstat (limited to 'tests')
-rw-r--r--tests/span_tests.cpp7
1 files changed, 5 insertions, 2 deletions
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 <vector> // for vector
#include <utility>
+// 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(<string_view>)
#include <string_view>
#define HAS_STRING_VIEW
-#endif
-#endif
+#endif // __has_include(<string_view>)
+#endif // __has_include
+#endif // (defined(__cpp_deduction_guides) && (__cpp_deduction_guides >= 201611L))
using namespace std;
using namespace gsl;