What happened to std::assert

前端 未结 2 1487
终归单人心
终归单人心 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.

    0 讨论(0)
  • 2020-12-31 05:07

    assert is a macro, thus it isn't possible to restrict it to a namespace.

    0 讨论(0)
提交回复
热议问题