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
class Jan
{
std::unique_ptr<Bar> bar;
};
class Foo
{
public:
Foo(Bar& bar)
: bar(bar) {}
void Purr()
{
// use bar, but can we have a way to check that Jan didn't trash his bar?
}
private:
Bar& bar;
}
int main()
{
Jan jan; // jan owns a bar
}