Skip to content
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

vs2015编译例程报错 #57

Closed
x1ng-z opened this issue Oct 5, 2021 · 1 comment
Closed

vs2015编译例程报错 #57

x1ng-z opened this issue Oct 5, 2021 · 1 comment
Labels
question Further information is requested

Comments

@x1ng-z
Copy link

x1ng-z commented Oct 5, 2021

###例程:
#include
#include
#include
#include <configor/json.hpp>

using namespace configor;

// 用户类
struct User
{
int user_id;
std::string user_name;

  JSON_BIND(User, user_id, user_name);

};

int main(int argc, char** argv)
{
std::stringstream s("{"user_id": 10001, "user_name": "John"}");

  // 解析json内容,并反序列化到user对象
  User user;
  s >> json::wrap(user);

  // 序列化user对象并输出
  std::cout << json::wrap(user) << std::endl; // {"user_id":10001,"user_name":"John"}
  return 0;

}

###错误:
严重性 代码 说明 项目 文件 行 禁止显示状态
错误 C2679 二进制“=”: 没有找到接受“bool”类型的右操作数的运算符(或没有可接受的转换) jsontest\jsontest\include\configor\configor_parser.hpp 125

@Nomango
Copy link
Owner

Nomango commented Oct 9, 2021

@x1ng-z master分支的代码都是通过了单测的,使用下最新的代码试试呢

@Nomango Nomango added the question Further information is requested label Oct 9, 2021
@Nomango Nomango closed this as completed May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants