Add value_type alias to rtc::Buffer

It allows to use rtc::Buffer in templates that expect std container,
e.g. it can now be used as ::testing::ElementsAreArray parameter

Bug: None
Change-Id: I97d7ffb13393d02850ddb213f7a1d01129b10b05
Reviewed-on: https://chromium-review.googlesource.com/539635
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18809}
This commit is contained in:
Danil Chapovalov 2017-06-28 15:15:30 +02:00 committed by Commit Bot
parent c8e0552c07
commit 1330166bc0

View File

@ -57,6 +57,8 @@ class BufferT {
static_assert(!std::is_const<T>::value, "T may not be const");
public:
using value_type = T;
// An empty BufferT.
BufferT() : size_(0), capacity_(0), data_(nullptr) {
RTC_DCHECK(IsConsistent());