bkietz commented on code in PR #404:
URL: https://github.com/apache/arrow-nanoarrow/pull/404#discussion_r1576575782
##########
src/nanoarrow/nanoarrow.hpp:
##########
@@ -222,6 +221,9 @@ class Unique {
T* operator->() noexcept { return &data_; }
const T* operator->() const noexcept { return &data_; }
+ /// \brief Check for validity
+ explicit operator bool() const { return data_.release != nullptr; }
Review Comment:
Fair enough; I'll remove this. Unless there are validity conditions for all
the other objects wrapped by Unique which I could specialize this for? For
example, in the case of `nanoarrow::UniqueBuffer` I could check whether
`buffer->data` is null
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]