js8544 commented on code in PR #33608:
URL: https://github.com/apache/arrow/pull/33608#discussion_r1068845438
##########
cpp/src/arrow/visit_type_inline.h:
##########
@@ -71,31 +77,33 @@ inline Status VisitTypeInline(const DataType& type,
VISITOR* visitor) {
///
/// The intent is for this to be called on a generic lambda
/// that may internally use `if constexpr` or similar constructs.
-template <typename VISITOR>
-inline auto VisitType(const DataType& type, VISITOR&& visitor)
- -> decltype(std::forward<VISITOR>(visitor)(type)) {
+template <typename VISITOR, typename... ARGS>
+inline auto VisitType(const DataType& type, VISITOR&& visitor, ARGS&&... args)
+ -> decltype(std::forward<VISITOR>(visitor)(type, args...)) {
switch (type.id()) {
ARROW_GENERATE_FOR_ALL_TYPES(TYPE_VISIT_INLINE);
default:
break;
}
- return std::forward<VISITOR>(visitor)(type);
+ return std::forward<VISITOR>(visitor)(type, args...);
Review Comment:
done
--
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]