Correct a comment.

This commit is contained in:
Victor Zverovich 2012-12-11 16:30:37 -08:00
parent 7c697bfcac
commit cd8fbb0871

View File

@ -584,8 +584,10 @@ TEST(ActiveFormatterTest, ArgLifetime) {
// of the API and shouldn't be used in real applications.
const fmt::ActiveFormatter<fmt::Ignore> &af = fmt::Format("{0}");
const_cast<fmt::ActiveFormatter<fmt::Ignore>&>(af) << std::string("test");
// String object passed as an argument to Print has been destroyed,
// but ArgInserter dtor hasn't been called yet.
// String object passed as an argument to ActiveFormatter has
// been destroyed, but ArgInserter dtor hasn't been called yet.
// But that's OK since the Arg's dtor takes care of this and
// calls Format.
EXPECT_EQ("test", str(af));
}