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

run test-udt error in MSVC 19.16.27034.0 #2103

Closed
spring-zh opened this issue May 12, 2020 · 3 comments
Closed

run test-udt error in MSVC 19.16.27034.0 #2103

spring-zh opened this issue May 12, 2020 · 3 comments
Labels
kind: bug platform: visual studio related to MSVC state: needs more info the author of the issue needs to provide more details

Comments

@spring-zh
Copy link

\opensource\json\test\src\unit-udt.cpp(524): error C2660: “doctest::detail::decomp_assert”: 函数不接受 4 个参数
1>d:\opensource\json\test\thirdparty\doctest\doctest.h(1337): note: 参见“doctest::detail::decomp_assert”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C2039: “person”: 不是“udt::udt”的成员
1>D:\opensource\json\test\src\unit-udt.cpp(339): note: 参见“udt::udt”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C3536: “person”: 初始化之前无法使用
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C2039: “country”: 不是“udt::udt”的成员
1>D:\opensource\json\test\src\unit-udt.cpp(339): note: 参见“udt::udt”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C3083: “country”:“::”左侧的符号必须是一种类型
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C2039: “russia”: 不是“udt::udt”的成员
1>D:\opensource\json\test\src\unit-udt.cpp(339): note: 参见“udt::udt”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C2065: “russia”: 未声明的标识符
1>D:\opensource\json\test\src\unit-udt.cpp(529): error C2064: 项不会计算为接受 1 个参数的函数
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C2039: “person”: 不是“udt::udt”的成员
1>D:\opensource\json\test\src\unit-udt.cpp(339): note: 参见“udt::udt”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C2923: “std::unique_ptr”: 对于参数“_Ty”,“person”不是有效的 模板 类型变量
1>D:\opensource\json\test\src\unit-udt.cpp(529): note: 参见“person”的声明
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C3203: “default_delete”: 未专用化的 类 模板 不能用作 模板 变量,该变量属于 模板 参数“_Dx”,应为 real 类型
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C2672: “nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>::get”: 未找到匹配的重载函数
1> with
1> [
1> _Ty=uint8_t
1> ]
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C3206: “nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>::get”:模板 参数(“PointerType”的参数)无效,缺少 模板 参数列表(在类 模板“std::unique_ptr”中)
1> with
1> [
1> _Ty=uint8_t
1> ]
1>D:\opensource\json\single_include\nlohmann/json.hpp(18605): note: 参见“nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>::get”的声明
1> with
1> [
1> _Ty=uint8_t
1> ]
1>D:\opensource\json\test\src\unit-udt.cpp(532): error C3206: “nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>::get”:模板 参数(“ValueTypeCV”的参数)无效,缺少 模板 参数列表(在类 模板“std::unique_ptr”中)
1> with
1> [
1> _Ty=uint8_t
1> ]
1>D:\opensource\json\single_include\nlohmann/json.hpp(18450): note: 参见“nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>::get”的声明
1> with
1> [
1> _Ty=uint8_t
1> ]
1>D:\opensource\json\test\src\unit-udt.cpp(532): fatal error C1003: 错误计数超过 100;正在停止编译
1>已完成生成项目“test-udt.vcxproj”的操作 - 失败。
2>已完成生成项目“test-unicode.vcxproj”的操作 - 失败。
========== 生成: 成功 0 个,失败 3 个,最新 42 个,跳过 0 个 ==========

@nlohmann
Copy link
Owner

In order to asses your issue, we need the following information:

  • What is the issue you have?

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?

  • What is the expected behavior?

  • And what is the actual behavior instead?

  • Which compiler and operating system are you using? Is it a supported compiler?

  • Did you use a released version of the library or the version from the develop branch?

  • If you experience a compilation error: can you compile and run the unit tests?

@nlohmann nlohmann added the state: needs more info the author of the issue needs to provide more details label May 12, 2020
@spring-zh
Copy link
Author

Thanks for your reply.
my system is windows 10 (1930) , Visual Studio 2019 (16.3.9).
I use cmake-gui 3.15.5 to generate the vs project .
then i choise genetator Visual Studio 15 2017 and use default native compilers .
configure and generate by all default settings .
after open nlohmann_json.sln and run ALL_BUILD target ,
test-class_parser.vcxproj test-utd.vcxproj test-unicode.vcxproj can not be passed.

@nlohmann nlohmann added the platform: visual studio related to MSVC label May 13, 2020
@nlohmann
Copy link
Owner

That is strange as we use MSVC 2019 in our CI without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug platform: visual studio related to MSVC state: needs more info the author of the issue needs to provide more details
Projects
None yet
Development

No branches or pull requests

2 participants