File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ struct Reader {
7373 std::is_same<std::remove_cvref_t <T>,
7474 rfl::Vectorstring>()) {
7575 using VectorType = std::remove_cvref_t <T>;
76+ using ValueType = typename VectorType::value_type;
7677 const void * ptr = nullptr ;
7778 size_t size = 0 ;
7879 const auto err = avro_value_get_bytes (_var.val_ , &ptr, &size);
@@ -84,7 +85,7 @@ struct Reader {
8485 return error (" Could not cast to vectorstring." );
8586 }
8687 }
87- const auto data = internal::ptr_cast<const VectorType::value_type *>(ptr);
88+ const auto data = internal::ptr_cast<const ValueType *>(ptr);
8889 return VectorType (data, data + size);
8990 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
9091 if (type != AVRO_BOOLEAN ) {
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ struct Reader {
117117 std::is_same<std::remove_cvref_t <T>,
118118 rfl::Vectorstring>()) {
119119 using VectorType = std::remove_cvref_t <T>;
120+ using ValueType = typename VectorType::value_type;
120121 if (btype != BSON_TYPE_BINARY ) {
121122 if constexpr (std::is_same<std::remove_cvref_t <T>,
122123 rfl::Bytestring>()) {
@@ -138,7 +139,7 @@ struct Reader {
138139 }
139140 }
140141 const auto data =
141- internal::ptr_cast<const VectorType::value_type *>(value.v_binary .data );
142+ internal::ptr_cast<const ValueType *>(value.v_binary .data );
142143 return VectorType (data, data + value.v_binary .data_len );
143144
144145 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ class Reader {
6969 std::is_same<std::remove_cvref_t <T>,
7070 rfl::Vectorstring>()) {
7171 using VectorType = std::remove_cvref_t <T>;
72+ using ValueType = typename VectorType::value_type;
7273 if (type != capnp::DynamicValue::DATA ) {
7374 if constexpr (std::is_same<std::remove_cvref_t <T>,
7475 rfl::Bytestring>()) {
@@ -78,7 +79,7 @@ class Reader {
7879 }
7980 }
8081 const auto data = _var.val_ .as <capnp::Data>();
81- const auto begin = internal::ptr_cast<const VectorType::value_type *>(data.begin ());
82+ const auto begin = internal::ptr_cast<const ValueType *>(data.begin ());
8283 return VectorType (begin, begin + data.size ());
8384
8485 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ class Reader {
7878 std::is_same<std::remove_cvref_t <T>,
7979 rfl::Vectorstring>()) {
8080 using VectorType = std::remove_cvref_t <T>;
81+ using ValueType = typename VectorType::value_type;
8182 if (!_var.val_ ->is_byte_string ()) {
8283 if constexpr (std::is_same<std::remove_cvref_t <T>,
8384 rfl::Bytestring>()) {
@@ -87,7 +88,7 @@ class Reader {
8788 }
8889 }
8990 const auto vec = _var.val_ ->as <std::vector<uint8_t >>();
90- const auto data = internal::ptr_cast<const VectorType::value_type *>(vec.data ());
91+ const auto data = internal::ptr_cast<const ValueType *>(vec.data ());
9192 return VectorType (data, data + vec.size ());
9293
9394 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ struct Reader {
8181 std::is_same<std::remove_cvref_t <T>,
8282 rfl::Vectorstring>()) {
8383 using VectorType = std::remove_cvref_t <T>;
84+ using ValueType = typename VectorType::value_type;
8485 if (!_var.IsBlob ()) {
8586 if constexpr (std::is_same<std::remove_cvref_t <T>,
8687 rfl::Bytestring>()) {
@@ -90,7 +91,7 @@ struct Reader {
9091 }
9192 }
9293 const auto blob = _var.AsBlob ();
93- const auto data = internal::ptr_cast<const VectorType::value_type *>(blob.data ());
94+ const auto data = internal::ptr_cast<const ValueType *>(blob.data ());
9495 return VectorType (data, data + blob.size ());
9596
9697 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ struct Reader {
7171 std::is_same<std::remove_cvref_t <T>,
7272 rfl::Vectorstring>()) {
7373 using VectorType = std::remove_cvref_t <T>;
74+ using ValueType = typename VectorType::value_type;
7475 if (type != MSGPACK_OBJECT_BIN ) {
7576 if constexpr (std::is_same<std::remove_cvref_t <T>, rfl::Bytestring>()) {
7677 return error (" Could not cast to bytestring." );
@@ -79,7 +80,7 @@ struct Reader {
7980 }
8081 }
8182 const auto bin = _var.via .bin ;
82- const auto data = internal::ptr_cast<const VectorType::value_type *>(bin.ptr );
83+ const auto data = internal::ptr_cast<const ValueType *>(bin.ptr );
8384 return VectorType (data, data + bin.size );
8485
8586 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ class Reader {
7878 std::is_same<std::remove_cvref_t <T>,
7979 rfl::Vectorstring>()) {
8080 using VectorType = std::remove_cvref_t <T>;
81+ using ValueType = typename VectorType::value_type;
8182 if (!_var.val_ ->is <std::vector<uint8_t >>()) {
8283 if constexpr (std::is_same<std::remove_cvref_t <T>, rfl::Bytestring>()) {
8384 return error (" Could not cast to bytestring." );
@@ -86,7 +87,7 @@ class Reader {
8687 }
8788 }
8889 const auto vec = _var.val_ ->as <std::vector<uint8_t >>();
89- const auto data = internal::ptr_cast<const VectorType::value_type *>(vec.data ());
90+ const auto data = internal::ptr_cast<const ValueType *>(vec.data ());
9091 return VectorType (data, data + vec.size ());
9192
9293 } else if constexpr (std::is_same<std::remove_cvref_t <T>, bool >()) {
You can’t perform that action at this time.
0 commit comments