bkietz commented on a change in pull request #11013:
URL: https://github.com/apache/arrow/pull/11013#discussion_r697541321
##########
File path: cpp/src/arrow/util/utf8.cc
##########
@@ -84,11 +85,9 @@ ARROW_EXPORT void CheckUTF8Initialized() {
} // namespace internal
-static std::once_flag utf8_initialized;
+void InitializeUTF8() {}
-void InitializeUTF8() {
- std::call_once(utf8_initialized, internal::InitializeLargeTable);
-}
+ARROW_INITIALIZER({ internal::InitializeLargeTable(); });
Review comment:
I think it's possible. The most annoying part here IMO is that
`std::array` is not constexpr constructible under c++11 so we'd need to use a
raw array.
--
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]