On 11/26/12, Sam Bobroff <sbobr...@shoretel.com> wrote: > Your suggestion of changing the comma operator to "&&" seems like a good > solution to me too but personally, as I sort of explained before, I > would use a more direct approach: assert() takes one argument and I want > it to take two, so I'd write my own function. Something like this: > > #define ASSERT(SCALAR,MSG) assert2(__FILE__, __LINE__, #SCALAR, > (SCALAR), (MSG)) > > void assert2(const char *file, int line, const char *expr_string, int > expr_val, const char *msg) {
So wait, you just want something like the BOOST_ASSERT_MSG macro, except with an implementation that works in C as well as C++? See http://www.boost.org/doc/libs/1_52_0/libs/utility/assert.html . Ambrus _______________________________________________ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev