From c9e423d7cf2afb88672e31f55e4b30c53be7aae3 Mon Sep 17 00:00:00 2001 From: Alex Howlett Date: Mon, 5 Mar 2018 15:04:22 -0500 Subject: [PATCH] Fix warning 4996 on Microsoft compiler (#633) --- include/gsl/span | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/gsl/span b/include/gsl/span index 22e8459..622c031 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -121,6 +121,12 @@ namespace details using element_type_ = typename Span::element_type; public: + +#ifdef _MSC_VER + // Tell Microsoft standard library that span_iterators are checked. + using _Unchecked_type = typename Span::pointer; +#endif + using iterator_category = std::random_access_iterator_tag; using value_type = std::remove_cv_t; using difference_type = typename Span::index_type;