summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Bailey <derekbailey@google.com>2023-05-17 13:23:34 -0700
committerGitHub <noreply@github.com>2023-05-17 13:23:34 -0700
commitae6753684ec9e958251035836eb42fafcfe800fc (patch)
tree0eed42cbc6605c9b96cc297aeb50e860987c738f
parenta352bdbc34130aea537040cd2bfe9eb73d63c74b (diff)
downloadflatbuffers-ae6753684ec9e958251035836eb42fafcfe800fc.tar.gz
flatbuffers-ae6753684ec9e958251035836eb42fafcfe800fc.tar.bz2
flatbuffers-ae6753684ec9e958251035836eb42fafcfe800fc.zip
switch back to having T explicitly defined in CreateVector (#7967)
-rw-r--r--include/flatbuffers/flatbuffer_builder.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/flatbuffers/flatbuffer_builder.h b/include/flatbuffers/flatbuffer_builder.h
index 6dcf9528..0a38b4ac 100644
--- a/include/flatbuffers/flatbuffer_builder.h
+++ b/include/flatbuffers/flatbuffer_builder.h
@@ -722,9 +722,8 @@ template<bool Is64Aware = false> class FlatBufferBuilderImpl {
/// @param[in] len The number of elements to serialize.
/// @return Returns a typed `TOffset` into the serialized data indicating
/// where the vector is stored.
- template<template<typename...> class OffsetT = Offset,
- template<typename...> class VectorT = Vector,
- int &...ExplicitArgumentBarrier, typename T>
+ template<typename T, template<typename...> class OffsetT = Offset,
+ template<typename...> class VectorT = Vector>
OffsetT<VectorT<T>> CreateVector(const T *v, size_t len) {
// The type of the length field in the vector.
typedef typename VectorT<T>::size_type LenT;
@@ -793,7 +792,7 @@ template<bool Is64Aware = false> class FlatBufferBuilderImpl {
template<template<typename...> class VectorT = Vector64,
int &...ExplicitArgumentBarrier, typename T>
Offset64<VectorT<T>> CreateVector64(const std::vector<T> &v) {
- return CreateVector<Offset64, VectorT>(data(v), v.size());
+ return CreateVector<T, Offset64, VectorT>(data(v), v.size());
}
// vector<bool> may be implemented using a bit-set, so we can't access it as