-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Headers module #74
base: master
Are you sure you want to change the base?
Headers module #74
Conversation
|
||
#### Background/Required Knowledge | ||
|
||
* All of the above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "All of the above" on line 77 referring to all of the foundational background? I think that it would be clearer to say this explicitly. Incidentally, is it implied that all background for a topic at the foundational level is also required for the main level? If so, then perhaps such a statement is unnecessary?
Would like to get cross-references in advance section to other modules which are coupled to headers, such as classes, templates, modules, etc.
/ok-to-test |
feeling of small-group was to omit advanced section, as each advanced topic seemed more relevant to a different module
* Usage of standard library code requires inclusion of various header files | ||
* Give examples of various header files and when they may be needed for inclusion | ||
* Include links to reference materials for finding out what headers are used for various feature sets | ||
* When using standard library facilities, can either use `using std::vector; vector<int> v;`, or `std::vector<int> v;`, or `using namespace std; vector<int> v;`, though modern practice strongly discourages invoking `using namespace std;` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a nice example but that does not relates to headers. I think it relates to templates and I am not sure if we should mention it there.
Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, work.
@rwdougla What's the status of this topic, should we table it for a SG20 discussion? It seems quite ready.
@@ -0,0 +1,106 @@ | |||
## Module name: Headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Module name: Headers | |
## C++ compilation model: Headers {#headers} |
multiple distinct source files to share a single source of common | ||
declarations. | ||
|
||
### Foundational: Including code through standard library headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Foundational: Including code through standard library headers | |
### Foundational: Including code through standard library headers {#headers-found} |
* Include links to reference materials for finding out what headers are used for various feature sets | ||
* When using standard library facilities, can either use `using std::vector; vector<int> v;`, or `std::vector<int> v;`, or `using namespace std; vector<int> v;`, though modern practice strongly discourages invoking `using namespace std;` | ||
|
||
### Main: Organizing function and class declarations for reuse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Main: Organizing function and class declarations for reuse | |
### Main: Organizing function and class declarations for reuse {#headers-main} |
|
||
A student should be able to: | ||
|
||
1. Include common standard library headers to get access to standard library features |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Include common standard library headers to get access to standard library features | |
1. include common standard library headers to get access to standard library features |
1. Create a declaration for an existing function, placed in a separate file | ||
2. Utilize double-quote inclusion to include a header from the same directory | ||
3. Utilize angular-bracket inclusion to include a header from standard library | ||
4. Explain the meaning of the one-definition rule and how it applies to headers | ||
5. Protect a header with include guards and explain why they are necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Create a declaration for an existing function, placed in a separate file | |
2. Utilize double-quote inclusion to include a header from the same directory | |
3. Utilize angular-bracket inclusion to include a header from standard library | |
4. Explain the meaning of the one-definition rule and how it applies to headers | |
5. Protect a header with include guards and explain why they are necessary | |
1. create a declaration for an existing function, placed in a separate file | |
2. utilize double-quote inclusion to include a header from the same directory | |
3. utilize angular-bracket inclusion to include a header from standard library | |
4. explain the meaning of the one-definition rule and how it applies to headers | |
5. protect a header with include guards and explain why they are necessary |
alignment with other topic spellings
implementation-defined, unspecified, or undefined behavior._ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation-defined, unspecified, or undefined behavior._ | |
implementation-defined, unspecified, or undefined behavior._ | |
* The include directly actually copies the header file into the file it is included in. | |
resolves #3