-
Notifications
You must be signed in to change notification settings - Fork 14
Headers module #74
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
Open
rwdougla
wants to merge
12
commits into
cplusplus:master
Choose a base branch
from
rwdougla:Issue3
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Headers module #74
Changes from 1 commit
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4101af5
WIP: Straw-man "Headers" for small-group session
rwdougla 370dedd
WIP: progress from small group session
rwdougla b7d8028
Progress from March US Small Group session
rwdougla 7fa5628
Merge branch 'master' into Issue3
vulder 5aff11c
Update headers.md
rwdougla 5082bea
Merge branch 'master' into Issue3
vulder bf04222
Merge branch 'master' into Issue3
vulder 32c65e5
Apply suggestions from code review
vulder 2c6fc80
Merge branch 'master' into Issue3
vulder 9b783d3
Apply suggestions from code review
vulder 8fb6d48
Merge branch 'master' into Issue3
vulder 1a0617b
Update sources/modules/compilation-model/headers.md
vulder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
WIP: progress from small group session
Issue #3
- Loading branch information
commit 370dedd1e2d6ff67cad796172145e6b070a10b7b
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
## Module name: topic name | ||
## Module name: Headers | ||
|
||
_Skeleton descriptions are typeset in italic text,_ | ||
_so please don't remove these descriptions when editing the topic._ | ||
|
@@ -74,7 +74,7 @@ _This section lists important details for each point._ | |
|
||
#### Background/Required Knowledge | ||
|
||
* All of the above. | ||
* All of the above | ||
vulder marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Define a function and write a separate, matching, declaration | ||
* Distinguish between a declaration and a definition | ||
* Compile multiple translation units and link them together into a single executable | ||
|
@@ -84,22 +84,53 @@ _This section lists important details for each point._ | |
A student should be able to: | ||
|
||
1. Create a declaration for an existing function, placed in a separate file | ||
2. Include a header within the same directory | ||
3. Include a header locatable within the compiler's include directories | ||
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 | ||
|
||
#### Caveats | ||
|
||
* #pragma is useful, but not standardized and so may not be fully supported on all systems | ||
* `#pragma once` is useful, but not standardized and so may not be fully supported on all systems | ||
* Reusing the same include guards may cause confusion. Naming conventions based on file paths can help | ||
* Accidentally putting a definition in a header file may or may not introduce undefined behavior | ||
* Circular dependencies can cause confusion. Care should be taken in identifying such | ||
* | ||
|
||
#### Points to cover | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After looking at the points to cover in the SG20 meeting, we found that the points to cover are small/less that what is part of the ASBATS. SG20 suggests to extend the points to cover to include content wise what is asked for in the ASBATS |
||
* Angular bracket inclusion goes to the system/compiler path | ||
* Double quotes inclusion uses just relative paths | ||
|
||
### 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._ | ||
|
||
Templates in headers? | ||
Classes in headers? | ||
Macros in headers? | ||
Modules as replacement? | ||
Issues with specifying default arguments in headers? | ||
|
||
|
||
#### Background/Required Knowledge | ||
|
||
* All of the above | ||
|
||
#### Student outcomes | ||
|
||
A student should be able to: | ||
|
||
1. Utilize angular-bracket inclusion and compiler flags to include headers from non-standard paths | ||
2. Identify trade-offs of aggressiveness of putting declarations in a header file without known consumer | ||
|
||
#### Caveats | ||
|
||
_This section mentions subtle points to understand, like anything resulting in | ||
implementation-defined, unspecified, or undefined behavior._ | ||
|
||
#### Points to cover | ||
|
||
_This section lists important details for each point._ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.