如何在Xcode 9.3中显示C ++代码文档? [英] How can I show C++ code documentation in Xcode 9.3?

查看:97
本文介绍了如何在Xcode 9.3中显示C ++代码文档?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Xcode中开发基于C ++的软件,并且希望(至少)与我为Swift或objc开发一样方便(至少)。



示例:

  std :: string myString( hello ); 
if(myString.empty()){
//做某事
}

如果我想确切地知道 .empty()的功能,我想按住Option键并单击该函数,并获得包含来自例如以下信息的文档覆盖

解决方案

您不能。根据 Apple的Xcode发行说明,,自Xcode 8.3起


第三方文档集支持已弃用,不再是$ b Xcode的未来版本中支持$ b。 (30584489)


还有其他文档浏览器,例如 Dash 允许您安装自己的文档。但这并不能满足您的期望。



我已经验证了将C ++。docset添加到〜/ Library / Developer / Shared / Documentation 不起作用。 (可能是早期Xcode留下的目录)实际上,完全删除此目录不会影响Xcode 9.x正确显示默认文档。


I´m developing software based on C++ in Xcode and want to have (at least) the same convenience for code documentation as if I was developing for Swift or objc.

Example:

std::string myString("hello");
if (myString.empty()) {
    // do something
}

If I want to know exactly what .empty() does, I would like to Option-Click on the function and get the documentation overlay with information from e.g. http://en.cppreference.com/w/cpp/string/basic_string/empty, exactly as it does for objc and Swift.

How is this possible?

Current output just looks like this:

解决方案

You cannot. According to Apple's Xcode release notes, as of Xcode 8.3

3rd party docset support is now deprecated and will no longer be supported in a future release of Xcode. (30584489)

There are alternate doc browsers, like Dash which allow you to install your own documentation. But this does not give you what you're hoping for.

I have verified that adding a C++.docset into ~/Library/Developer/Shared/Documentation does not work. (likely a directory left over from an earlier Xcode) In fact, removing this directory entirely does not affect Xcode 9.x from correctly displaying the default documentation.

这篇关于如何在Xcode 9.3中显示C ++代码文档?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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