C plus plus:Modern C plus plus:Glossary
Modern C++ : Going Beyond "C with Classes"
- Storing Functors
This is a limited glossary for terms related to this series of articles. The Wiki-wide Glossary has many more entries.
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.
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).
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.
A Function that takes N parameters.
A Function that takes no arguments.
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. )
A Function that takes exactly one argument.