Skip to content

Commit db99103

Browse files
author
Rohan Jain
committed
fix: move int128_t and uint128_t aliases into the iceberg namespace
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.
1 parent 3c5715c commit db99103

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)