arrow
a2f19888 - GH-45099: [C++] Avoid static const variable in the status.h (#45100)

Commit
149 days ago
GH-45099: [C++] Avoid static const variable in the status.h (#45100) ### Rationale for this change The `Status::message` function below has defined a static const string in the header file which may cause troubles in different translation units. ``` const std::string& message() const { static const std::string no_message = ""; return ok() ? no_message : state_->msg; } ``` ### What changes are included in this PR? Move the definition of `Status::message` function into the source file. ### Are these changes tested? Pass CIs. ### Are there any user-facing changes? No. * GitHub Issue: #45099 Authored-by: Gang Wu <ustcwg@gmail.com> Signed-off-by: Gang Wu <ustcwg@gmail.com>
Author
Parents
  • cpp/src/arrow
    • File
      status.cc
    • File
      status.h