Featured pattern: Weak reference
Maintain a non-owning reference to a shared dynamically allocated object to break circular dependencies.
std::weak_ptr type represents a non-owning reference to dynamically allocated object with shared ownership (
std::shared_ptr). As they do not contribute to the reference count of the managed object they refer to, the object...
Copy elements from a range to another range or container.
Count the number of occurrences of a particular value in a range of elements.
Implement the assignment operator with strong exception safety.
Delegate behavior to derived classes without incurring the cost of run-time polymorphism.
Implement a lexicographic ordering over class members.
Remove compilation dependencies on internal class implementations and improve compile times.
Safely and efficiently implement RAII to encapsulate the management of dynamically allocated resources.
Utilise the value semantics of existing types to avoid having to implement custom copy and move operations.
Allow argument values to be omitted when calling a function.
Read a sequence of delimited values from a single line of an input stream into a standard container.
Share ownership of a dynamically allocated object with another unit of code.
Transfer unique ownership of a dynamically allocated object to another unit of code.
Avoid manual memory management to improve safety and reduce bugs and memory leaks.
Random number generation
Generate a random boolean value according to a bernoulli distribution.
Conditionally instantiate a class template depending on the template arguments.
Conditionally instantiate a function template depending on the template arguments.