Skip to content

Commit cee50b4

Browse files
committed
Fix linux build
1 parent bd08c9a commit cee50b4

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

include/slick/logger.hpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555

5656
#define SLICK_LOGGER_VERSION_MAJOR 1
5757
#define SLICK_LOGGER_VERSION_MINOR 0
58-
#define SLICK_LOGGER_VERSION_PATCH 4
59-
#define SLICK_LOGGER_VERSION "1.0.4"
58+
#define SLICK_LOGGER_VERSION_PATCH 5
59+
#define SLICK_LOGGER_VERSION "1.0.5"
6060

6161
#ifndef SLICK_LOGGER_MAX_ARGS
6262
#define SLICK_LOGGER_MAX_ARGS 20
@@ -1626,6 +1626,17 @@ inline void Logger::enqueue_format_args(LogEntry& entry, std::format_args fa) {
16261626
// Custom type via handle: std::format_context is not publicly
16271627
// constructible, so store a placeholder instead.
16281628
enqueue_argument(entry.args[arg_idx], std::string_view{"<handle>"});
1629+
#ifdef __SIZEOF_INT128__
1630+
} else if constexpr (std::is_same_v<DT, __int128>) {
1631+
enqueue_argument(entry.args[arg_idx], static_cast<long long>(v));
1632+
} else if constexpr (std::is_same_v<DT, unsigned __int128>) {
1633+
enqueue_argument(entry.args[arg_idx], static_cast<unsigned long long>(v));
1634+
#endif
1635+
#ifdef __SIZEOF_FLOAT128__
1636+
} else if constexpr (std::is_same_v<DT, __float128> ||
1637+
std::is_same_v<DT, _Float128>) {
1638+
enqueue_argument(entry.args[arg_idx], static_cast<double>(v));
1639+
#endif
16291640
} else {
16301641
enqueue_argument(entry.args[arg_idx], std::forward<T>(v));
16311642
}

src/logger.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,17 @@ inline void Logger::enqueue_format_args(LogEntry& entry, std::format_args fa) {
16241624
// Custom type via handle: std::format_context is not publicly
16251625
// constructible, so store a placeholder instead.
16261626
enqueue_argument(entry.args[arg_idx], std::string_view{"<handle>"});
1627+
#ifdef __SIZEOF_INT128__
1628+
} else if constexpr (std::is_same_v<DT, __int128>) {
1629+
enqueue_argument(entry.args[arg_idx], static_cast<long long>(v));
1630+
} else if constexpr (std::is_same_v<DT, unsigned __int128>) {
1631+
enqueue_argument(entry.args[arg_idx], static_cast<unsigned long long>(v));
1632+
#endif
1633+
#ifdef __SIZEOF_FLOAT128__
1634+
} else if constexpr (std::is_same_v<DT, __float128> ||
1635+
std::is_same_v<DT, _Float128>) {
1636+
enqueue_argument(entry.args[arg_idx], static_cast<double>(v));
1637+
#endif
16271638
} else {
16281639
enqueue_argument(entry.args[arg_idx], std::forward<T>(v));
16291640
}

0 commit comments

Comments
 (0)