[Solved] How to Add Element into a std::vector using std::any
[ad_1] we are using push_back on an rvalue No, that’s not the problem. any stores a copy of what it is given. It doesn’t reference some other object. It creates an object from what it is given. So even if you get a reference to the object in the any, it wouldn’t be a reference … Read more