What happened to std::assert

前端 未结 2 1499
终归单人心
终归单人心 2020-12-31 04:28

This answer and it\'s multitude of duplicates indicate that I should be using #include for the C headers that I pull from in C++ code, and that I sho

2条回答
  •  不思量自难忘°
    2020-12-31 05:05

    assert is a macro, not a function. Hence, it needs to be used with plain old assert(condition).

    Here's a supporting link: http://en.cppreference.com/w/cpp/error/assert.

提交回复
热议问题