| ▲ | Maxatar 4 days ago | |
So data structures like std::vector should never be copied - period? | ||
| ▲ | HarHarVeryFunny 4 days ago | parent [-] | |
I think the parent is just referring to pointer types, not anything (like std::vector) that may use pointers internally. This "std::indirect" tries to have value semantics, but in fact it's just another type of smart pointer and uses pointer syntax (pimpl->foo : forced since C++ allows "->" as a user defined operator name, but not "."). But it's a weird sort of "pointer" given this copying behavior, which is maybe why they didn't give it a "_ptr" name. | ||