Latest Changes

The following noteworthy changes have been made:

2023 Nov 27Revision
5.6 -- The conditional operatorUndated section: The type of the expressions must match or be convertible
2023 Nov 26Revision
21.9 -- Overloading the subscript operatorAdded section: Removing duplicate code between const and non-const overloads
2023 Nov 24Revision
0.12 -- Configuring your compiler: Choosing a language standardAdded section: Compilers often have incomplete support for new language features
2023 Nov 20Revision
2023 Nov 20Revision
14.8 -- The benefits of data hiding (encapsulation)Added examples to section Prefer non-member functions to member functions
2023 Nov 20Revision
21.11 -- Overloading typecastsAdded section: Explicit typecasts
2023 Nov 11Revision
12.12 -- Return by reference and return by addressAdded a less obvious example where lifetime extension doesn't work
2023 Nov 11Revision
5.9 -- Introduction to std::stringAdded advanced section describing what "s" suffix expands to
2023 Nov 11Revision
5.4 -- LiteralsMade clear that "s" and "sv" suffixes create temporary objects
2023 Nov 6Revision
10.15 -- Function templatesAdded section: Naming template parameters
2023 Oct 30Revision
5.2 -- Constant expressions, compile-time const, and runtime constMoved as-if rule discussion up, additional examples
2023 Oct 24Split
SiteChapter 5 refactored from chapter 4 and a few other lessons
2023 Oct 18Revision
10.13 -- Deleting functionsAdded section: Deleting all non-matching overloads
2023 Oct 10Revision
2023 Oct 5Revision
13.6 -- Struct aggregate initializationAdded section: Initializing a struct with another struct of the same type
2023 Oct 5Split
15.10 -- Ref qualifiersRefactored lesson content from prior lesson
2023 Oct 5Split
14.7 -- Member functions returning references to data membersRefactored lesson content from prior lesson
2023 Oct 4Revision
14.3 -- Member functionsAdded section: Member functions can be overloaded
2023 Sep 27Revision
13.13 -- Alias templatesSplit alias templates out from prior lesson
2023 Sep 26Revision
14.8 -- The benefits of data hiding (encapsulation)Added section: Prefer non-member functions to member functions
2023 Sep 25Revision
12.12 -- Return by reference and return by addressAdded section: It’s okay to return by const reference an rvalue passed by const reference
2023 Sep 25Revision
14.9 -- Introduction to constructorsAdded section: Constructors should not be const
2023 Sep 25Moved
14.4 -- Const class objects and const member functionsMoved lesson up one chapter (from 15.2)
2023 Sep 22Revision
1.10 -- Introduction to expressionsAdded section: Subexpressions, full expressions, and compound expressions
2023 Sep 22Revision
5.7 -- Inline functions and variablesUpdates for accuracy, added mention of header-only libraries
2023 Sep 15Revision
5.8 -- Constexpr and consteval functionsAdded section: Can a constexpr function call a non-constexpr function?
2023 Sep 13Revision
5.11 -- std::string_view (part 2)Added section: std::string_view may or may not be null-terminated
2023 Sep 12Revision
5.9 -- Introduction to std::stringAdded section: Returning a std::string
2023 Sep 11New
SiteChapters 14, 15, 16, and 17 updated
2023 Sep 4Revision
6.4 -- Increment/decrement operators, and side effectsAdded section: When to use prefix vs postfix
2023 Aug 31Revision
13.12 -- Class template argument deduction (CTAD) and deduction guidesAdded section: CTAD doesn't work with non-static member initialization
2023 Aug 26Revision
12.4 -- Lvalue references to constAdded section: Constexpr lvalue references
2023 Aug 23Revision
O.1 -- Bit flags and bit manipulation via std::bitsetAdded section: Querying a std::bitset
2023 Aug 17Revision
13.12 -- Class template argument deduction (CTAD) and deduction guidesAdded section: Type aliases and alias templates for class templates
2023 Jul 31New
12.13 -- In and out parametersNew lesson: In and out parameters
2023 Jul 26Split
12.6 -- Pass by const lvalue referenceRefactored lesson content from prior lesson
2023 Jul 21Split
13.9 -- Struct miscellanyRefactored lesson content from prior lesson
2023 Jul 18Revision
14.6 -- Access functionsAdded section: The order of class member declaration
2023 Jul 18Revision
27.5 -- Exceptions, classes, and inheritanceAdded section: Exception classes should be copyable
2023 Jul 13Revision
5.8 -- Constexpr and consteval functionsAdded section: Constexpr/consteval function parameters are not constexpr, but can be used as arguments to other constexpr functions
2023 Jul 13Revision
5.2 -- Constant expressions, compile-time const, and runtime constAdded section: Const and constexpr function parameters
2023 Jun 29Revision
2023 Jun 28Revision
7.6 -- Internal linkageAdded some best practices
2023 Jun 28Revision
5.11 -- std::string_view (part 2)Rewrote lesson and moved up from chapter 11
2023 Jun 28Revision
5.10 -- Introduction to std::string_viewRefactored lesson to simplify a bit
2023 Jun 24Revision
2.11 -- Header filesAdded section: How including definitions in a header file results in a violation of the one-definition rule
2023 Jun 24Revision
7.4 -- Introduction to global variablesAdded info on global variables declared inside namespaces
2023 Jun 20Revision
5.10 -- Introduction to std::string_viewAdded section: "Assignment changes what the std::string_view is viewing". Added examples to other sections.
2023 Jun 20Revision
5.4 -- LiteralsAdded section: C-style string literals
2023 Jun 19Revision
8.20 -- Generating random numbers using Mersenne TwisterUpdated Random.h to handle non-int types
2023 Jun 13Revision
5.10 -- Introduction to std::string_viewAdded section: A quick guide on when to use `std::string` vs `std::string_view`
2023 Jun 5Revision
2.4 -- Introduction to function parameters and argumentsAdded section: Function parameters not used in the function body
2023 May 30New
8.4 -- Constexpr if statementsAdded lesson: Constexpr if statements
2023 May 29Revision
6.1 -- Operator precedence and associativityRewrote lesson to clarify concepts and tighten terminology
2023 May 11Revision
16.5 -- Arrays and loopsAdded quiz 4. Thanks to reader Waldo!
2023 May 11Revision
8.10 -- For statementsAdded quizzes 4 and 5. Thanks to reader Waldo!
2023 May 9Revision
0.11 -- Configuring your compiler: Warning and error levelsRecommending -Wconversion for GCC/Clang/VS Code users
2023 May 9Revision
8.16 -- Detecting and handling errorsAdded section: When to use `std::cout` vs `std::cerr` vs logging
2023 May 5Revision
0.11 -- Configuring your compiler: Warning and error levelsAdded information on how to enable signed/unsigned conversion warnings for Visual Studio
2023 May 5Split
10.4 -- Narrowing conversions, list initialization, and constexpr initializersRefactored narrowing conversion content from prior lesson. Added content around constexpr initializers.
2023 May 5Revision
10.3 -- Numeric conversionsAdded section: Safe and unsafe conversions
2023 May 4Revision
10.18 -- Non-type template parametersAdded sections: Implicit conversions for non-type template arguments, and Type deduction for non-type template parameters using `auto`
2023 Apr 22Revision
1.6 -- Uninitialized variables and undefined behaviorAdded section: Implementation-defined behavior and unspecified behavior
2023 Apr 21Split
10.18 -- Non-type template parametersRefactored content and added examples (in preparation for future content)
2023 Apr 13Revision
6.3 -- Remainder and ExponentiationRenamed modulus to remainder, added rationale
2023 Mar 30New
21.y -- Chapter 21 projectAdded project: Chapter 14 project
2023 Mar 16Revision
23.7 -- std::initializer_listRevised section: List initialization prefers list constructors over non-list constructors
2023 Feb 27Revision
8.20 -- Generating random numbers using Mersenne TwisterRevised section: Random numbers across multiple functions or files (Random.h)
2023 Feb 12Revision
13.12 -- Class template argument deduction (CTAD) and deduction guidesAdded section: Type template parameters with default values
2023 Feb 8Revision
5.11 -- std::string_view (part 2)Revised section: Prefer to pass by std::string_view (over const std::string&)
2023 Feb 6Revision
12.7 -- Introduction to pointersClarified when invalid pointers produce undefined/implementation-defined behavior
2023 Jan 26Revision
27.9 -- Exception specifications and noexceptAdded section: Illustrating the behavior of noexcept functions and exceptions
2023 Jan 13Revision
1.5 -- Introduction to iostream: cout, cin, and endlAdded section: std::cout is buffered, along with additional discussion of flushing
2023 Jan 7Revision
0.6 -- Installing an Integrated Development Environment (IDE)Added instructions to update MinGW for Code::Blocks C++20 support
2023 Jan 7Revision
1.9 -- Introduction to literals and operatorsAdded discussion of operator return values and side effects
2022 Dec 21Revision
2022 Dec 17Revision
21.11 -- Overloading typecastsAdded section: Converting constructors vs overloaded typecasts
2022 Dec 8Revision
SiteAdded VS Code sections
2022 Nov 29Revision
1.4 -- Variable assignment and initializationAdded section: Unused initialized variables and [[maybe_unused]]
2022 Nov 23Revision
22.7 -- Circular dependency issues with std::shared_ptr, and std::weak_ptrRewrote section: Avoiding dangling pointers with std::weak_ptr
2022 Nov 21Revision
2022 Nov 5Revision
2022 Oct 6Revision
27.4 -- Uncaught exceptions and catch-all handlersNoted that stack unwinding is optional for uncaught exceptions. Added best practice around catch-all handlers in main.
2022 Oct 6Revision
27.3 -- Exceptions, functions, and stack unwindingRevised lesson to more accurately describe when stack unwinding happens
2022 Oct 3Revision
22.4 -- std::moveAdded section: Moved from objects will be in a valid, but possibly indeterminate state
2022 Oct 3Revision
22.3 -- Move constructors and move assignmentAdded section: Do not implement move semantics using std::swap
2022 Sep 16Revision
21.10 -- Overloading the parenthesis operatorAdded extra credit quiz questions 2 and 3
2022 Sep 15Revision
8.10 -- For statementsAdded section: The perils of `operator!=` in for-loop conditions
2022 Sep 13Revision
10.7 -- Typedefs and type aliasesAdded section on naming type aliases, made type alias names consistent with best practice
2022 Sep 12Revision
4.12 -- Introduction to type conversion and static_castAdded section: Type conversion produces a new value
2022 Sep 11Revision
5.2 -- Constant expressions, compile-time const, and runtime constRevised examples, added section: Constant folding for constant subexpressions
2022 Sep 8Revision
1.10 -- Introduction to expressionsRefactored some content and linked some related lessons
2022 Sep 8Revision
1.9 -- Introduction to literals and operatorsAdded text about nullary operators
2022 Aug 25Revision
14.10 -- Constructor member initializer listsAdded section: Initializing const member variables
2022 Aug 23Revision
2022 Aug 23Revision
13.1 -- Introduction to program-defined (user-defined) typesRevised section: Nomenclature: user-defined types vs program-defined types
2022 Aug 20Revision
27.9 -- Exception specifications and noexceptRevised section: When to use noexcept
2022 Aug 12Revision
6.6 -- Relational operators and floating point comparisonsRevised section: Floating point equality
2022 Jul 23Revision
22.7 -- Circular dependency issues with std::shared_ptr, and std::weak_ptrAdded section: Dangling pointers with std::weak_ptr
2022 Jul 21Revision
24.9 -- Multiple inheritanceAdded section: Mixins
2022 Jun 16Split
5.11 -- std::string_view (part 2)Moved some content into chapter 4
2022 Jun 16Moved
2022 Jun 16Revision
2022 Jun 16Split
5.5 -- Numeral systems (decimal, binary, hexadecimal, and octal)Refactored from literals lesson. Made lesson optional
2022 Jun 16Revision
5.4 -- LiteralsRevised content for clarity. Moved content on numeric systems and string literals to other lessons
2022 Jun 16Split
5.2 -- Constant expressions, compile-time const, and runtime constExpanded constexpr content. Added section around constant expressions
2022 Jun 16Revision
5.1 -- Constant variables (named constants)Revised content for clarity. Moved constexpr content to new lesson
2022 May 13Revision
5.1 -- Constant variables (named constants)Added section on constexpr strings
2022 Apr 26Revision
8.17 -- std::cin and handling invalid inputChanged occurrences of `` to `!std::cin`.
2022 Apr 24New
13.12 -- Class template argument deduction (CTAD) and deduction guidesMoved CTAD from lesson 10.10 and added deduction guides section
2022 Apr 21Revision
2022 Apr 21New
2022 Apr 15New
2.3 -- Void functions (non-value returning functions)Moved some content from lesson 2.2. Added more discussion about return statements
2022 Apr 15Split
2.2 -- Function return values (value-returning functions)Moved some content of this lesson into lesson 2.3
2022 Apr 8Moved
SiteSplit chapter 9 (into 9 and 10). Previous chapters 10, 11, 12, 13 moved back.
2022 Mar 29Revision
10.16 -- Function template instantiationAdded section: Using function templates in multiple files
2022 Mar 29Moved
5.7 -- Inline functions and variablesMoved lesson from chapter 10 to chapter 6
2022 Mar 28New
5.8 -- Constexpr and consteval functionsNew lesson: Constexpr and consteval functions
2022 Mar 27Revision
5.1 -- Constant variables (named constants)Added new section: "Constant expressions"
2022 Mar 20Revision
2.5 -- Introduction to local scopeAdded section: "Out of scope" vs "going out of scope"
2022 Mar 20Revision
5.10 -- Introduction to std::string_viewAdded sections: converting std::string to std::string_view, and passing strings to functions
2022 Mar 14Revision
5.7 -- Inline functions and variablesRewrote lesson, added section on use of inline keyword in modern C++
2022 Feb 27Revision
0.10 -- Configuring your compiler: Compiler extensionsRemoved /Za as recommended setting for Visual Studio
2022 Feb 25Revision
13.4 -- Scoped enumerations (enum classes)Added section: Easing the conversion of scoped enumerators to integers (advanced)
2022 Feb 20Revision
2022 Feb 20Revision
2022 Feb 20Revision
2022 Feb 20Feature
SiteStarted Changelog

Any web designers want to help restyle the above to make it more readable while remaining thematically consistent? Reach out via the contact form. Thanks!

Your email address will not be displayed
Find a mistake? Leave a comment above!
Correction-related comments will be deleted after processing to help reduce clutter. Thanks for helping to make the site better for everyone!
Avatars from are connected to your provided email address.
Notify me about replies:  
Oldest Most Voted
Inline Feedbacks
View all comments