pitrou commented on PR #45998:
URL: https://github.com/apache/arrow/pull/45998#issuecomment-2890868302

   > * The MSVC compiler is complaining about a forward-declared friend 
function I'm using in `hdfs.cc`. Do you have any advice on how to better 
organise this?
   
   Hmm, rather than trying to find the exact explanation, a simple solution 
would be to change these functions into static methods, for example this:
   ```c++
   ARROW_EXPORT Status MakeReadableFile(const std::string& path, int32_t 
buffer_size,
     const io::IOContext& io_context, LibHdfsShim* driver,
     hdfsFS fs, hdfsFile file,
     std::shared_ptr<HdfsReadableFile>* out);
   ```
   
   would become:
   ```c++
   class ARROW_EXPORT HdfsReadableFile : public RandomAccessFile {
    public:
      (...)
   
     static Result<std::shared_ptr<HdfsReadableFile>> Make(
         const std::string& path, int32_t buffer_size,
         const io::IOContext& io_context, LibHdfsShim* driver,
         hdfsFS fs, hdfsFile file);
   ```
   


-- 
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-unsubscr...@arrow.apache.org

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

Reply via email to