cmListFileCache: Add explicit constructors

In order to construct with an initializer list in pure C++11, add
the explicit constructors.
This commit is contained in:
Brad King
2020-09-28 09:35:08 -04:00
parent 1b03ac7da7
commit 0e59b45dfc

View File

@@ -73,6 +73,14 @@ public:
std::string FilePath;
long Line = 0;
cmListFileContext() = default;
cmListFileContext(std::string name, std::string filePath, long line)
: Name(std::move(name))
, FilePath(std::move(filePath))
, Line(line)
{
}
static cmListFileContext FromCommandContext(cmCommandContext const& lfcc,
std::string const& fileName)
{