mirror of
https://github.com/fmtlib/fmt.git
synced 2026-07-30 16:26:27 +08:00
Annotate FMT_USE_RTTI #endif directives
Add trailing "// FMT_USE_RTTI" comments to the matching #endif lines to make the conditional-compilation blocks easier to follow.
This commit is contained in:
parent
7852fc384c
commit
b5d1e5404b
@ -649,7 +649,7 @@ struct formatter<
|
||||
*out++ = ':';
|
||||
*out++ = ' ';
|
||||
}
|
||||
#endif
|
||||
#endif // FMT_USE_RTTI
|
||||
out = detail::write_bytes<char>(out, string_view(ex.what()));
|
||||
#if FMT_USE_RTTI
|
||||
// If the exception carries a nested exception (e.g. via
|
||||
@ -666,7 +666,7 @@ struct formatter<
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // FMT_USE_RTTI
|
||||
return out;
|
||||
}
|
||||
};
|
||||
|
||||
@ -429,7 +429,7 @@ TEST(std_test, exception) {
|
||||
} catch (const std::exception& ex) {
|
||||
EXPECT_EQ("level 1: level 2: level 3", fmt::format("{}", ex));
|
||||
}
|
||||
#endif
|
||||
#endif // FMT_USE_RTTI
|
||||
}
|
||||
|
||||
TEST(std_test, exception_ptr) {
|
||||
@ -462,7 +462,7 @@ TEST(std_test, exception_ptr) {
|
||||
p3 = std::current_exception();
|
||||
}
|
||||
EXPECT_EQ(fmt::format("{}", p3), "outer: inner");
|
||||
#endif
|
||||
#endif // FMT_USE_RTTI
|
||||
}
|
||||
|
||||
#if FMT_USE_RTTI
|
||||
@ -470,7 +470,7 @@ TEST(std_test, type_info) {
|
||||
EXPECT_EQ(fmt::format("{}", typeid(std::runtime_error)),
|
||||
"std::runtime_error");
|
||||
}
|
||||
#endif
|
||||
#endif // FMT_USE_RTTI
|
||||
|
||||
#if FMT_USE_BITINT
|
||||
FMT_PRAGMA_CLANG(diagnostic ignored "-Wbit-int-extension")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user