|
You are here |
developernote.com | ||
| | | | |
www.cppstories.com
|
|
| | | | | In C++11, we got a handy way to initialize various containers. Rather than using push_back() or insert() several times, you can leverage a single constructor by taking an initializer list. For example, with a vector of strings, you can write: std::vector vec { "abc", "xyz", "***" }; We can also write expressions like: for (auto x : {1, 2, 3}) cout << x << ", "; The above code samples use std::initializer_list and (some compiler support) to hold the values and pass them around. Let's understa...... | |
| | | | |
danlark.org
|
|
| | | | | Today we are going to talk about C++ basic std::pair class in a way how and why it is broken. Story std::pair first appeared in C++98 as a pretty basic class with a very simple semantics -- you have two types T1 and T2, you can write std::pair and access .first and .second members... | |
| | | | |
mpark.github.io
|
|
| | | | | `switch`-based implementation for `visit` | |
| | | | |
critter.blog
|
|
| | | As 2023 rolls around, now may be a good time to work out your ideal week. What do you want your calendar to look like? How can you make that the reality? | ||