Project

General

Profile

Talk #575

Updated by Kretz, Matthias about 9 years ago

The This talk gives an explanation of const keyword (and related facilities, such as mutable and const_cast) is one of the things in C++ that look easy constexpr and straightforward. However, once you take a deeper look, the feature may appear confusing or even counterproductive. (The C++ FAQ recommends to sit down and ensure that no "sharp implements [are] nearby" before it their intended uses. It then explains the core issue.) 

 This talk will present a thorough introduction of the syntax consequences for interface design and semantics of const. This will ultimately lead to how the question little const keyword is an integral part of the intended use self-documentation of const. The second part of the talk therefore explains how const is used correctly, how this leads to const-correct interfaces, and why this improves maintainability and reduces coding errors. an interface.

Back