在阅读 std 库实现时,我可以看到 #if _LIBCPP_DEBUG_LEVEL >= 2
启用了很多检查状况。我尝试添加 _LIBCPP_DEBUG_LEVEL = 3
在 xcode 预处理器选项中,但是 <iterator>
不再编译:
#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_i(this); <----- the error is on this line
#endif
我还缺少其他东西来为标准库使用更高的调试级别吗?
最佳答案
Debug mode is currently not functional. Defining _LIBCPP_DEBUG will result in fairly nasty compile errors.
所以这可能就是它的来源。
关于c++ - 如何在 xcode 中启用 _LIBCPP_DEBUG_LEVEL>=2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28544943/