mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
Merge branch 'master' into dev/jomaples/add_missing_span_functions
This commit is contained in:
commit
395a5bf550
@ -521,11 +521,15 @@ public:
|
|||||||
Expects(size() > 0);
|
Expects(size() > 0);
|
||||||
return data()[size() - 1];
|
return data()[size() - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// at and operator() are deprecated to align to the public member functions of std::span
|
||||||
|
[[deprecated("Use operator[]")]]
|
||||||
constexpr reference at(index_type idx) const noexcept{ return this->operator[](idx); }
|
constexpr reference at(index_type idx) const noexcept{ return this->operator[](idx); }
|
||||||
|
[[deprecated("Use operator[]")]]
|
||||||
constexpr reference operator()(index_type idx) const noexcept{ return this->operator[](idx); }
|
constexpr reference operator()(index_type idx) const noexcept{ return this->operator[](idx); }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
constexpr pointer data() const noexcept { return storage_.data(); }
|
constexpr pointer data() const noexcept { return storage_.data(); }
|
||||||
|
|
||||||
// [span.iter], span iterator support
|
// [span.iter], span iterator support
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// blanket turn off warnings from CppCoreCheck from catch
|
// blanket turn off warnings from CppCoreCheck from catch
|
||||||
// so people aren't annoyed by them when running the tool.
|
// so people aren't annoyed by them when running the tool.
|
||||||
#pragma warning(disable : 26440 26426 26497 4189) // from catch
|
#pragma warning(disable : 26440 26426 26497 4189 4996)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __clang__ || __GNUC__
|
#if __clang__ || __GNUC__
|
||||||
@ -26,6 +25,7 @@
|
|||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wundef"
|
#pragma GCC diagnostic ignored "-Wundef"
|
||||||
#pragma GCC diagnostic ignored "-Wunused-variable"
|
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif // __clang__ || __GNUC__
|
#endif // __clang__ || __GNUC__
|
||||||
|
|
||||||
#if __clang__
|
#if __clang__
|
||||||
|
Loading…
Reference in New Issue
Block a user