CREATE_PROJECT: Fix compilation failure in C++11 mode

Getting the address of an rvalue is invalid, and not necessary
here.

Once C++11 can be used always, this utility function can just be
replaced with std::to_string.
This commit is contained in:
Colin Snover 2017-11-11 11:46:47 -06:00
parent 6c40ceded1
commit 61a63f8400

View file

@ -1170,7 +1170,9 @@ bool producesObjectFile(const std::string &fileName) {
}
std::string toString(int num) {
return static_cast<std::ostringstream*>(&(std::ostringstream() << num))->str();
std::ostringstream os;
os << num;
return os.str();
}
/**