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

shadows if internal variables #2431

Closed
MohammadKanan opened this issue Jul 11, 2022 · 2 comments
Closed

shadows if internal variables #2431

MohammadKanan opened this issue Jul 11, 2022 · 2 comments

Comments

@MohammadKanan
Copy link

When I #include "spdlog/sinks/dist_sink.h"
I get compilation error
spdlog/include/spdlog/sinks/dist_sink.h:58: error: declaration of ‘sink’ shadows a member of ‘spdlog::sinks::dist_sinkstd::mutex’ [-Werror=shadow]
In file included from
nclude/spdlog/sinks/dist_sink.h: In instantiation of ‘void spdlog::sinks::dist_sink::sink_it_(const spdlog::details::log_msg&) [with Mutex = std::mutex]’:
spdlog/include/spdlog/sinks/dist_sink.h:58:10: required from here
spdlog/sinks/dist_sink.h:60:9: error: declaration of ‘sink’ shadows a member of ‘spdlog::sinks::dist_sinkstd::mutex’ [-Werror=shadow]
60 | for (auto &sink : sinks_)
| ^~~

@tt4g
Copy link
Contributor

tt4g commented Jul 11, 2022

PR is welcome.

@MohammadKanan
Copy link
Author

PR is welcome.
Shortly ..

@gabime gabime closed this as completed in fbba6df Oct 31, 2022
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

2 participants