It's exactly about the Dangling Reference as mentioned in the first comment. Note that before reading C++ Concurrency in Action you need to learn C++.
😂😂😂, I know c++, I was just confused, because according to that statement it means, a reference to a reference should not be eligible if the original dies, which is proper c++, but when I asked you you said, that if i_ dies i should still keep kicking.
😐 a reference is not a type
References are just like pointers. Reference to a variable is just a reference to it and don't own it. So something like this is wrong: std::string& get_me_something() { std::string some_string = "ghasem is here"; return some_string; } int main() { std::cout << get_me_something() << std::endl; }
Обсуждают сегодня