You are on page 1of 2

C++11 features new:

1)
2)
3)
4)

Move semantics: transmitting information without copying.


threads.
Lambda expressions. :for defining functors at their place of use.
enum classes to name a few

Separate compilation notion:


Static assertions:
static_assert(4<=sizeof(int), "integers are too small");
Resource Allocation is initialization.
(using of constructors and destructor)
-) initializer_list method to initialise the objects:
Vector::Vector(std::initializer_list<douuble> lst):
elem{new double[lst.size()]}, sz{lst.size()} }
lambda expression:
[&](const string &a)
nice Algorithms :
unique_copy();
back_insertor(); adds elements at the end of a container, extending the contain
er to make room for them.
move constructors make the return by value efficient.
Stream Iterators:
================
ostream_iterator<string> oo {cout};
using namespace std::chrono;
==================================
auto t0 = high_resolution_clock::now();
this_thread::sleep_for(milliseconds{20});
auto t1 = high_resolution_clock::now();
cout << duration_cast<nanoseconds>(t1 t0).count() << " nanoseconds passed\n"; this_
thread condition_variable
unique_lock ; mutex; mcond.wait(lck)
=============================================================================

Threads:
for multiple resources:
unique_lock<mutex> lck1 {m1,defer_lock}; // defer_lock: don
mutex

t yet try to acquire the

and then lock all resources together.


unique_lock<mutex> lck1 {m1,defer_lock}; // defer_lock: don t yet try to acquire the

mutex
his_thread::sleep_for(milliseconds{20});
explicit keyword
[[noreturn]]
[[carries_dependency]]
[[noreturn]]

You might also like