Category "rvalue-reference"

Inserting non-const pair into `std::unordered_map` is slower than const pair

I have some code like these (from cppcon), when inserting a non-const pair into a unordered_map, the performance is very different to inserting with a const one

Modern pattern to write custom ostream operator

Typically, in C++, we used to define a custom ostream operator<< this way: class A { int impl_; friend std::ostream& operator<<(std::ost