jyknight opened a new issue, #15281:
URL: https://github.com/apache/arrow/issues/15281

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   Libc++ has made a change to stop supporting std::char_traits (and thus, 
also, basic_string and basic_string_view) for non-character types: 
https://discourse.llvm.org/t/deprecating-std-string-t-for-non-character-t/66779
   
   Apparently, such support was never required by the standard, and is 
considered a mistake.
   
   The initial libc++ change made this a hard error, but after reports of 
breakage, it was downgraded to a deprecation warning. See review thread 
https://reviews.llvm.org/D138307. It is now expected to become a hard error 
again in LLVM 18.
   
   One of the projects broken is Apache Arrow, due to the usage here:
   
https://github.com/apache/arrow/blob/53752adc6b81166cd4ee7db5a819494042f29197/cpp/src/arrow/util/bitmap.h#L52
   
   E.g., 
   ```
   /usr/include/c++/v1/string_view:279:45: error: implicit instantiation of 
undefined template 'std::char_traits<unsigned long>'
       static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                               ^
   arrow/util/bitmap.h:153:16: note: in instantiation of template class 
'std::basic_string_view<unsigned long>' requested here
       View<Word> words[N];
                  ^
   arrow/compute/kernels/scalar_if_else.cc:1595:15: note: in instantiation of 
function template specialization 'arrow::internal::Bitmap::VisitWords<3UL, 
(lambda at arrow/compute/kernels/scalar_if_else.cc:1595:35), unsigned long>' 
requested here
         Bitmap::VisitWords(bitmaps, [&](std::array<uint64_t, 3> words) {
                 ^
   arrow/compute/kernels/scalar_if_else.cc:1652:14: note: in instantiation of 
function template specialization 'arrow::compute::internal::(anonymous 
namespace)::ExecArrayCaseWhen<arrow::BooleanType>' requested here
         return ExecArrayCaseWhen<Type>(ctx, batch, out);
                ^
   arrow/compute/kernels/codegen_internal.h:1173:47: note: in instantiation of 
member function 'arrow::compute::internal::(anonymous 
namespace)::CaseWhenFunctor<arrow::BooleanType>::Exec' requested here
         return Generator<BooleanType, Args...>::Exec;
                                                 ^
   arrow/compute/kernels/scalar_if_else.cc:2738:17: note: in instantiation of 
function template specialization 
'arrow::compute::internal::GenerateTypeAgnosticPrimitive<arrow::compute::internal::(anonymous
 namespace)::CaseWhenFunctor>' requested here
       auto exec = GenerateTypeAgnosticPrimitive<CaseWhenFunctor>(*type);
   ```
   
   I suspect "View" needs to be changed to use some other type than 
std::basic_string_view (could be std::span if you required c++20, but you 
probably don't want to require c++20 yet.)
   
   ### Component(s)
   
   C++


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