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

   It seems that `[[maybe_unused]]` in constructor arguments is only 
unsupported:
   
   ```console
   $ docker run -it --rm almalinux:8
   $ dnf install -y gcc-c++ vim
   $ vim a.cc
   $ cat a.cc
   class A {
     explicit A([[maybe_unused]] int x) {}
     void a([[maybe_unused]] int x) {}
   };
   int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) {
     return 0;
   }
   $ LANG=C g++ -std=c++17 a.cc
   a.cc:2:14: error: expected unqualified-id before '[' token
      explicit A([[maybe_unused]] int x) {}
                 ^
   a.cc:2:14: error: expected ')' before '[' token
      explicit A([[maybe_unused]] int x) {}
                ~^
                 )
   ```
   


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