Skip to content

Commit c9e423d

Browse files
sunchoneilmacintosh
authored andcommitted
Fix warning 4996 on Microsoft compiler (microsoft#633)
1 parent 6a33b97 commit c9e423d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/gsl/span

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ namespace details
121121
using element_type_ = typename Span::element_type;
122122

123123
public:
124+
125+
#ifdef _MSC_VER
126+
// Tell Microsoft standard library that span_iterators are checked.
127+
using _Unchecked_type = typename Span::pointer;
128+
#endif
129+
124130
using iterator_category = std::random_access_iterator_tag;
125131
using value_type = std::remove_cv_t<element_type_>;
126132
using difference_type = typename Span::index_type;

0 commit comments

Comments
 (0)