Ignore:
Timestamp:
Oct 6, 2007, 1:02:08 AM (14 years ago)
Author:
Peter
Message:

reimplementing yat_assert as a throwing function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/yat_assert.h

    r921 r936  
    2424*/
    2525
    26 #include <cassert>
     26#include <string>
     27
     28namespace theplu {
     29namespace yat {
     30namespace utility {
     31
     32  template<class X> inline void yat_assert(bool assertion, std::string msg="")
    2733#ifdef YAT_DEBUG
    28 # define yat_assert(expr)   (assert(expr))
     34  { if (YAT_DEBUG && !assertion) throw X(msg); }
    2935#else
    30 # define yat_assert(expr)
     36  { }
    3137#endif
    3238
     39}}}
     40  /*
     41  */
    3342#endif
Note: See TracChangeset for help on using the changeset viewer.