mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-04 17:26:42 +00:00
Correct a comment.
This commit is contained in:
parent
7c697bfcac
commit
cd8fbb0871
@ -584,8 +584,10 @@ TEST(ActiveFormatterTest, ArgLifetime) {
|
|||||||
// of the API and shouldn't be used in real applications.
|
// of the API and shouldn't be used in real applications.
|
||||||
const fmt::ActiveFormatter<fmt::Ignore> &af = fmt::Format("{0}");
|
const fmt::ActiveFormatter<fmt::Ignore> &af = fmt::Format("{0}");
|
||||||
const_cast<fmt::ActiveFormatter<fmt::Ignore>&>(af) << std::string("test");
|
const_cast<fmt::ActiveFormatter<fmt::Ignore>&>(af) << std::string("test");
|
||||||
// String object passed as an argument to Print has been destroyed,
|
// String object passed as an argument to ActiveFormatter has
|
||||||
// but ArgInserter dtor hasn't been called yet.
|
// 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));
|
EXPECT_EQ("test", str(af));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user