Skip to content

Commit

Permalink
Merge pull request #870 from beinhaerter/suppress_span_warning
Browse files Browse the repository at this point in the history
suppress code analysis warning
  • Loading branch information
JordanMaples committed Apr 23, 2020
2 parents 3da256d + fb1243d commit 1999b48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/gsl/span
Expand Up @@ -581,12 +581,18 @@ public:
constexpr iterator begin() const noexcept
{
const auto data = storage_.data();
// clang-format off
GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute
// clang-format on
return {data, data + size(), data};
}

constexpr iterator end() const noexcept
{
const auto data = storage_.data();
// clang-format off
GSL_SUPPRESS(bounds.1) // NO-FORMAT: attribute
// clang-format on
const auto endData = data + storage_.size();
return {data, endData, endData};
}
Expand Down

0 comments on commit 1999b48

Please sign in to comment.