Project

General

Profile

Talk #575

const-correctness in C++

Added by Kretz, Matthias almost 10 years ago. Updated about 9 years ago.

Status:
Presented
Priority:
Normal
Start date:
2014-04-30
Due date:
2015-04-01
% Done:

100%

Estimated time:
Talk Author(s):
Presenter:

Description

The const keyword (and related facilities, such as mutable and const_cast) is one of the things in C++ that look easy 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 explains the core issue.)

This talk will present a thorough introduction of the syntax and semantics of const. This will ultimately lead to the question of the intended use 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.


Files

const-correctness_in_C++_handout.pdf (139 KB) const-correctness_in_C++_handout.pdf Handout Kretz, Matthias, 2015-04-01 16:27
const-correctness_in_C++.pdf (4.22 MB) const-correctness_in_C++.pdf Slides Kretz, Matthias, 2015-04-01 16:27
#1

Updated by Kretz, Matthias about 9 years ago

  • Description updated (diff)
  • Due date set to 2015-04-01
  • Assignee set to Kretz, Matthias
#2

Updated by Kretz, Matthias about 9 years ago

  • Description updated (diff)
#3

Updated by Kretz, Matthias about 9 years ago

Also available in: Atom PDF