微软 C++语言参考

发布于 2024-08-28 13:53:30 字数 262 浏览 13 评论 0原文

每当提出任何问题并且需要参考文本时,我都不会看到 MSDN C++ 语言参考 被引用。

我浏览了一下,个人觉得写得非常好。

它没有像标准一样经常使用是否有某些具体原因?

是因为它包含了一些VC++特有的功能吗?

Whenever any question is asked, and a reference text is needed, I never see MSDN C++ Language Reference being referred.

I was browsing through it and I personally feel that it is extremely well written.

Is there some specific reason it is not used as often as a standard?

Is it because it contains some VC++ specific features?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

情愿 2024-09-04 13:53:30

我相信这是因为我们这些引用参考文献的人引用的是实际标准本身。

I believe it's because those of us referencing a reference reference the actual standard itself.

大姐,你呐 2024-09-04 13:53:30

答案相当简单:MSDN 参考资料并不具有权威性。它告诉您 Microsoft 编译器的行为方式,是的,它通常恰好与标准所说的一致。但当有人问 C++ 语言如何处理某些情况时,只有一个文本具有权威:ISO 标准。

因此,在回答有关 C++ 的问题时,人们倾向于参考该标准。
如果您具体询问 MSVC 如何实现它,那么 MSDN 将是一个完全有效的来源。但大多数问题都只是关于 C++。

或者换句话说:如果 MSDN 包含拼写错误,那么 MSDN 就是错误的。如果 ISO 标准包含拼写错误,那么语言就是这样定义的。

The answer is fairly simple: The MSDN reference is not authoritative. It tells you how Microsoft's compiler behaves, and yes, it usually happens to coincide with what the standard says. But when someone asks how the C++ language deals with some situation, only one text has any authority: the ISO standard.

So when answering questions about C++, people tend to reference the standard.
If you ask specifically about how MSVC implements it, then MSDN would be a perfectly valid source. But most questions are simply about C++.

Or to put it another way: if MSDN contains a typo, then MSDN is wrong. If the ISO standard contains a typo, then that's how the language is defined.

孤独患者 2024-09-04 13:53:30

MS 非常擅长明确文档的哪些部分是 MS 特定的,因此我同意 MS 参考资料非常好(特别是如果您对 MS 扩展感兴趣的话)。

如果我正在寻找有关“什么是标准”的信息,我通常会参考标准文档,因为:

  1. 我有它们(请参阅 我在哪里可以找到当前的 C 或 C++ 标准文档? 获取如何获取您的文档的链接)
  2. 它们是 PDF,我比基于网络或基于 Windows 帮助的 MSDN 文档更容易搜索和阅读,
  3. 它们是权威的(就回答有关标准的问题而言)

最大的缺点是我没有 C90 标准的电子版本,然而..

MS has been pretty good about making clear which parts of the document are MS specific or not, so I agree that the MS references are pretty good (particularly if you're interested in MS extensions).

I generally refer to the standards docs if I'm looking for information about "what's standard" because:

  1. I have them (see Where do I find the current C or C++ standard documents? for links to how to get yours)
  2. they're PDFs which I find easier to search and read than the web-based or Windows Help-based MSDN docs
  3. they're definitive (as far as answering questions about the standard)

The biggest drawback is that I don't have an electronic version of the C90 standard, yet..

千年*琉璃梦 2024-09-04 13:53:30

是因为它包含了一些VC++特有的功能吗?

我认为这是基本原因。例如,它通常包含有关 C++/CLI 的信息,而不仅仅是C++。

我认为 VC++ 2010 参考在区分哪一部分属于 C++ 本身以及哪一部分属于 C++/CLI 方面非常小心。但要参考标准,当然最好参考标准本身。 VC++ 文档也经常引用该标准。

Is it because it contains some VC++ specific features?

I think that's the basic reason. For example, it often contains info on C++/CLI, not just C++.

VC++ 2010 reference, I think, is careful in distinguishing which part is in the C++ proper and which part is in the C++/CLI. But to refer to the standard, of course it's better to refer to the standard itself. VC++ documentation refers to the standard quite often, too.

耳根太软 2024-09-04 13:53:30

一个有趣的例子:看看所有这些 __XXX 关键字!! (C++标准没有)

One interesting example: just look at all those __XXX keywords!! (The C++ standard has none)

厌味 2024-09-04 13:53:30

C++ 标准定义了 C++ 语言的工作方式,Microsoft C++ 语言参考定义了 Microsoft 对该语言的实现方式的工作方式。

因此,如果您想知道独立于编译器可以保证哪些行为,该标准就是您的指南。一些细节和某些极端情况留待实现定义,每个实现都可以定义语言的扩展,因此如果您想使用这些 MSCV 特定属性,Microsoft 的语言参考应该解释它们。

大多数关于 C++ 的问题都没有明确要求 MSVC 特定的答案,而这对于其他编译器来说可能不正确。因此,参考标准给出了一个通用的、独立于编译器的答案,而 MS 语言参考对于除 MSVC 之外的任何其他内容都没有多大影响。

The C++ Standard defines how the C++ language works, the Microsoft C++ Language Reference defines how Microsoft's implementation of that language works.

So if you want to know what behavior is guaranteed independent of the compiler, The Standard is your guide. Some details and certain corner cases are left to be implementation-defined there and every implementation can define extensions to the language, so if you want to use those MSCV specific properties Microsoft's Language Reference should explain them.

Most SO questions on C++ on don't explicitly ask for a MSVC specific answer that might not be true for other compilers. So referring to The Standard gives an general, compiler independent answer, while the MS Language Reference wouldn't hold much weight for anything else than MSVC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文