summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Moreland <smoreland@google.com>2019-05-06 09:39:47 -0700
committerSteven Moreland <smoreland@google.com>2019-05-06 19:39:35 +0000
commit10688bd08fc3a356b39c19414861f9404c083703 (patch)
tree2363391972c2ca543b59fba29df4805b21db24e1
parent54562d434295c9f00444f7ccc50bc0c4cff33b28 (diff)
downloadlibhidl-oreo-mr1-iot-release.tar.gz
Note: this only adds value_type to single dimensional hidl_array since the multi-dimensional hidl_array only has a view returned from operator=. Waiting for more usecases before creating a value_type there. Bug: 130662871 Test: N/A Change-Id: Ie693199271267c239e657e99511ea2605d062187 Merged-In: Ie693199271267c239e657e99511ea2605d062187
-rw-r--r--base/include/hidl/HidlSupport.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 55f21ea..79dd992 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -326,6 +326,8 @@ protected:
template<typename T>
struct hidl_vec {
+ using value_type = T;
+
hidl_vec()
: mBuffer(nullptr),
mSize(0),
@@ -789,7 +791,7 @@ private:
// An array of T's. Assumes that T::operator=(const T &) is defined.
template<typename T, size_t SIZE1>
struct hidl_array<T, SIZE1> {
-
+ using value_type = T;
using std_array_type = typename details::std_array<T, SIZE1>::type;
hidl_array() = default;