From 61a63f84006317b2ece155a0dd80f080b4d8069e Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Sat, 11 Nov 2017 11:46:47 -0600 Subject: 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. --- devtools/create_project/create_project.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 6715191707..e59924c033 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -1170,7 +1170,9 @@ bool producesObjectFile(const std::string &fileName) { } std::string toString(int num) { - return static_cast(&(std::ostringstream() << num))->str(); + std::ostringstream os; + os << num; + return os.str(); } /** -- cgit v1.2.3