mini-yaml icon indicating copy to clipboard operation
mini-yaml copied to clipboard

Parse string parameter fails.

Open diegomazala opened this issue 5 years ago • 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

diegomazala avatar Aug 10 '20 09:08 diegomazala

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

jimmiebergmann avatar Aug 11 '20 18:08 jimmiebergmann