From fa9972b9d532a2920fcadf9b13f30e10659334bd Mon Sep 17 00:00:00 2001 From: chatlanin Date: Thu, 12 May 2022 11:32:39 +0300 Subject: [PATCH] add important note --- bin/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/main.cpp b/bin/main.cpp index 3a1c5fe..b9aaa05 100644 --- a/bin/main.cpp +++ b/bin/main.cpp @@ -43,7 +43,8 @@ int main(int argc, char *argv[]) {// ex: string::split_str std::string str { "asdf,qwer,zxcv" }; hack::string::v_str v = hack::string::split_str(str, ','); - for (const auto& c : v) hack::log()(c); + hack::log log; + for (const auto& c : v) log(c); } {// ex: renge::within @@ -53,6 +54,7 @@ int main(int argc, char *argv[]) {// ex: container::vector_multiset std::vector v; hack::container::vector_multiset(v, "asdf", "qwer", "zcv"); + // of course you understand that a new logger object is created here every time !!! for(const auto& c : v) hack::log()(c); }