最接近Objective-C NSMutableArray的C ++对象是什么?
NSMutableArray
std :: vector。
请参见http://www.cplusplus.com/reference/stl/vector/。
NSMutableArray是一个异构容器,因此:std::vector<std::any>
std::vector<std::any>
在C ++ 17之前,您可以使用boost::any之类的东西代替std::any。
boost::any
std::any