GraphLibrary  0.0.1
A simple library that implements various graph algorithms.
 All Classes Namespaces Files Functions Variables Typedefs Macros
gl_assert.hpp
Go to the documentation of this file.
1 #ifndef GL_ASSERT_HPP
2 
3 #include <stdexcept>
4 #include <string>
5 
6 #ifdef NDEBUG
7 #define GL_ASSERT(EXPR_ERROR_MSG) ((void)0)
8 #else
9 
14 #define GL_ASSERT(EXPR,ERROR_MSG) \
15 if (!(EXPR)) { \
16  std::string errorMessage (ERROR_MSG); \
17  throw std::runtime_error(errorMessage); \
18 }
19 #endif
20 
21 #endif // GL_ASSERT_HPP
22 
23