You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jan Wilmans edited this page Sep 12, 2017
·
3 revisions
classJan
{
std::unique_ptr<Bar> bar;
};
classFoo
{
public:Foo(Bar& bar)
: bar(bar) {}
voidPurr()
{
// use bar, but can we have a way to check that Jan didn't trash his bar?
}
private:
Bar& bar;
}
intmain()
{
Jan jan; // jan owns a bar
}