jsoncons
jsoncons copied to clipboard
Visual Studio 2022 Preview 17.4.0 compilation errors
Describe the bug
Updating visual studio to preview 17.4.0 produces compilations errors upon basically any include of jsoncons.
1>V:\code\jsoncons-0-168-7\include\jsoncons\converter.hpp(282,37): error C2039: 'from': is not a member of 'jsoncons::converter<std::basic_string<char,std::char_traits
Enumerate the steps to reproduce the bug #include <jsoncons/json.hpp>
Include a small, self-contained example if possible #include <jsoncons/json.hpp>
What compiler, architecture, and operating system?
- Compiler: Visual Studio Preview 17.40.0
- Architecture (e.g. x86, x64) x64
- Operating system: Windows 10
What jsoncons library version?
- [./ ] Latest release 0.168.7
- [ ] Other release ______
- [ ] master
Thanks for reporting this, I'll have a look at the preview.
It appears to be an issue of a converter<Into>
specialization defined after its first use. This is the first time I've seen a compiler complain about this, but after investigating and discussing on a C++ forum, I think Visual Studio Preview 17.40.0 is right.
I've rewritten the converter class, the code is on master, and Visual Studio Preview 17.40.0 is now able to compile. This fix will go in the next release.
Fixed in 0.169.0