From 9772c6b20671235a148a22b141af31bc3afd0844 Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 17 May 2024 16:34:52 -0500 Subject: [PATCH 01/14] Add draft for build systems --- .../modules/compilation-model/buildsystems.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/modules/compilation-model/buildsystems.md diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md new file mode 100644 index 0000000..7fa4159 --- /dev/null +++ b/sources/modules/compilation-model/buildsystems.md @@ -0,0 +1,110 @@ +## Module name: Build systems + +_Skeleton descriptions are typeset in italic text,_ +_so please don't remove these descriptions when editing the topic._ + +### Overview + +_Provides a short natural language abstract of the module’s contents._ +_Specifies the different levels of teaching._ + +------------------------------------------------------------------------ +Level Objective +----------------- ------------------------------------------------------ +Foundational --- Knowledge about build systems + +Main --- Usage of build system to compile a executable + +Advanced --- Usage of build system to compile a library or + add external libraries as a dependencies + +------------------------------------------------------------------------ + +### Motivation + +_Why is this important?_ +_Why do we want to learn/teach this topic?_ + +* Building complex C++ projects by hand or writing Make files is tricky +* Build systems can help to resolve dependencies +* Build systems can help do distribute C++ code and help other to compile the code +* Build systems can help to find and include libraries as dependencies +* All major C++ projects are distributed with build systems + +### Topic introduction + +_Very brief introduction to the topic._ + +Build systems are used to configure, build, and install complex C++ projects. + + +### Foundational: Knowledge about build systems + +#### Background/Required Knowledge + +A student: +* Should know about build systems + + +#### Student outcomes + +_A list of things "a student should be able to" after the curriculum._ +_The next word should be an action word and testable in an exam._ +_Max 5 items._ + +A student should be able to: + +1. To explain what a build system is +2. Know that a build systems resolves dependencies +3. Know that a build system support cross-platform compilation + +#### Caveats + +_This section mentions subtle points to understand, like anything resulting in +implementation-defined, unspecified, or undefined behavior._ + +None + +#### Points to cover + +_This section lists important details for each point._ + +* Mention that many build systems are available for C++. +* Mention benefits and challenges + +### Main: Usage of build system to compile a executable + +#### Background/Required Knowledge + +* All of the above. + +#### Student outcomes + +A student should be able to: + +1. Write a configuration file to compile a C++ program with a main method +2. Use the build system to generate the executable + +#### Caveats + +The instructions are restricted to the chosen build system and +not easily transferable. + + +#### Points to cover + +* Adding include paths to header files +* Adding compiler flags +* How to build Release and Debug builds + + +### Advanced + +_These are important topics that are not expected to be covered but provide +guidance where one can continue to investigate this topic in more depth._ + +* How to build libraries +* How to include libraries to the executable +* How to find external libraries and include them +* How to add support for different compilers +* How to add support for different operating systems From ac383ec48c5a4b208f60ebd6123821084529c909 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Fri, 26 Jul 2024 09:46:54 -0600 Subject: [PATCH 02/14] Update buildsystems.md Discussion with the US group --- .../modules/compilation-model/buildsystems.md | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 7fa4159..55e43a3 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -25,11 +25,12 @@ Advanced --- Usage of build system to compile a library or _Why is this important?_ _Why do we want to learn/teach this topic?_ -* Building complex C++ projects by hand or writing Make files is tricky +* Building complex C++ projects by hand is tricky * Build systems can help to resolve dependencies * Build systems can help do distribute C++ code and help other to compile the code * Build systems can help to find and include libraries as dependencies -* All major C++ projects are distributed with build systems +* Build systems faciliate project management +* All major C++ projects are distributed with build systems ### Topic introduction @@ -43,7 +44,7 @@ Build systems are used to configure, build, and install complex C++ projects. #### Background/Required Knowledge A student: -* Should know about build systems +* Should know how to compile and link C++ programs #### Student outcomes @@ -55,8 +56,8 @@ _Max 5 items._ A student should be able to: 1. To explain what a build system is -2. Know that a build systems resolves dependencies -3. Know that a build system support cross-platform compilation +2. To explain a build systems resolves dependencies +3. To explain a build system supports compilation for different operating systems and architectures #### Caveats @@ -69,8 +70,9 @@ None _This section lists important details for each point._ -* Mention that many build systems are available for C++. +* Mention that many build systems are available for C++ * Mention benefits and challenges +* Build system help to only compile the C++ files with code changes and not the complete project ### Main: Usage of build system to compile a executable @@ -82,8 +84,10 @@ _This section lists important details for each point._ A student should be able to: -1. Write a configuration file to compile a C++ program with a main method -2. Use the build system to generate the executable +1. Download a C++ package and build the package +2. Write a configuration file to compile a C++ executable +3. Pass compiler options via the build system +4. Use the build system to generate the executable #### Caveats @@ -96,6 +100,8 @@ not easily transferable. * Adding include paths to header files * Adding compiler flags * How to build Release and Debug builds +* Linking external libraries to the C++ project +* Support different operating systems, compilers, and architectures ### Advanced @@ -103,8 +109,7 @@ not easily transferable. _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ -* How to build libraries -* How to include libraries to the executable -* How to find external libraries and include them -* How to add support for different compilers -* How to add support for different operating systems +* How to build libraries +* Write a configuration file for your own library +* How to have external libraries be downloaded during the build process + From ecbec3b702563e64f9249d9f9dfc15bc99d5822f Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 26 Sep 2024 09:28:18 -0600 Subject: [PATCH 03/14] Typos --- sources/modules/compilation-model/buildsystems.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 55e43a3..fd6a97d 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -56,8 +56,8 @@ _Max 5 items._ A student should be able to: 1. To explain what a build system is -2. To explain a build systems resolves dependencies -3. To explain a build system supports compilation for different operating systems and architectures +2. To explain that a build systems resolves dependencies +3. To explain that a build system supports compilation for different operating systems and architectures #### Caveats From 646500521c217714e8b29b15961b58c6b37cb2b1 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 26 Sep 2024 09:29:22 -0600 Subject: [PATCH 04/14] More typos --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index fd6a97d..85e11d4 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -97,7 +97,7 @@ not easily transferable. #### Points to cover -* Adding include paths to header files +* Include paths to header files to the configuration * Adding compiler flags * How to build Release and Debug builds * Linking external libraries to the C++ project From f50e498b4aabf030e44ae061d310ed79a02f6d44 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:00:59 -0600 Subject: [PATCH 05/14] Update buildsystems.md Mention unit testing --- sources/modules/compilation-model/buildsystems.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 85e11d4..5bd0fc0 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -112,4 +112,5 @@ guidance where one can continue to investigate this topic in more depth._ * How to build libraries * Write a configuration file for your own library * How to have external libraries be downloaded during the build process +* Mention that build systems provide support for unit testing From 430c317b53ce1a2950ff8859c554b5365fcf7c4b Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:06:50 -0600 Subject: [PATCH 06/14] Update buildsystems.md Move building a lib and link it to a C++ executable to the main level --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 5bd0fc0..7666771 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -88,6 +88,7 @@ A student should be able to: 2. Write a configuration file to compile a C++ executable 3. Pass compiler options via the build system 4. Use the build system to generate the executable +5. Write a configuration file to compile a library and link the library to a C++ executable #### Caveats @@ -110,7 +111,6 @@ _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ * How to build libraries -* Write a configuration file for your own library * How to have external libraries be downloaded during the build process * Mention that build systems provide support for unit testing From ee55d0e2b732f281e0ce70687d48e10e65e87d55 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Sun, 20 Oct 2024 21:08:42 -0600 Subject: [PATCH 07/14] Update buildsystems.md --- sources/modules/compilation-model/buildsystems.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 7666771..5b5e4ac 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -15,8 +15,7 @@ Foundational --- Knowledge about build systems Main --- Usage of build system to compile a executable -Advanced --- Usage of build system to compile a library or - add external libraries as a dependencies +Advanced --- Add external libraries as a dependencies ------------------------------------------------------------------------ @@ -88,7 +87,7 @@ A student should be able to: 2. Write a configuration file to compile a C++ executable 3. Pass compiler options via the build system 4. Use the build system to generate the executable -5. Write a configuration file to compile a library and link the library to a C++ executable +5. Write a configuration file to compile a library and link the library to a C++ executable #### Caveats From cbbfbe2c3abd5beff8301c1277b3bc621496fd0b Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 31 Oct 2024 09:05:06 -0600 Subject: [PATCH 08/14] make it more precise --- sources/modules/compilation-model/buildsystems.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/modules/compilation-model/buildsystems.md b/sources/modules/compilation-model/buildsystems.md index 5b5e4ac..8e14fa0 100644 --- a/sources/modules/compilation-model/buildsystems.md +++ b/sources/modules/compilation-model/buildsystems.md @@ -101,7 +101,7 @@ not easily transferable. * Adding compiler flags * How to build Release and Debug builds * Linking external libraries to the C++ project -* Support different operating systems, compilers, and architectures +* Support compilation on different operating systems, compilers, and architectures ### Advanced From ec04360a905b341d3b923ae1183c7a61981400a1 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 27 Mar 2025 10:09:21 -0600 Subject: [PATCH 09/14] Add draft for constructors --- sources/modules/object-model/constructors.md | 98 +++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 41d0ab6..8895ead 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -3,4 +3,100 @@ _Skeleton descriptions are typeset in italic text,_ _so please don't remove these descriptions when editing the topic._ -This topic is currently under construction and will soon be filled with information :) +### Overview + +_Provides a short natural language abstract of the module’s contents._ +_Specifies the different levels of teaching._ + +------------------------------------------------------------------------ +Level Objective +----------------- ------------------------------------------------------ +Foundational: Declaration of constructors + +Main: Initialization and overloading + +Advanced: TBD + +------------------------------------------------------------------------ + +### Motivation + +_Why is this important?_ +_Why do we want to learn/teach this topic?_ + +Constructors are fundamental to generate objects from classes and structs, so understanding them is essential to work with objcets. + +### Topic introduction + +_Very brief introduction to the topic._ + +### Foundational: Basic use of constructors + +#### Background/Required Knowledge + +A student: + +1. should know the notion of classes and structs + +#### Student outcomes + +_A list of things "a student should be able to" after the curriculum._ +_The next word should be an action word and testable in an exam._ +_Max 5 items._ + +A student should be able to: + +1. Add constructors to classes and structs +2. Explain different types of initialization +3. Explain compiler provided constructors when these are provided, what these do, and when these go away +4. Explain differences between creating an object and declare a variable + +#### Points to cover + +* Overloading of constructors and default arguments +* Copy constrcutor and destructor +* Constructors can be used to initialize class members +* + +#### Caveats + +_This section mentions subtle points to understand, like anything resulting in +implementation-defined, unspecified, or undefined behavior._ + +* programming user interfaces in C++ and in general require plenty of boiler plate code +* API calls are specific to one library and might not be transferable to other libraries +* Some libraries are written in C + +### Main: Command of supporting mechanisms and tools + +#### Background/Required Knowledge + +* All of the above. + +#### Student outcomes + +A student should be able to: + +1. add more advanced elements, like tables or images +2. handle multiple windows +3. show error and warning popups +4. use different forms of IO, like keyboard, mouse, or touch pad +5. explain basic of fonts and accessibility + +#### Caveats + +* programming user interfaces is rather complex and might not applicable for most students + +#### Points to cover + +* More advanced API calls and design patterns + +### Advanced: Technicalities and tools + +_These are important topics that are not expected to be covered but provide +guidance where one can continue to investigate this topic in more depth._ + +* Internationalization +* Font designers +* Hardware acceleration +* Custom widget generation From 47b6a7636ab098a6bdc7eaa8d3be35e2bf710b3b Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 26 Jun 2025 10:49:46 -0600 Subject: [PATCH 10/14] Update --- sources/modules/object-model/constructors.md | 47 +++++++++++--------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 8895ead..7aa8628 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -11,7 +11,7 @@ _Specifies the different levels of teaching._ ------------------------------------------------------------------------ Level Objective ----------------- ------------------------------------------------------ -Foundational: Declaration of constructors +Foundational: Basic usage of constructors Main: Initialization and overloading @@ -36,7 +36,7 @@ _Very brief introduction to the topic._ A student: -1. should know the notion of classes and structs +1. should know the notion of classes and structs %todo link to classes #### Student outcomes @@ -54,49 +54,56 @@ A student should be able to: #### Points to cover * Overloading of constructors and default arguments -* Copy constrcutor and destructor +* Copy constructor and destructor * Constructors can be used to initialize class members -* #### Caveats _This section mentions subtle points to understand, like anything resulting in implementation-defined, unspecified, or undefined behavior._ -* programming user interfaces in C++ and in general require plenty of boiler plate code -* API calls are specific to one library and might not be transferable to other libraries -* Some libraries are written in C +* None -### Main: Command of supporting mechanisms and tools +### Main: #### Background/Required Knowledge * All of the above. +* Class inheritance %todo check for link +* Dynamic memory +* Difference between shared and unique pointers #### Student outcomes A student should be able to: -1. add more advanced elements, like tables or images -2. handle multiple windows -3. show error and warning popups -4. use different forms of IO, like keyboard, mouse, or touch pad -5. explain basic of fonts and accessibility +1. Explain the differences between the big five, namely, copy constructor, move constrcutor, copy/assign, move/assign, destructor, and constructor. +2. Construct a initializer list and explain conditions when it is necessary +3. Delegate to the constructor of the base class +4. Demonstrate and explain safe memory handling using shared or unique pointers +5. Define what RAII is and the role of the constructor #### Caveats -* programming user interfaces is rather complex and might not applicable for most students +* Order of construction should match the initalizer list order #### Points to cover -* More advanced API calls and design patterns +* Not calling virtual functions from the base class +* Do not initialze data outside of the constructor (two face initialization) +* Difference between assignment and deep copy -### Advanced: Technicalities and tools +### Advanced: _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ -* Internationalization -* Font designers -* Hardware acceleration -* Custom widget generation +* Error handling within constructors +* Non-static data initialziers +* Constructors with member references +* Purposes for protected constructors +* What does delete vs private means +* What does it mean to have an explicit constructor +* Impact on const expr on constructor %extend later +* Rules on memory ordering %extend later +* Define constructor outside of the body of the class %extend later From b9f99c71cea01a722efeb339bc843fe3b5ea72a7 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 28 Aug 2025 14:04:27 -0600 Subject: [PATCH 11/14] Final draft --- sources/modules/object-model/constructors.md | 29 +++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 7aa8628..9f0962e 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -24,7 +24,7 @@ Advanced: TBD _Why is this important?_ _Why do we want to learn/teach this topic?_ -Constructors are fundamental to generate objects from classes and structs, so understanding them is essential to work with objcets. +Constructors are fundamental to generate objects from classes and structs, so understanding them is essential to work with objects. ### Topic introduction @@ -77,11 +77,11 @@ implementation-defined, unspecified, or undefined behavior._ A student should be able to: -1. Explain the differences between the big five, namely, copy constructor, move constrcutor, copy/assign, move/assign, destructor, and constructor. +1. Explain the differences between the big five, namely, copy constructor, move constructor, copy/assign, move/assign, destructor, and constructor. 2. Construct a initializer list and explain conditions when it is necessary 3. Delegate to the constructor of the base class 4. Demonstrate and explain safe memory handling using shared or unique pointers -5. Define what RAII is and the role of the constructor +5. Define what RAII is, the role of the constructor in it; and the relationship with its destructor #### Caveats @@ -90,20 +90,23 @@ A student should be able to: #### Points to cover * Not calling virtual functions from the base class -* Do not initialze data outside of the constructor (two face initialization) +* Do not initialize data outside of the constructor (two face initialization) +* All objects should be initialized within the constructor and should have a well-defined state * Difference between assignment and deep copy +For more details, we refer to the [C++ core guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) + ### Advanced: _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ -* Error handling within constructors -* Non-static data initialziers -* Constructors with member references -* Purposes for protected constructors -* What does delete vs private means -* What does it mean to have an explicit constructor -* Impact on const expr on constructor %extend later -* Rules on memory ordering %extend later -* Define constructor outside of the body of the class %extend later +* Member references must be initialized in the constructor +* Member classes not initialized explicitly will be initialized using the default constructor +* Exceptions thrown in constructor (needs to be extended) +* Protected constructor prevents direct construction of a base class +* Explicit constructor prevents implicit type conversion of a single argument +* Member classes are constructed in the order they are declared +* Constructors for classes with static members must be defined outside of the body of the class +* Non-state data member can be given a default value at initialization, but constructor take + From 3b280d9b76a43e15c2a8bc32b6d41aef34b8e2a6 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 25 Sep 2025 09:56:39 -0600 Subject: [PATCH 12/14] Backup --- sources/modules/object-model/constructors.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 9f0962e..27cda8b 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -77,11 +77,13 @@ implementation-defined, unspecified, or undefined behavior._ A student should be able to: -1. Explain the differences between the big five, namely, copy constructor, move constructor, copy/assign, move/assign, destructor, and constructor. +1. Explain the differences between the big five, namely, copy constructor, move constructor, copy/assign, move/assign, destructor, and constructor, see [move semantics](move-semantics.md) 2. Construct a initializer list and explain conditions when it is necessary 3. Delegate to the constructor of the base class 4. Demonstrate and explain safe memory handling using shared or unique pointers 5. Define what RAII is, the role of the constructor in it; and the relationship with its destructor +6. Use the explicit keyword to prevent accidental type conversion from a single argument, see [C.46](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-explicit) +7. Initialze data members with default values outside of the constructor and explain the benefit of why, see [C.48](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-explicit) #### Caveats @@ -101,12 +103,9 @@ For more details, we refer to the [C++ core guidelines](https://isocpp.github.io _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ -* Member references must be initialized in the constructor -* Member classes not initialized explicitly will be initialized using the default constructor -* Exceptions thrown in constructor (needs to be extended) -* Protected constructor prevents direct construction of a base class -* Explicit constructor prevents implicit type conversion of a single argument -* Member classes are constructed in the order they are declared +* Initialization requirements of data members not explicitly initialized via the initializer-list or NSDMIs, including references and non-trivial types +* Exceptions thrown in constructor, see [Execption handling](../error-handling/exception-handling.md) +* Protected constructor prevents direct construction * Constructors for classes with static members must be defined outside of the body of the class -* Non-state data member can be given a default value at initialization, but constructor take +* Non-static data member can be given a default value at initialization, but constructor take precedence From 8b9e6cac338f7e4daea10c9f239d83a80fb293cf Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 25 Sep 2025 09:57:57 -0600 Subject: [PATCH 13/14] Spell check --- sources/modules/object-model/constructors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 27cda8b..8e7e0d5 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -83,7 +83,7 @@ A student should be able to: 4. Demonstrate and explain safe memory handling using shared or unique pointers 5. Define what RAII is, the role of the constructor in it; and the relationship with its destructor 6. Use the explicit keyword to prevent accidental type conversion from a single argument, see [C.46](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-explicit) -7. Initialze data members with default values outside of the constructor and explain the benefit of why, see [C.48](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-explicit) +7. Initialize data members with default values outside of the constructor and explain the benefit of why, see [C.48](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-explicit) #### Caveats @@ -104,7 +104,7 @@ _These are important topics that are not expected to be covered but provide guidance where one can continue to investigate this topic in more depth._ * Initialization requirements of data members not explicitly initialized via the initializer-list or NSDMIs, including references and non-trivial types -* Exceptions thrown in constructor, see [Execption handling](../error-handling/exception-handling.md) +* Exceptions thrown in constructor, see [Exception handling](../error-handling/exception-handling.md) * Protected constructor prevents direct construction * Constructors for classes with static members must be defined outside of the body of the class * Non-static data member can be given a default value at initialization, but constructor take precedence From d5a27218ae9df730826c5dc09563f8dda618d7e6 Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Thu, 25 Sep 2025 10:47:34 -0600 Subject: [PATCH 14/14] Final version --- sources/modules/object-model/constructors.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/modules/object-model/constructors.md b/sources/modules/object-model/constructors.md index 8e7e0d5..daf0cb2 100644 --- a/sources/modules/object-model/constructors.md +++ b/sources/modules/object-model/constructors.md @@ -36,7 +36,7 @@ _Very brief introduction to the topic._ A student: -1. should know the notion of classes and structs %todo link to classes +1. should know the notion of classes and structs, see [declarations](declarations.md) #### Student outcomes @@ -68,8 +68,8 @@ implementation-defined, unspecified, or undefined behavior._ #### Background/Required Knowledge -* All of the above. -* Class inheritance %todo check for link +* All of the above +* Class inheritance * Dynamic memory * Difference between shared and unique pointers