jimmiebergmann/mini-yaml

Parse string parameter fails.

diegomazala opened this issue · 1 comments

If you use
Parse(root, "data1.txt");
as it is in the FirstExample.cpp, it works

However, if you use
const std::string file = "data1.txt";
Parse(root, filepath);
it throws an exception

If we use
const std::string file = "data1.txt";
Parse(root, filepath.c_str());
it works

I am using Microsoft Visual Studio Community 2019 Version 16.6.0

Yeah, the API is flawed and uses overloads incorrectly.
Parsing a file should be renamed to "ParseFile" or something.