mirror of
https://github.com/fmtlib/fmt.git
synced 2026-08-03 20:14:20 +02: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:
+2
-2
@@ -649,7 +649,7 @@ struct formatter<
|
|||||||
*out++ = ':';
|
*out++ = ':';
|
||||||
*out++ = ' ';
|
*out++ = ' ';
|
||||||
}
|
}
|
||||||
#endif
|
#endif // FMT_USE_RTTI
|
||||||
out = detail::write_bytes<char>(out, string_view(ex.what()));
|
out = detail::write_bytes<char>(out, string_view(ex.what()));
|
||||||
#if FMT_USE_RTTI
|
#if FMT_USE_RTTI
|
||||||
// If the exception carries a nested exception (e.g. via
|
// If the exception carries a nested exception (e.g. via
|
||||||
@@ -666,7 +666,7 @@ struct formatter<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif // FMT_USE_RTTI
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
+3
-3
@@ -429,7 +429,7 @@ TEST(std_test, exception) {
|
|||||||
} catch (const std::exception& ex) {
|
} catch (const std::exception& ex) {
|
||||||
EXPECT_EQ("level 1: level 2: level 3", fmt::format("{}", ex));
|
EXPECT_EQ("level 1: level 2: level 3", fmt::format("{}", ex));
|
||||||
}
|
}
|
||||||
#endif
|
#endif // FMT_USE_RTTI
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(std_test, exception_ptr) {
|
TEST(std_test, exception_ptr) {
|
||||||
@@ -462,7 +462,7 @@ TEST(std_test, exception_ptr) {
|
|||||||
p3 = std::current_exception();
|
p3 = std::current_exception();
|
||||||
}
|
}
|
||||||
EXPECT_EQ(fmt::format("{}", p3), "outer: inner");
|
EXPECT_EQ(fmt::format("{}", p3), "outer: inner");
|
||||||
#endif
|
#endif // FMT_USE_RTTI
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FMT_USE_RTTI
|
#if FMT_USE_RTTI
|
||||||
@@ -470,7 +470,7 @@ TEST(std_test, type_info) {
|
|||||||
EXPECT_EQ(fmt::format("{}", typeid(std::runtime_error)),
|
EXPECT_EQ(fmt::format("{}", typeid(std::runtime_error)),
|
||||||
"std::runtime_error");
|
"std::runtime_error");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // FMT_USE_RTTI
|
||||||
|
|
||||||
#if FMT_USE_BITINT
|
#if FMT_USE_BITINT
|
||||||
FMT_PRAGMA_CLANG(diagnostic ignored "-Wbit-int-extension")
|
FMT_PRAGMA_CLANG(diagnostic ignored "-Wbit-int-extension")
|
||||||
|
|||||||
Reference in New Issue
Block a user