DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Assert.h
1 
17 #pragma once
18 
31 #if defined(Assert_RECURSES)
32 #error Recursive header files inclusion detected in Assert.h
33 #else // defined(Assert_RECURSES)
34 
35 #define Assert_RECURSES
36 
37 #if !defined Assert_h
38 
39 #define Assert_h
40 
42 // Inclusions
43 #include <iostream>
44 
45 #include <boost/assert.hpp>
47 
48 namespace DGtal
49 {
50 
56 #define ASSERT(expr) BOOST_ASSERT(expr)
57 
58 #define ASSERT2(expr,str) trace.error()<<str<<std::endl; BOOST_ASSERT(expr)
59 
60 #if defined(CHECK_ALL_PRE)
61 #define ASSERT_ALL_PRE(expr) BOOST_ASSERT(expr)
62 #else // defined(CHECK_ALL_PRE)
63 #define ASSERT_ALL_PRE(expr)
64 #endif
65 
66 } // namespace DGtal
67 
68 
69 // //
71 
72 #endif // !defined Assert_h
73 
74 #undef Assert_RECURSES
75 #endif // else defined(Assert_RECURSES)