What does cv-qual Mean mean?

I began to see that the term "cv-qualified" was cast around a lot.

The answer to my last question:

if T is the type of the cv-qual class ) (section 9), the default constructor (12.1) for T is called

Can anyone define this for me?

+4
source share
2 answers

c in cv means const and v means variability.

From the C ++ standard (3.9.3 CV qualifiers)

  • ... The term object type (1.8) includes the cv qualifiers specified in the declaration-specifier-seq (7.1), declarator (section 8), type identifier (8.1) or newtype-id (5.3. 4) when the object created.

- const const T .

- - volatile T, .

- const volatile object const volatile T, , const const.

+5

c-v const volatile... , : -

// non cv_qualified 
int first; 
char *second; 

// cv-qualified 
const int third; 
volatile char * fourth; 
+8

Source: https://habr.com/ru/post/1567997/


All Articles