Skip to content

Commit 3b280d9

Browse files
committed
Backup
1 parent b9f99c7 commit 3b280d9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

sources/modules/object-model/constructors.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ implementation-defined, unspecified, or undefined behavior._
7777

7878
A student should be able to:
7979

80-
1. Explain the differences between the big five, namely, copy constructor, move constructor, copy/assign, move/assign, destructor, and constructor.
80+
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)
8181
2. Construct a initializer list and explain conditions when it is necessary
8282
3. Delegate to the constructor of the base class
8383
4. Demonstrate and explain safe memory handling using shared or unique pointers
8484
5. Define what RAII is, the role of the constructor in it; and the relationship with its destructor
85+
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)
86+
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)
8587

8688
#### Caveats
8789

@@ -101,12 +103,9 @@ For more details, we refer to the [C++ core guidelines](https://isocpp.github.io
101103
_These are important topics that are not expected to be covered but provide
102104
guidance where one can continue to investigate this topic in more depth._
103105

104-
* Member references must be initialized in the constructor
105-
* Member classes not initialized explicitly will be initialized using the default constructor
106-
* Exceptions thrown in constructor (needs to be extended)
107-
* Protected constructor prevents direct construction of a base class
108-
* Explicit constructor prevents implicit type conversion of a single argument
109-
* Member classes are constructed in the order they are declared
106+
* Initialization requirements of data members not explicitly initialized via the initializer-list or NSDMIs, including references and non-trivial types
107+
* Exceptions thrown in constructor, see [Execption handling](../error-handling/exception-handling.md)
108+
* Protected constructor prevents direct construction
110109
* Constructors for classes with static members must be defined outside of the body of the class
111-
* Non-state data member can be given a default value at initialization, but constructor take
110+
* Non-static data member can be given a default value at initialization, but constructor take precedence
112111

0 commit comments

Comments
 (0)