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

Compilation error when using Visual Studio 2017 with C++11/14/17 language support enabled #279

Closed
AngusRo opened this issue Oct 27, 2024 · 1 comment

Comments

@AngusRo
Copy link

AngusRo commented Oct 27, 2024

Using the latest version of toml11 the Visual Studio 2017 compiler generates the following error for a simple test case:

auto config = toml::parse("hello.toml");
auto devices = toml::find<int>(config, "device", 0);

Error generated:

include\toml11\parser.hpp(2682): error C2440: '': cannot convert from 'initializer list' to 'toml::detail::character_either'
1>include\toml11\parser.hpp(2834): note: No constructor could take the source type, or constructor overload resolution was ambiguous
1>include\toml11\parser.hpp(3729): error C2440: '': cannot convert from 'toml::error_info' to 'std::vector<toml::error_info,std::allocator<_Ty>>'
1> with
1> [
1> _Ty=toml::error_info
1> ]
1>include\toml11\parser.hpp(3729): note: No constructor could take the source type, or constructor overload resolution was ambiguous

ToruNiina added a commit that referenced this issue Jan 12, 2025
by avoiding known SFINAE problem in msvc 2017
github-actions bot pushed a commit that referenced this issue Jan 12, 2025
by avoiding known SFINAE problem in msvc 2017 844e8fd
@ToruNiina
Copy link
Owner

I changed code to make it compiles with MSVC 2017 (the original code compiles with gcc/clang, MSVC 2019, 2022 but only MSVC 2017 fails).

I added MSVC 2017 to appveyor build. It will continuously be checked after v4.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants