libc++ 13 compatibility#32484
Conversation
c7b4711 to
12fd3b6
Compare
|
Temporarily switching the boost submodule to my fork to test if upgrading everything to boost 1.78 is the best way to go. That way I don't need to keep pushing PRs that might or might not work when they reach the CI |
6f187d4 to
6457baf
Compare
6457baf to
af4beb4
Compare
|
Seems like the pending failures are either found in master too (test_s3_zero_copy_replication) or issues when downloading docker images (#32772) so I believe it should be ready for review. I'll create PRs to the remaining submodules first. |
|
PRs with the submodule changes:
AFAICS, with that plus the changes here everything should be ready to use libc++13. |
|
Updated with master/HEAD. Changes boost to use ClickHouse-Extras after the changes were merged. Add a missing include after a recent change. Still missing: Nuraft PR and Arrow 6.0.1 branch in ClickHouse-Extras. |
|
Removing the |
|
Ok. |
| @@ -1,5 +1,22 @@ | |||
| set (CMAKE_CXX_STANDARD 17) | |||
|
|
|||
| set(ARROW_VERSION "6.0.1") | |||
There was a problem hiding this comment.
We completely don't need it as we don't install Arrow .so.
There was a problem hiding this comment.
It is needed, or something equivalent, to generate the config.h with proper values. Otherwise it will fail to compile with errors like:
/mnt/ch/ClickHouse/contrib/arrow/cpp/src/arrow/config.cc:33:5: error: indirection requires pointer operand ('int' invalid)
ARROW_VERSION,
| { | ||
| assert(which != Types::String); // See specialization for char | ||
| using ValueType = std::decay_t<T>; | ||
| ValueType * MAY_ALIAS ptr = reinterpret_cast<ValueType *>(&storage); |
There was a problem hiding this comment.
Rewrite with unalignedLoad?
There was a problem hiding this comment.
unalignedLoad returns a new object and then the compiler might decide it doesn't need to create it, and reinterpret always returns a reference to an object built on top of the existing memory. I'm not sure if they are equivalent.
src/Core/Field.h
Outdated
| template <> | ||
| inline char & Field::reinterpret<char>() | ||
| { | ||
| using ValueType = std::decay_t<char>; |
src/Core/Field.h
Outdated
| { | ||
| // For String we want to return a pointer to the data, not the start of the class | ||
| // as the layout of std::string depends on the STD version and options | ||
| ValueType * MAY_ALIAS ptr = reinterpret_cast<ValueType *>(reinterpret_cast<String *>(&storage)->data()); |
There was a problem hiding this comment.
This is unneeded, as aliasing of char is permitted by C++ standard.
| // Specialize reinterpreting to char (used in ColumnUnique) to make sure Strings are reinterpreted correctly | ||
| // inline to avoid multiple definitions | ||
| template <> | ||
| inline char & Field::reinterpret<char>() |
There was a problem hiding this comment.
Please simplify the code of this function.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
PENDING (Should mention submodule updates and versions)
Detailed description / Documentation draft:
Still missing (to be done in another PR):
References #32018