pitrou commented on code in PR #14659:
URL: https://github.com/apache/arrow/pull/14659#discussion_r1028225075


##########
cpp/src/arrow/datum.h:
##########
@@ -86,21 +86,26 @@ struct ARROW_EXPORT Datum {
   explicit Datum(const Table& value);
 
   // Cast from subtypes of Array or Scalar to Datum
-  template <typename T, bool IsArray = std::is_base_of<Array, T>::value,
-            bool IsScalar = std::is_base_of<Scalar, T>::value,
+  template <typename T, bool IsArray = std::is_base_of_v<Array, T>,
+            bool IsScalar = std::is_base_of_v<Scalar, T>,
             typename = enable_if_t<IsArray || IsScalar>>
   Datum(std::shared_ptr<T> value)  // NOLINT implicit conversion
       : Datum(std::shared_ptr<typename std::conditional<IsArray, Array, 
Scalar>::type>(
             std::move(value))) {}
 
   // Cast from subtypes of Array or Scalar to Datum
-  template <typename T, typename TV = typename std::remove_reference<T>::type,
-            bool IsArray = std::is_base_of<Array, T>::value,
-            bool IsScalar = std::is_base_of<Scalar, T>::value,
+  template <typename T, typename TV = typename std::remove_reference_t<T>,
+            bool IsArray = std::is_base_of_v<Array, T>,
+            bool IsScalar = std::is_base_of_v<Scalar, T>,
             typename = enable_if_t<IsArray || IsScalar>>
   Datum(T&& value)  // NOLINT implicit conversion
       : Datum(std::make_shared<TV>(std::forward<T>(value))) {}
 
+  // Many Scalars are copyable, let that happen

Review Comment:
   I think the comment means that the underlying C++ value type (e.g. 
ChunkedArray) is copyable.



-- 
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]

Reply via email to