diff --git a/format_test.cc b/format_test.cc index 0a8a20aa..e569fe4e 100644 --- a/format_test.cc +++ b/format_test.cc @@ -584,8 +584,10 @@ TEST(ActiveFormatterTest, ArgLifetime) { // of the API and shouldn't be used in real applications. const fmt::ActiveFormatter &af = fmt::Format("{0}"); const_cast&>(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)); }