0
我在变量中保存数据库值。您认为以下哪种typedefs最符合您的意见:命名union或boost :: variant typedefs
typedef boost::variant<int, bool, std::string> Value;
typedef boost::variant<int, bool, std::string> Values;
typedef boost::variant<int, bool, std::string> Type;
typedef boost::variant<int, bool, std::string> Types;
有人可能会说,ObjectState和PacketField几乎没有比Value/Type更多的含义......它们只是更长。 – ltjax