Skip to content

Commit 5a9d91a

Browse files
rohanjain101Rohan Jain
andauthored
fix: move int128_t and uint128_t aliases into the iceberg namespace (#972)
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. Co-authored-by: Rohan Jain <rohanjain@microsoft.com>
1 parent 70b2b6a commit 5a9d91a

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎src/iceberg/util/int128.h‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@
2424

2525
#if defined(_MSC_VER)
2626
# include <__msvc_int128.hpp>
27+
#elif !defined(__GNUC__) && !defined(__clang__)
28+
# error "128-bit integer type is not supported on this platform"
29+
#endif
30+
31+
namespace iceberg {
32+
33+
#if defined(_MSC_VER)
2734
using int128_t = std::_Signed128;
2835
using uint128_t = std::_Unsigned128;
29-
#elif defined(__GNUC__) || defined(__clang__)
36+
#else
3037
using int128_t = __int128;
3138
using uint128_t = unsigned __int128;
32-
#else
33-
# error "128-bit integer type is not supported on this platform"
3439
#endif
40+
41+
} // namespace iceberg

0 commit comments

Comments
 (0)