关键字:volatile const
Forthe past few months, I’ve been discussing the role of cv-qualifiers (the keywords constand volatile) appearing in function parameter declarations. I’ve been focusing on how you can overload functions whose parameter types differ only in their use of cv-qualifiers, 1 and why you might want to do so.2,3 Although cv-qualifiers that appear in a parameter declaration usually become part of the function’s signature, they’re not always part of the signature. There are times when C++ ignores cv-qualifiers in parameter declarations as it determines a function`s signature. In contrast, C never ignores cv-qualifiers in parameterdeclarations. This subtle difference between C++ and C is my topic for this month.
更多参见 Top-Level cv-Qualifiers in Function Parameters.pdf