debug.hpp 251 B

1234567891011121314
  1. #ifndef DEBUG_HPP
  2. #define DEBUG_HPP
  3. #include <iostream>
  4. using namespace std;
  5. #ifdef DEBUG
  6. #define assert(cond) if(!(cond)){cout<<"Assertion failed @ "<<__FILE__<<":"<<__LINE__<<endl;exit(0);}
  7. #else
  8. #define NDEBUG
  9. #define assert(cond)
  10. #endif
  11. #endif