Skip to content

Commit 74742e7

Browse files
committed
fix: windows compiling error
1 parent 00dac13 commit 74742e7

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/iceberg/expression/decimal.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ std::array<uint8_t, Decimal::kByteWidth> Decimal::ToBytes() const {
13731373
return out;
13741374
}
13751375

1376-
ICEBERG_EXPORT std::ostream& operator<<(std::ostream& os, const Decimal& decimal) {
1376+
std::ostream& operator<<(std::ostream& os, const Decimal& decimal) {
13771377
os << decimal.ToIntegerString();
13781378
return os;
13791379
}

src/iceberg/expression/decimal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <array>
2323
#include <cstdint>
24+
#include <iosfwd>
2425
#include <string>
2526
#include <string_view>
2627
#include <type_traits>
@@ -235,8 +236,6 @@ class ICEBERG_EXPORT Decimal {
235236
return lhs.data_ != rhs.data_;
236237
}
237238

238-
friend std::ostream& operator<<(std::ostream& os, const Decimal& decimal);
239-
240239
private:
241240
#if ICEBERG_LITTLE_ENDIAN
242241
static constexpr int32_t kHighIndex = 1;
@@ -249,6 +248,8 @@ class ICEBERG_EXPORT Decimal {
249248
std::array<uint64_t, 2> data_;
250249
};
251250

251+
ICEBERG_EXPORT std::ostream& operator<<(std::ostream& os, const Decimal& decimal);
252+
252253
// Unary operators
253254
ICEBERG_EXPORT Decimal operator-(const Decimal& operand);
254255
ICEBERG_EXPORT Decimal operator~(const Decimal& operand);

0 commit comments

Comments
 (0)