Add reference, pointer, and co type aliases for rtc::ArrayView.
Many STL containers define these type aliases, and they are easier to
work with than add_const_t<add_lvalue_reference_t<value_type>>.
In a followup, `WTF::Vector` in Blink's conversion constructor from
other containers will be SFINAE-guarded using these type aliases.
Bug: chromium:1408442
Change-Id: I7790e6f462a32e7e49bc6468afeda6b2e6d4b631
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300180
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39771}
diff --git a/api/array_view.h b/api/array_view.h
index 2d68f16..7e01959 100644
--- a/api/array_view.h
+++ b/api/array_view.h
@@ -149,6 +149,10 @@
class ArrayView final : public array_view_internal::ArrayViewBase<T, Size> {
public:
using value_type = T;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
using const_iterator = const T*;
// Construct an ArrayView from a pointer and a length.