fix: move int128_t and uint128_t aliases into the iceberg namespace - #972
Open
rohanjain101 wants to merge 1 commit into
Open
rohanjain101 wants to merge 1 commit into
rohanjain101 wants to merge 1 commit into
Conversation
The aliases were declared at global scope in the public header iceberg/util/int128.h. Any consumer that includes an iceberg header then gets global int128_t and uint128_t names, which conflict with other libraries or application code that define the same names. All uses in the project are already inside namespace iceberg, so this change is source compatible within the project.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move the
int128_t/uint128_taliases in the public headericeberg/util/int128.hfrom the global namespaceinto
namespace iceberg.Why
int128.his installed and reached transitively from public headers such asiceberg/util/decimal.handiceberg/expression/literal.h. Because the aliases are global, any consumer that includes an iceberg header getsglobal
int128_tanduint128_tnames. Those conflict with other libraries or application code that declare thesame names with a different underlying type (for example, a project that defines its own
int128_ton MSVC).Compatibility
Every use in the project is already inside
namespace iceberg, and nothing refers to::int128_t, so this is sourcecompatible within the project. External code that relied on the global names would need
iceberg::int128_t.The platform check is unchanged: MSVC still includes
<__msvc_int128.hpp>and other compilers must be GCC or Clang.