如何在xcode中启用_LIBCPP_DEBUG_LEVEL> = 2 [英] How to enable _LIBCPP_DEBUG_LEVEL>=2 in xcode

查看:112
本文介绍了如何在xcode中启用_LIBCPP_DEBUG_LEVEL> = 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读std库实现时,我可以看到很多由 #if _LIBCPP_DEBUG_LEVEL> = 2 条件启用的检查。我试图在xcode预处理器选项中添加 _LIBCPP_DEBUG_LEVEL = 3 ,但< iterator> 不再编译:

When reading the std library implementation I could see lots of checks enabled by #if _LIBCPP_DEBUG_LEVEL >= 2 conditions. I tried to add _LIBCPP_DEBUG_LEVEL = 3 in xcode preprocessor options, but <iterator> doesn't compile anymore:

#if _LIBCPP_DEBUG_LEVEL >= 2
__get_db()->__insert_i(this);   <----- the error is on this line
#endif

还有一些我想在标准库中使用更高调试级别的地方吗?

Is there something else I'm missing here to use a higher debug level for the standard library?

推荐答案

根据 libc ++文档


调试模式当前不起作用。定义_LIBCPP_DEBUG将导致相当讨厌的编译错误。

Debug mode is currently not functional. Defining _LIBCPP_DEBUG will result in fairly nasty compile errors.

因此,这可能就是原因。

So that is probably the source of that.

这篇关于如何在xcode中启用_LIBCPP_DEBUG_LEVEL&gt; = 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆