Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I get a compiler internal error when using the following relatively simple code with "VisualStudio.15.Release/15.3.5+26730.16" and "Visual C++ 2017 00369-60000-00001-AA444":
- #include <stdafx.h>
- #include <string>
- #include <utility>
- #include <boost/filesystem.hpp>
- int main(int argc, char *argv[])
- {
- boost::filesystem::path homePath = "D:\Temp";
- std::pair<std::string, std::string> path;
- path = { homePath.string(), homePath.string() };
- return 0;
- }
- It produces the following output:
- 1>d:\repos\simpletest001\simpletest001\simpletest001.cpp(8): fatal error C1001: An internal error has occurred in the compiler.
- 1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 256)
- 1> To work around this problem, try simplifying or changing the program near the locations listed above.
- To avoid the error, the path can be set in all of the following ways instead:
- path = { homePath.string().c_str(), homePath.string() };
- path = { homePath.string(), homePath.string().c_str() };
- path = std::make_pair(homePath.string(), homePath.string());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement