Bug 12396 - std::string size() and length() returning zero on non empty string.
Summary: std::string size() and length() returning zero on non empty string.
Status: NEW
Alias: None
Product: uClibc++
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 0.2.4
Hardware: Other Other
: P5 critical
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-10 04:06 UTC by Eduardo N Hering
Modified: 2019-12-10 04:06 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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+