From 43d60c5e3891dab6491a76d0bac554a4a89d57f6 Mon Sep 17 00:00:00 2001 From: Werner Henze <34543625+beinhaerter@users.noreply.github.com> Date: Wed, 15 Mar 2023 00:57:46 +0100 Subject: [PATCH] Suppress warning C26481 (#1099) Suppress "warning C26481: Don't use pointer arithmetic. Use span instead (bounds.1)." in the code that impements `span`. --- include/gsl/span | 1 + 1 file changed, 1 insertion(+) diff --git a/include/gsl/span b/include/gsl/span index 05d72be..25e244f 100644 --- a/include/gsl/span +++ b/include/gsl/span @@ -215,6 +215,7 @@ namespace details if (n != 0) Expects(begin_ && current_ && end_); if (n > 0) Expects(current_ - begin_ >= n); if (n < 0) Expects(end_ - current_ >= -n); + GSL_SUPPRESS(bounds .1) current_ -= n; return *this; }