You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/15 06:46:05 UTC

[GitHub] [arrow] kou commented on pull request #13874: ARROW-17408: [c++] Fixing C++20 compile warning using operator==(const T&, const T&)

kou commented on PR #13874:
URL: https://github.com/apache/arrow/pull/13874#issuecomment-1214676146

   It seems that this breaks VC++ CI: https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/44467048/job/2tamgyjibu9kuqvi
   
   ```text
   C:\projects\arrow\cpp\src\arrow/util/compare.h(55): error C2593: 'operator ==' is ambiguous
   C:\projects\arrow\cpp\src\arrow/util/compare.h(54): note: could be 'bool arrow::util::EqualityComparable<arrow::Scalar>::operator ==(const T &) const'
           with
           [
               T=arrow::Scalar
           ]
   C:\projects\arrow\cpp\src\arrow/util/compare.h(57): note: or       'bool arrow::util::operator ==(const T &,const T &)' [found using argument-dependent lookup]
           with
           [
               T=arrow::Scalar
           ]
   C:\projects\arrow\cpp\src\arrow/util/compare.h(55): note: while trying to match the argument list '(const T, const T)'
           with
           [
               T=arrow::Scalar
           ]
   C:\projects\arrow\cpp\src\arrow/util/compare.h(55): note: while compiling class template member function 'bool arrow::util::EqualityComparable<arrow::Scalar>::operator !=(const T &) const'
           with
           [
               T=arrow::Scalar
           ]
   C:\projects\arrow\cpp\src\arrow/scalar.h(53): note: see reference to class template instantiation 'arrow::util::EqualityComparable<arrow::Scalar>' being compiled
   ```
   
   Could you also add a C++20 CI job?
   
   ```diff
   diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
   index 7ecc610224..068c956dc8 100644
   --- a/dev/tasks/tasks.yml
   +++ b/dev/tasks/tasks.yml
   @@ -1211,7 +1211,7 @@ tasks:
          flags: "-e ARROW_BUILD_SHARED=OFF -e ARROW_BUILD_STATIC=ON -e ARROW_TEST_LINKAGE=static"
          image: ubuntu-cpp
    
   -{% for cpp_standard in [14, 17] %}
   +{% for cpp_standard in [14, 17, 20] %}
      test-ubuntu-20.04-cpp-{{ cpp_standard }}:
        ci: github
        template: docker-tests/github.linux.yml
   ```


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