debug_8hpp_source.tex 1.0 KB

1234567891011121314151617181920
  1. \hypertarget{debug_8hpp_source}{}\doxysection{debug.\+hpp}
  2. \label{debug_8hpp_source}\index{src/debug.hpp@{src/debug.hpp}}
  3. \mbox{\hyperlink{debug_8hpp}{Go to the documentation of this file.}}
  4. \begin{DoxyCode}{0}
  5. \DoxyCodeLine{1 \textcolor{preprocessor}{\#ifndef DEBUG\_HPP}}
  6. \DoxyCodeLine{2 \textcolor{preprocessor}{\#define DEBUG\_HPP}}
  7. \DoxyCodeLine{3 }
  8. \DoxyCodeLine{4 \textcolor{preprocessor}{\#include <iostream>}}
  9. \DoxyCodeLine{5 \textcolor{keyword}{using namespace }std;}
  10. \DoxyCodeLine{6 }
  11. \DoxyCodeLine{7 \textcolor{preprocessor}{\#ifdef DEBUG}}
  12. \DoxyCodeLine{8 \textcolor{preprocessor}{\#define assert(cond) if(!(cond))\{cout<<"{}Assertion failed @ "{}}<<\_\_FILE\_\_<<"{}:"{}<<\_\_LINE\_\_<<endl;exit(0);\}}
  13. \DoxyCodeLine{9 \textcolor{preprocessor}{\#else}}
  14. \DoxyCodeLine{10 \textcolor{preprocessor}{\#define NDEBUG}}
  15. \DoxyCodeLine{11 \textcolor{preprocessor}{\#define assert(cond)}}
  16. \DoxyCodeLine{12 \textcolor{preprocessor}{\#endif}}
  17. \DoxyCodeLine{13 }
  18. \DoxyCodeLine{14 \textcolor{preprocessor}{\#endif}}
  19. \end{DoxyCode}