Hi Fang, ORC_UNIQUE_PTR was intended to support platforms which does not support c++11. You can also find that std::unique_ptr is translated into std::auto_ptr as well. Current and future versions of ORC will not support those obsolete platforms; therefore I think it is ok to use std::unique_ptr everywhere.
Best, Gang On Tue, Oct 30, 2018 at 5:31 PM Fang Zheng <zhengfang.x...@gmail.com> wrote: > Hi, > > I have a question about the usage of ORC_UNIQUE_PTR in C++ code: > > > The ORC_UNIQUE_PTR macro is used intensively in the public header files in > c++/include/. On the other hand, among those files in c++/src/ directory, > std::unique_ptr appears much more frequently than ORC_UNIQUE_PTR (356 vs. > 16 by grep). In fact, some function declarations in header files use > ORC_UNIQUE_PTR while the definitions in src use std::unique_ptr (please see > JIRA ORC-428 and the pull request: https://github.com/apache/orc/pull/331 > ). > > > Assuming that ORC_UNIQUE_PTR is intended to work regardless of whether > std::unique_ptr is available, I am wondering if ORC_UNIQUE_PTR should be > preferred in the entire c++ codebase. > > > Thanks, > > Fang >