Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [sas@iPhone-65 ~] cat test.cpp
- #include "test2.h"
- #include <cstdio>
- Foo f;
- Bar b;
- void doStuff() {
- printf("%s\n", __PRETTY_FUNCTION__);
- static Foo localF;
- static Bar localB;
- printf("%s\n", __PRETTY_FUNCTION__);
- }
- int main() {
- doStuff();
- }
- [sas@iPhone-65 ~] cat test2.cpp
- #include "test2.h"
- #include <cstdio>
- #define F(NAME) NAME() { printf("%p: %s\n", this, __PRETTY_FUNCTION__); }
- F(Foo::Foo)
- F(Foo::~Foo)
- F(Bar::Bar)
- F(Bar::~Bar)
- [sas@iPhone-65 ~] cat test2.h
- #ifndef test2_h_
- #define test2_h_
- class Foo {
- public:
- Foo();
- virtual ~Foo();
- };
- class Bar : public Foo {
- public:
- Bar();
- virtual ~Bar();
- };
- #endif
- [sas@iPhone-65 ~]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement