Skip to content

Problem with use of std::stringstream #3992

@Jake-Shadle

Description

@Jake-Shadle

name_mapper.cpp has this to_string function which was add in 0bdcc23 and hasn't been touched since then.

The reason I'm bring this up because I get this exception with using it.

image

And if I change it, no exception, validation runs as it should.

std::string to_string(uint32_t id) {
-  // Use stringstream, since some versions of Android compilers lack
-  // std::to_string.
-  std::stringstream os;
-  os << id;
-  return os.str();
+  return std::to_string(id);
}

I assume that something is wrong with my build setup but nothing is jumping out as a likely culprit, so I'm wondering if replacing name_mapper's to_string with std::to_string would be fine now, supposedly it's C++11, and it's been 4 years, so maybe whatever Android compiler(s) are being referenced in the comment have been supplanted by now?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions