Fix compilation errors on gcc 4.4
This commit is contained in:
+6
-5
@@ -397,13 +397,14 @@ TEST(FixedBufferTest, BufferOverflow) {
|
||||
EXPECT_THROW_MSG(buffer.resize(11), std::runtime_error, "buffer overflow");
|
||||
}
|
||||
|
||||
struct uint32_pair {
|
||||
uint32_t u[2];
|
||||
};
|
||||
|
||||
TEST(UtilTest, BitCast) {
|
||||
struct S {
|
||||
uint32_t u[2];
|
||||
};
|
||||
auto s = fmt::internal::bit_cast<S>(uint64_t(42));
|
||||
auto s = fmt::internal::bit_cast<uint32_pair>(uint64_t{42});
|
||||
EXPECT_EQ(fmt::internal::bit_cast<uint64_t>(s), 42u);
|
||||
s = fmt::internal::bit_cast<S>(uint64_t(~0ull));
|
||||
s = fmt::internal::bit_cast<uint32_pair>(uint64_t(~0ull));
|
||||
EXPECT_EQ(fmt::internal::bit_cast<uint64_t>(s), ~0ull);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user