C++11, BS book extract, part I, chapter 3

The std::initializer_list used to define the initializer-list constructor is a standard-library type known to the compiler

A class hierarchy offers two kinds of benefits:
Interface inheritance: An object of a derived class can be used wherever an object of a base class is required.
Implementation inheritance: A base class provides functions or data that simplifies the implementation of derived classes.

The =delete mechanism is general, that is, it can be used to suppress any operation

The notation [&](int a){ return a<x; } is called a lambda expression
Had we wanted to ‘‘capture’’ only x by reference, we could have said so: [&x]. Had we wanted to give the generated object a copy of x, we could have said so: [=x]. Capture nothing is [], capture all local names used by reference is [&], and capture all local names used by value is [=].

A template can be defined to accept an arbitrary number of arguments of arbitrary types. Such a template is called a variadic template.
template<typename T, typename… Tail>
void f(T head, Tail… tail)
{
g(head); // do something to head
f(tail…); // tr y again with tail
}
void f() { } // do nothing

using instead of typedef – using size_t = unsigned int;

Advertisements

About DmitryKrinitsyn
Software developer and muay thai adept

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: