I think there are three options: 1. Add it in with the existing type_traits code. 2. Make the definition only in the code you are working on (I'm not sure if this would be generatelly applicable?) 3. Don't use enable_if_* traits but instead use your own enable_if and have an "OR" expression using the underlying type_check checks (e.g. is_numeric_type) [1]
[1] https://github.com/apache/arrow/blob/8e43f23dcc6a9e630516228f110c48b64d13cec6/cpp/src/arrow/type_traits.h#L491 On Sun, Apr 11, 2021 at 8:56 PM Ying Zhou <yzhou7...@gmail.com> wrote: > Hi, > > I would like to have a variant of arrow::enable_if_number<DataType> good > for numerical types, boolean as well as Date32 but not any other type so > that I don’t have to repeat template specializations with essentially the > same code. What’s the canonical way to achieve that? > > Ying