spdlog icon indicating copy to clipboard operation
spdlog copied to clipboard

shadows if internal variables

Open MohammadKanan opened this issue 3 years ago • 2 comments
trafficstars

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<Mutex>::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_) | ^~~

MohammadKanan avatar Jul 11 '22 11:07 MohammadKanan

PR is welcome.

tt4g avatar Jul 11 '22 11:07 tt4g

PR is welcome. Shortly ..

MohammadKanan avatar Jul 11 '22 13:07 MohammadKanan