// -*- C++ -*- #ifndef _LASSERT_H_ #define _LASSERT_H_ //namespace LyX { #define HAVE_TEMPLATE #ifdef HAVE_TEMPLATE //template inline void Assert(A assertion) template inline void Assert(A assertion) { //if (!assertion) throw X(); if (!assertion) { abort(); } } #ifdef HAVE_PARTIAL_SPECIALIZATION // Not too sure if this is the correct way to specialize template inline void Assert(A * ptr) { if (!ptr) { abort(); } } #endif //template inline void Assert(A assertion, E except) //{ // if (!assertion) except; //} #else inline void lyx_assert(...) { // nothing } #endif #endif //} // end of namespace LyX