The Note Context in the rightmost column is only shown in case an annotated program exists. - You can navigate to the annotated program via the annotated slide view (= 'the note context').
A really simple example of iterators. | it-1.cpp | Slide context | - | - |
The same program using a reverse iterator. | rit-1.cpp | Slide context | - | - |
Equivalent program with range-for - with iterators abstracted away - C++11. | it-1-range-for.cc | Slide context | - | - |
Output insert-iterators and factory functions that create such iterators. | ins-2.cpp | Slide context | - | - |
Same program - simplified in various ways in C++11. | ins-2.cpp | Slide context | - | - |
Illustration of priority_queue<Point, deque<Point> >. | pri-queue-1.cpp | Slide context | - | - |
Class point with an overloaded operator<. | point.h | Slide context | - | - |
The implementation of class Point and in particular operator<. | point.cc | Slide context | - | - |
Illustration of the map standard container. | map-2.cpp | Slide context | - | - |
Alternative version - using range-for for traveral of the map. | map-3.cpp | Slide context | - | - |
Illustration of the use of member types for a list of chars. | mem-types-1.cpp | Slide context | - | - |
Same program - now with use of typename as prefix of 'nested dependent type names'. | mem-types-2.cpp | Slide context | - | - |
Illustration of a couple of ambiguities. | ambiguities-1.cpp | Slide context | - | - |
Ambiguities resolved. | ambiguities-2.cpp | Slide context | - | - |
An alternative resolution of the ambiguity . | ambiguities-3.cpp | Slide context | - | - |
Illustration of the use of vector<bool>. | vec-bool-3.cpp | Slide context | - | - |
Another slightly more complicated (almost) equivalent program. | vec-bool-1a.cpp | Slide context | - | - |
A possible implementation of the for-each algorithm. | for-each-reproduction-1.cpp | Slide context | - | - |
Implementation and sample use of for-each on a list of integers. | for-each-reproduction-2.cpp | Slide context | - | - |
Use of std::for-each instead of our own definition of for-each. | for-each-real-use.cpp | Slide context | - | - |
Class Point with overloadings of the application operator. | point.h | Slide context | - | - |
Definition of funny Point application operators. | point.cc | Slide context | - | - |
Sample uses of the application operators - Funny and artificial. | prog.cc | Slide context | - | - |
Class Point with another overloading of the application operator. | point.h | Slide context | - | - |
Definition of then Point application operator. | point.cc | Slide context | - | - |
Sample uses of the application operators - slightly more realistic. | prog.cc | Slide context | - | - |
Two overloads of the sort function template. | sort-signatures | Slide context | - | - |
Sorting a vector of integers. | prog-2-kn.cpp | Slide context | - | - |
A possible use of for-each to solve this problem. | for-each-1.cpp | Slide context | - | - |
Following the advice: Solve the problem with a more appropriate algorithm. | adjacent-1.cpp | Slide context | - | - |
Possible definitions of the type greater and its base class. | greater-and-binary-function.cpp | Slide context | - | - |
An illustration of plus<double>. | plus-1.cpp | Slide context | - | - |
A possible definition of plus. | plus-3.cpp | Slide context | - | - |
Another definition of plus - as a function template. | plus-4.cpp | Slide context | - | - |
Yet another alternative where a lambda expression is used. | plus-5.cpp | Slide context | - | - |
Illustration of member function adaptions. | memb-adapt-1.cpp | Slide context | - | - |
The definition of Point - point.h. | point.h | Slide context | - | - |
Static assert about the size of int. | p1.cc | Slide context | - | - |
Static asserts abstracted in constexpr function. | p4.cc | Slide context | - | - |
An example a static_assert in a template user specialization program. | prog1.cpp | Slide context | - | - |
Illustration of of type functions in a number static assertions - all of which hold. | p5.cc | Slide context | - | - |
Examples of constant expressions - C++11. | constexpr-1.cpp | Slide context | - | - |
The same program - with results statically asserted. | constexpr-1-statass.cpp | Slide context | - | - |
Evaluation of constexpr at run-time - C++11. | constexpr-4.cpp | Slide context | - | - |
Relaxed constexpr in C++14. | constexpr-5.cpp | Slide context | - | - |
Examples of a literal type, struct Point - C++11. | constexpr-2.cpp | Slide context | - | - |
The same program - with results statically asserted. | constexpr-2-statass.cpp | Slide context | - | - |
Examples of class Circle with a constexpr constructor - C++11. | constexpr-3.cpp | Slide context | - | - |
An sample use of conditional. | cond-2.cc | Slide context | - | - |
Same - syntactically embellished. | cond-3.cc | Slide context | - | - |
Use of my_conditional in the example from above. | cond-3-realistic.cc | Slide context | - | - |
Possible definition of conditional - here as my_conditional. | conditional-def.cc | Slide context | - | - |
Use of my_conditional - in the example from above. | cond-4.cc | Slide context | - | - |
Selection one of two functions at compile time. | cond-5.cc | Slide context | - | - |
Class Point header file - where move is only enabled for floating point types. | point.h | Slide context | - | - |
Implementation of Point<C> members. | point.cc | Slide context | - | - |
Use of class Point<double> with move - OK. | prog1.cc | Slide context | - | - |
Use of class Point | prog2.cc | Slide context | - | - |
First version of type function. | int-types.cc | Slide context | - | - |
Second version of type function - embellished syntax of the type function. | int-types-1.cc | Slide context | - | - |
The ugly and bulky selection stuff. | select-stuff.cc | Slide context | - | - |
Yet another version of type function - generalized to selection among an arbitrary number of types. | int-types-2.cc | Slide context | - | - |
General selection stuff - shorter and more elegant - using variadic templates (C++11). | select-stuff-general.cc | Slide context | - | - |
The factorial function defined as a constexpr function (C++11). | fac-1.cc | Slide context | - | - |
The factorial function defined as a function template - using a template int parameter. | fac-2.cc | Slide context | - | - |
The factorial function programmed in struct - with recursion. | fac-3.cc | Slide context | - | - |
The factorial function - from Wikipedia. | fak1.cpp | Slide context | - | - |
The power function on integer type arguments. | pow1.cpp | Slide context | - | - |
The power function on integer type arguments - alternative implementation with an enumeration constant. | pow1a.cpp | Slide context | - | - |
A more advanced version of the power function - from Stack Overflow. | pow3.cpp | Slide context | - | - |
A variant of the more advanced version of the power function. | pow4.cpp | Slide context | - | - |
Generated: Tuesday August 1, 2017, 13:32:23