#ifndef REVIVER_ASSERT_HPP #define REVIVER_ASSERT_HPP #include bool MyAssertFunction( bool b, char* desc, int line, char* file){ if (b) return true; std::cerr << "\n\nAssertion Failure\n"; std::cerr << "Description : " << desc << std::endl; std::cerr << "Filename : " << file << std::endl; std::cerr << "Line No : " << line << std::endl; exit(1); }; #if defined( _DEBUG ) #define Assert( exp, description ) MyAssertFunction( (int)(exp), description, __LINE__, __FILE__ ) #else #define Assert( exp, description ) #endif #endif