mrkn commented on a change in pull request #6302:
URL: https://github.com/apache/arrow/pull/6302#discussion_r559308985
##########
File path: cpp/src/arrow/ipc/metadata_internal.cc
##########
@@ -1349,17 +1349,23 @@ Status GetTensorMetadata(const Buffer& metadata,
std::shared_ptr<DataType>* type
return Status::IOError("Header-type of flatbuffer-encoded Message is not
Tensor.");
}
- int ndim = static_cast<int>(tensor->shape()->size());
+ const auto ndim = tensor->shape()->size();
+ using ndim_type = std::remove_const<decltype(ndim)>::type;
Review comment:
Simple `decltype(ndim)` is modified by `const` so we need to use
`std::remove_const` here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]