assert() with message

前端 未结 7 710
醉梦人生
醉梦人生 2020-12-24 01:08

I saw somewhere assert used with a message in the following way:

assert((\"message\", condition));

This seems to work great, except that gc

7条回答
  •  伪装坚强ぢ
    2020-12-24 01:41

    According to following link http://www.cplusplus.com/reference/clibrary/cassert/assert/

    assert is expecting only expression. May be you are using some overloaded function.

    According to this, only expression is allowed and thus you are getting this warning.

提交回复
热议问题