Discovering one of the pillars of C++ generic programming.| Internal Pointers
←Index| www.scs.stanford.edu
A function template defines a family of functions.| en.cppreference.com
Every template is parameterized by one or more template parameters.| en.cppreference.com
Class templates, function templates (including generic lambdas), and other templated functions (typically members of class templates) might be associated with a constraint , which specifies the requirements on template arguments, which can be used to select the most appropriate function overloads and template specializations.| en.cppreference.com
Models of Generics and Metaprogramming: Go, Rust, Swift, D and More| thume.ca
Each C++ expression (an operator with its operands, a literal, a variable name, etc.) is characterized by two independent properties: a type and a value category. Each expression has some non-reference type, and each expression belongs to exactly one of the three primary value categories: prvalue, xvalue, and lvalue.| en.cppreference.com
Creates and initializes objects with dynamic storage duration, that is, objects whose lifetime is not necessarily limited by the scope in which they were created.| en.cppreference.com
A coroutine is a function that can suspend execution to be resumed later. Coroutines are stackless: they suspend execution by returning to the caller, and the data that is required to resume execution is stored separately from the stack. This allows for sequential code that executes asynchronously (e.g. to handle non-blocking I/O without explicit callbacks), and also supports algorithms on lazy-computed infinite sequences and other uses.| en.cppreference.com
Binds the specified names to subobjects or elements of the initializer.| en.cppreference.com
Constructs a closure (an unnamed function object capable of capturing variables in scope).| en.cppreference.com
In order to instantiate a class template, every template argument must be known, but not every template argument has to be specified. In the following contexts the compiler will deduce the template arguments from the type of the initializer:| en.cppreference.com
I recently had an insight about type erasure that I wanted to share. Type erasure is a combination of two techniques working together to achieve both polymorphism and value semantics: std::polymorphic_value, a proposed standard library type, and duck typing.| www.foonathan.net