This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
template < typename Type> class SmartPointer{ Type* p; public: SmartPointer(Type *pointer){ p = pointer; }
Type* operator->(){ return p; } };
class MyType{ public: void foo(){ printf("I am foo\n"); } };
int main(){ MyType mt;
return 0; }
Attachment:
smart_pointer.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |