boost::anyreplacementforthecodebelow我希望摆脱对我的代码的boost依赖。我有以下结构构造。在代码中的另一个位置调用和使用此结构时,使用boost::any_cast。我知道模板类会做到这一点,但很难编写这个模板。-C菜鸟。 structProperties{ public: Properties(){} Properties(conststd::string&s,constboost::any&p){ name=s; value=p; } templatetypenameT> Properties(Tn){ value=n; } boost::