#include <stdio.h>
#include <string>
#include <assert.h>
class Foo {
public:
Foo() { printf("new foo %p\n", this); }
~Foo() { printf("del foo %p\n", this); }
Foo dup() { printf("dup foo %p\n", this); return *this; }
};
static const Foo& tempPath(Foo().dup());
int main() {
printf("ptr: %p\n", &tempPath);
assert(&tempPath);
return 0;
}