-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std::pair<std::string,Color> 序列化枚举不支持 #227
Comments
报错如下
|
你是打算设置键值是pair类型的吗?pair类型的键值是无法表示的吧, |
并不是,单纯的一个组队关系 不是map |
能给出报错的完整测试代码吗 |
|
抱歉,我还是没有理解你的意思,我目前的理解是你想序列化结构体中的 pair类型 ? 这是目前不允许的,因为key和value是一对一的情况,pair类型属于一对多。目前没有考虑去序列化pair类型! |
好的,明白了. 如果定义std::map<States,int> 这样的结构,也会出现编译错误. 报错跟上述一致. |
隐式转换是不提倡的,为什么需要定义 std::map<States,int> 这样的结构呢? |
哈哈,接手的屎山代码只能慢慢改 |
这是普通代码支持的
如果将这个结构序列化,则会编译失败
The text was updated successfully, but these errors were encountered: