deprecating span::at and span::operator()

This commit is contained in:
Jordan Maples [MSFT]
2019-11-19 14:31:21 -08:00
parent 7e99e76c97
commit 5e0d76a1a7
2 changed files with 12 additions and 0 deletions
+4
View File
@@ -510,8 +510,12 @@ public:
return data()[idx];
}
// 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 { return this->operator[](idx); }
[[deprecated("Use operator[]")]]
constexpr reference operator()(index_type idx) const { return this->operator[](idx); }
constexpr pointer data() const noexcept { return storage_.data(); }
// [span.iter], span iterator support