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

Warning: possibly dangling reference to a temporary #352

Open
avitase opened this issue Dec 19, 2024 · 0 comments
Open

Warning: possibly dangling reference to a temporary #352

avitase opened this issue Dec 19, 2024 · 0 comments

Comments

@avitase
Copy link

avitase commented Dec 19, 2024

My compiler found this warning during compilation:

glbinding/source/glbinding-aux/source/types_to_string.cpp: In function ‘std::ostream& glbinding::operator<<(std::ostream&, const Value<Argument>&) [with T = Boolean8; std::ostream = std::basic_ostream<char>]’:
glbinding/source/glbinding-aux/source/types_to_string.cpp:210:18: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  210 |     const auto & name = aux::Meta::getString(value.value());
      |                  ^~~~
glbinding/source/glbinding-aux/source/types_to_string.cpp:210:45: note: the temporary was destroyed at the end of the full expression ‘glbinding::aux::Meta::getString((& value)->glbinding::Value<glbinding::Boolean8>::value())’
  210 |     const auto & name = aux::Meta::getString(value.value());
      | 

it seems legit

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

No branches or pull requests

1 participant