Bug 12396

Summary: std::string size() and length() returning zero on non empty string.
Product: uClibc++ Reporter: Eduardo N Hering <enhering>
Component: Standard ComplianceAssignee: unassigned
Status: NEW ---    
Severity: critical CC: uclibc-cvs
Priority: P5    
Version: 0.2.4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Host: Target:
Build:

Description Eduardo N Hering 2019-12-10 04:06:52 UTC
The following code:

int main(void) {
  std::string teste = "teste12";
  std::cout << "Test string: " << teste << "(" << teste.size() << ")" << std::endl;
}

Produces:

Test string: teste12()

On QSDK, an OpenWRT 15.05 based linux maintained by Qualcomm.

The same code compiles and runs well on Debian 9 and Mac OS 10.14+