Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. 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":
  2.  
  3.  
  4. #include <stdafx.h>
  5. #include <string>
  6. #include <utility>
  7.  
  8. #include <boost/filesystem.hpp>
  9.  
  10. int main(int argc, char *argv[])
  11. {
  12. boost::filesystem::path homePath = "D:\Temp";
  13.  
  14. std::pair<std::string, std::string> path;
  15. path = { homePath.string(), homePath.string() };
  16.  
  17. return 0;
  18. }
  19.  
  20.  
  21. It produces the following output:
  22.  
  23. 1>d:\repos\simpletest001\simpletest001\simpletest001.cpp(8): fatal error C1001: An internal error has occurred in the compiler.
  24. 1>(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 256)
  25. 1> To work around this problem, try simplifying or changing the program near the locations listed above.
  26.  
  27.  
  28. To avoid the error, the path can be set in all of the following ways instead:
  29.  
  30. path = { homePath.string().c_str(), homePath.string() };
  31.  
  32. path = { homePath.string(), homePath.string().c_str() };
  33.  
  34. path = std::make_pair(homePath.string(), homePath.string());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement