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