projects
/
platform
/
upstream
/
flatbuffers.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8571966
)
Define Vector::value_type for STL compatibility (#6394)
author
brian-brt
<brian.silverman@bluerivert.com>
Fri, 8 Jan 2021 19:35:55 +0000
(11:35 -0800)
committer
GitHub
<noreply@github.com>
Fri, 8 Jan 2021 19:35:55 +0000
(11:35 -0800)
Specifically, this lets the googlemock container matchers work with a
flatbuffers::Vector.
https://github.com/google/googletest/blob/master/googlemock/docs/cheat_sheet.md#container-matchers
include/flatbuffers/flatbuffers.h
patch
|
blob
|
history
diff --git
a/include/flatbuffers/flatbuffers.h
b/include/flatbuffers/flatbuffers.h
index
c429cc4
..
300ab6f
100644
(file)
--- a/
include/flatbuffers/flatbuffers.h
+++ b/
include/flatbuffers/flatbuffers.h
@@
-257,6
+257,7
@@
template<typename T> class Vector {
typedef typename IndirectHelper<T>::return_type return_type;
typedef typename IndirectHelper<T>::mutable_return_type mutable_return_type;
+ typedef return_type value_type;
return_type Get(uoffset_t i) const {
FLATBUFFERS_ASSERT(i < size());