什么是“cv不合格”是什么意思在C ++? [英] What does "cv-unqualified" mean in C++?
问题描述
从主题。我在最近问的一个问题中看到了这个术语,显然这是一个很好的术语,但是我在stackoverflow上找不到任何东西。
有基本类型和复合类型。基本类型是算术类型, void
和 std :: nullptr_t
。复合类型是数组,函数,指针,引用,类,联合,枚举和指向非静态成员的指针。
A cv-unqualified 对于任何cv非限定类型,有三种对应的 cv限定类型:
- const限定 - 与
const
cv-qualifier -
- 使用
volatile
cv-qualifier
const
和 volatile
cv-qualifiers li> 请注意,应用于数组类型的cv-qualifiers实际上适用于其元素。
cv限定类型和cv非限定类型是不同的。也就是 int
是一个与 const int
不同的类型。
As from subject. I saw this terminology in a question I recently asked, and apparently it's a well established term, but I am not able to find anything on stackoverflow.
There are fundamental types and compound types. Fundamental types are the arithmetic types, void
, and std::nullptr_t
. Compound types are arrays, functions, pointers, references, classes, unions, enumerations, and pointers to non-static members.
A cv-unqualified type is any of those types.
For any cv-unqualified type, there are three corresponding cv-qualified types:
- const-qualified - with the
const
cv-qualifier - volatile-qualified - with the
volatile
cv-qualifier - const-volatile-qualified - with both the
const
andvolatile
cv-qualifiers
Note, however, that cv-qualifiers applied to an array type actually apply to its elements.
The cv-qualified and cv-unqualified types are distinct. That is int
is a distinct type from const int
.
这篇关于什么是“cv不合格”是什么意思在C ++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!