C++ refresher

Inheritance

Strings

  • substr()

Regex

Exceptions

1
throw std::invalid_argument("can't resolve ifindex for main intf");

C++11 features

Lambda functions

https://stackoverflow.com/questions/7627098/what-is-a-lambda-expression-in-c11

C++14 features

auto&& vs auto&

emplace_back() vs push_back

emplace_back:
I am being constructed.

push_back:
I am being constructed.
I am being moved.

Library

Priority queue

std::distance()

Computes distance between iterators

1
std::distance(words_begin, words_end)

unordered_set vs set

is_sorted_until()

Returns an iterator to the first element in the range [first,last) which does not follow an ascending order.

is_sorted()

Returns true if the range [first,last) is sorted into ascending order.

vector vs. bitset

Concurrency

Resources