C ++源文件包含“唯一映射”? [英] C++ Source File Inclusion "Unique Mappings"?

查看:123
本文介绍了C ++源文件包含“唯一映射”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++ 11标准16.2.5中:

In the C++11 standard 16.2.5:


实现应为由一个或多个非数字组成的序列提供唯一映射或
数字(2.11),后跟一个句点(。)和单个非数字。第一个字符不能是数字。
实现可以忽略字母大小写的区别。

The implementation shall provide unique mappings for sequences consisting of one or more nondigits or digits (2.11) followed by a period (.) and a single nondigit. The first character shall not be a digit. The implementation may ignore distinctions of alphabetical case.

我不明白这一点的语境或意义吗?

I don't understand the context or meaning of this at all?

提供唯一映射是什么意思?映射从什么到什么?和独特而不是什么?

What does it mean "provide unique mappings"? Mappings from what to what? And unique as opposed to what? And sequences of what?

它似乎是周围段落的完全不连续。

It seems to be a total non-sequitor from surrounding paragraphs.

推荐答案

在典型情况下,在 #include 指令中指定的是文件名。这就是说,它不必是一个文件名。 从什么是字符序列( h-char-序列 q-char-序列)指令。这可以映射到同类数据的一些(或多或少的任意)源 - 例如,如果实现想要将头部存储在某种数据库中,则它可以将它们映射到数据库中的记录。

In a typical case, what you specify in an #include directive will be a file name. What this is saying is that it doesn't have to be a file name. The "from what" is the sequence of characters (h-char-sequence or q-char-sequence) in the directive. This can map to some (more or less arbitrary) source of the same kind of data -- for example, if an implementation wanted to store headers in some sort of database, it might map them to records in the database.

对于到什么部分,它是故意模糊的 - 一个典型的实现使用文件名,但它可以是几乎任何其他,只要包括一个头产生正确类型的结果 - 上面提到的数据库记录将是一种可能性,但它的目的是允许类似预编译头,或者甚至建立标准头的知识到编译器本身,因此包括一个标准头可能不做什么多于在编译器中设置一个标志,以告知它知道该头的内容。

As far as the "to what" part, it's deliberately vague -- a typical implementation uses file names, but it could be almost anything else, as long as including a header produces the correct type of results -- the database record mentioned above would be one possibility, but it's intended to allow things like pre-compiled headers, or even building "knowledge" of the standard headers into the compiler itself, so including a standard header might do nothing more than set a flag in the compiler to tell it be aware of the contents of that header.

这篇关于C ++源文件包含“唯一映射”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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