我给出了某种类型的类型名称。有没有办法获得此类型的std :: vector的typename名称?
类似的东西:
std::string GetVectorTypename(std::string const& tname) {
/* return the typeid of an std::vector of tname's.
In this example, I want this to return typeid(std::vector<double>).name() */
}
int main() {
const std::string tname = typeid(double).name();
const std::string vec_tname = GetVectorTypename(tname);
}