Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Wiki
Coding
Patterns
HashTable
Changes
Page history
New page
Templates
Clone repository
Add \since tags into patterns
authored
5 years ago
by
Mark OLESEN
- may need to decide on a different tag in the future...
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coding/patterns/HashTable.md
+5
-0
5 additions, 0 deletions
coding/patterns/HashTable.md
with
5 additions
and
0 deletions
coding/patterns/HashTable.md
View page @
c38f61e9
<!-- --- title: OpenFOAM C++ Coding Patterns (HashTable) -->
[
Back to _coding patterns_
](
/coding/patterns/patterns
)
***We are happy to incorporate content from volunteers!!***
...
...
@@ -8,6 +9,8 @@
### HashSet
\s
ince 1706
Use range-for to dereference the HashSet iterators directly:
```
labelHashSet ids ...;
...
...
@@ -36,6 +39,8 @@ forAllConstIter(labelHashSet, ids, iter)
### HashTable, Map
\s
ince 1706
Use
`lookup()`
to provide default values (const-access) and the
`operator()`
to create new zero-initialized entries if required:
```
...
...
This diff is collapsed.
Click to expand it.