C plus plus:Modern C plus plus:Glossary
From GDWiki
| This article or section uses first-person ("I" or "we") or second-person ("you") inappropriately. Please edit it to use a more formal tone. |
Modern C++ : Going Beyond "C with Classes"
- Preface
- std::vector
- RAII
- Containers
- Iterators
- Algorithms
- Functors
- Binders
- Storing Functors
- References
- Glossary
- Appendices
This is a limited glossary for terms related to this series of articles. The Wiki-wide Glossary has many more entries.
Contents |
[edit] Aggregate
An aggregate is an array or a class with no user-declared constructors, no private or protected non-static data members, no base classes, and no virtual functions.
You can use initialiser list syntax like you would in C on aggregates only.
[edit] Amortized Complexity
Average complexity over a large number of calls.
For example, push_back on a std::vector is amortized O(1) because it occasionally needs an O(n) reallocation, but only once every n calls or so, with the rest being O(1). Since this means O(n) for n calls, the per-call complexity averages to O(1).
[edit] Fundamental Type
One of the basic types in the C++ language, such as int, unsigned char, double, bool, array, or pointer.
Note that structs and classes are not fundamental.
[edit] N-ary Function
A Function that takes N parameters.
[edit] Nullary Function
A Function that takes no arguments.
[edit] POD Type
Plain Old Data Type
All fundamental types are POD Types. structs ( or classes, since they're the same ) are POD if all their member types are POD types and they have the default, compiler-generated default constructor, copy constructor, assignment, and destructor. ( This implies that construction and destruction are NOPs and copying or assignment can be done with a bitwise copy. )
[edit] Unary Function
A Function that takes exactly one argument.

