You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/09 22:59:14 UTC

[GitHub] [arrow] jyknight opened a new issue, #15281: basic_string_view will be invalid in future libc++

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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] raulcd commented on issue #15281: [C++] basic_string_view will be invalid in future libc++

Posted by "raulcd (via GitHub)" <gi...@apache.org>.
raulcd commented on issue #15281:
URL: https://github.com/apache/arrow/issues/15281#issuecomment-1630867652

   @pitrou this has been tagged as 13.0.0, were you expecting this to be added to the release?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] westonpace commented on issue #15281: basic_string_view will be invalid in future libc++

Posted by "westonpace (via GitHub)" <gi...@apache.org>.
westonpace commented on issue #15281:
URL: https://github.com/apache/arrow/issues/15281#issuecomment-1399101379

   Normally I think we'd want to setup a CI to regress this sort of thing.  However, clang-18 is not yet released.  Do you have any suggestion on how this could be regressed?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on issue #15281: [C++] basic_string_view will be invalid in future libc++

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #15281:
URL: https://github.com/apache/arrow/issues/15281#issuecomment-1630868667

   No, sorry. You can untag it.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou closed issue #15281: [C++] basic_string_view will be invalid in future libc++

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #15281: [C++] basic_string_view<long> will be invalid in future libc++
URL: https://github.com/apache/arrow/issues/15281


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] bkietz commented on issue #15281: [C++] basic_string_view will be invalid in future libc++

Posted by "bkietz (via GitHub)" <gi...@apache.org>.
bkietz commented on issue #15281:
URL: https://github.com/apache/arrow/issues/15281#issuecomment-1610071473

   Span is relatively straightforward, I'll write a basic impl and refactor Bitmap.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org