Skip to content

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

@AngusRo

Description

@AngusRo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions