hard_asrt.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) Sergey P. Derevyago, 2008-2009.
00003  *
00004  * Permission to copy, use, modify, sell and distribute this software is granted
00005  * provided this copyright notice appears in all copies.
00006  * This software is provided "as is" without express or implied warranty, and
00007  * with no claim as to its suitability for any purpose.
00008  *
00009  */
00010 
00015 #ifndef __DERS__HARD_ASRT_HPP__
00016 #define __DERS__HARD_ASRT_HPP__
00017 
00018 #include <ders/config.hpp>
00019 
00020 namespace ders {  // ::ders
00021 
00022 namespace detail {  // ::ders::detail
00023 
00024 void hard_assert_impl(const char* expr, const char* file, int line);
00025 
00026 }  // namespace ::ders::detail
00027 
00028 }  // namespace ::ders
00029 
00033 #define hard_assert(expr) \
00034   ((expr) ? (void)0 : ders::detail::hard_assert_impl(#expr, __FILE__, __LINE__))
00035 
00036 #endif  // __DERS__HARD_ASRT_HPP__
00037 

Generated on Tue Dec 8 11:35:32 2009 for derslib by  doxygen 1.5.5