================ @@ -343,6 +347,15 @@ public: return __data_[__idx]; } +# if _LIBCPP_STD_VER >= 26 + _LIBCPP_HIDE_FROM_ABI constexpr reference at(size_type __idx) const { + if (__idx >= size()) { + __throw_out_of_range(); + } + return *(data() + __idx); ---------------- H-G-Hristov wrote:
I already renamed the arg as you suggested but in the synopsis both methods would be using `idx` ```c++ constexpr reference operator[](size_type idx) const; constexpr reference at(size_type idx) const; ``` Would it make sense to also rename the arg of `operator[]` for consistency? https://github.com/llvm/llvm-project/pull/74994 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits