$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2023-12-02 20:12:10
Hi All,
Two observations from reading the docs.
Why do I need a condition in scope_exit when I have a scope_fail?
I recommend putting warning somewhere in the docs that while using scope
guards you may inadvertently read an object after move:
std::string checked(std::string name)
{
scope::scope_exit g{[&]{
std::clog << "checked " << name <<std::endl;
}};
validate(name);
return name; // name becomes moved-from
}
Regards,
&rzej;