Hey all,
I am tracking down what might be a memory leak by globally overloading operator new etc... the code to do so compiles fine under VC++, but throws problems in GCC:
15: namespace std { class bad_alloc; };
16:
17: void * operator new( size_t size ) throw ( std::bad_alloc );
18: void operator delete( void * p ) throw ();
19: void * operator new[]( size_t size ) throw ( std::bad_alloc );
20: void operator delete[]( void * p ) throw ();
The errors that are thrown are:
../zylibcpp/../zylibcpp/utility/MemoryTracker.hpp:17: error: invalid use of incomplete type ‘struct std::bad_alloc’
../zylibcpp/../zylibcpp/utility/MemoryTracker.hpp:15: error: forward declaration of ‘struct std::bad_alloc’
../zylibcpp/../zylibcpp/utility/MemoryTracker.hpp:19: error: invalid use of incomplete type ‘struct std::bad_alloc’
../zylibcpp/../zylibcpp/utility/MemoryTracker.hpp:15: error: forward declaration of ‘struct std::bad_alloc’
What is going on here ?