Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.35 KB

CppConst_cast.md

File metadata and controls

26 lines (20 loc) · 1.35 KB

const_cast is a keyword to cast away constness.

  1. Herb Sutter and Andrei Alexandrescu. C++ coding standards: 101 rules, guidelines, and best practices. ISBN: 0-32-111358-6. Chapter 94: 'Avoid casting away const'
  2. Scott Meyers. Effective C++ (3rd edition). ISBN:0-321-33487-6. Item 3, paragraph 'Avoid duplication in const and non-const member functions'
  3. John Lakos. Large-Scale C++ Software Design. 1996. ISBN: 0-201-63362-0. Chapter 9.1.6: 'Think twice (at least) before casting away const'
  4. Gottschling, Peter. Discovering Modern C++: An Intensive Course for Scientists, Engineers, and Programmers. Addison-Wesley Professional, 2015. Chapter 5.2.3.2: 'Consider casting away const only as the very last resort'