mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 06:31:48 +01:00
Add support for built-in __int128 when available
This commit is contained in:
committed by
Victor Zverovich
parent
16e3c48bb0
commit
6de0454b42
@@ -149,6 +149,17 @@ template <typename T> struct value_extractor {
|
||||
template <typename U> FMT_NORETURN T operator()(U) {
|
||||
throw std::runtime_error(fmt::format("invalid type {}", typeid(U).name()));
|
||||
}
|
||||
|
||||
#ifdef __apple_build_version__
|
||||
// Apple Clang does not define typeid for __int128_t and __uint128_t.
|
||||
FMT_NORETURN T operator()(__int128_t) {
|
||||
throw std::runtime_error(fmt::format("invalid type {}", "__int128_t"));
|
||||
}
|
||||
|
||||
FMT_NORETURN T operator()(__uint128_t) {
|
||||
throw std::runtime_error(fmt::format("invalid type {}", "__uint128_t"));
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
TEST(FormatTest, ArgConverter) {
|
||||
|
||||
Reference in New Issue
Block a user