Skip to content

Instantly share code, notes, and snippets.

@q66
Created June 27, 2024 20:49
Show Gist options
  • Save q66/2f3d394637b72e2b8130d96fc1a1a350 to your computer and use it in GitHub Desktop.
Save q66/2f3d394637b72e2b8130d96fc1a1a350 to your computer and use it in GitHub Desktop.
template <class _Tp, class _Allocator>
_LIBCPP_CONSTEXPR_SINCE_CXX20 inline _LIBCPP_HIDE_FROM_ABI typename vector<_Tp, _Allocator>::reference
vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT {
_LIBCPP_ASSERT_VALID_ELEMENT_ACCESS(__n < size(), "vector[] index out of bounds");
return this->__begin_[__n];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment