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

Fix slog warning #419

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Fix slog warning #419

merged 2 commits into from
Nov 28, 2024

Conversation

garethsb
Copy link
Contributor

@garethsb garethsb commented Nov 22, 2024

I propose this as an alternative to #418 to fix #417.

I'm not 100% sure about the overloads taking rvalue-ref and returning lvalue-ref, but it seems to work in my local env...

… from 'slog::detail::`anonymous-namespace'::log<`anonymous-namespace'::dull_gate,-2147483647>' to 'slog::log_statement &'

message : A non-const reference may only be bound to an lvalue
@garethsb
Copy link
Contributor Author

Seems like there's probably a more general solution with a forwarding function to support rvalue log statements... like the operator<< for std::basic_ostream added to resolve LWG issue 1203. However, when I tried an implementation inspired by libstdc++ I ended up with "recursive on all control paths" warnings, so I must have missed something.

@lo-simon
Copy link
Collaborator

Thanks, @garethsb; we are happy with your changes.

@lo-simon lo-simon merged commit 52627d2 into sony:master Nov 28, 2024
11 checks passed
@garethsb garethsb deleted the fix-nmos-slog branch November 28, 2024 14:52
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.

Compiler errors after recent commit
2 participants