Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug for Tick class for gcc < 11.2 #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

guzmalalo
Copy link

Fix bug for gcc < 11.2

 class std::basic_ostream<char>' has no member named 'str'
  679 |   name = (std::stringstream() << value).str();

temporary std::stringstream instances don’t support direct access to str() for gcc < 11.2

Proposed solution (line 679) :

	template<typename T>
	Tick(T v) : value(static_cast<double>(v)) {
		std::stringstream ss;
		ss << value;
		name = ss.str();
	}

Fix bug for gcc < 11.2

```bash
 class std::basic_ostream<char>' has no member named 'str'
  679 |   name = (std::stringstream() << value).str();
```

temporary std::stringstream instances don’t support direct access to str() for gcc < 11.2
@guzmalalo
Copy link
Author

To see this problem:

https://godbolt.org/z/7q4oY4bxP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant