commit | 6e73ad4e27057a9ca76747eec49df6aeeaee315e | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Wed Nov 28 08:04:57 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Nov 28 08:04:57 2018 |
tree | 7961589d95a48fc6bf425e9ba82d1f6c651cbc05 | |
parent | e9a27271a093fe75767f9043ac18f2431e79db20 [diff] |
dns: Explicitly use std::initializer_list with base::NoDestructor This fixes the GCC build after 65be571f ("Add DNS histograms for private DNS usage, perf, and auto-upgradability"). Due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84849, having base::NoDestructor<T<U>> and passing an initializer list of Us does not work if this is not done explicitly, as GCC incorrectly fails to determine which constructor overload to use: ../../net/dns/host_resolver_impl.cc: In function ‘bool net::{anonymous}::DnsServerSupportsDoh(const net::IPAddress&)’: ../../net/dns/host_resolver_impl.cc:525:8: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous }); ^ In file included from ../../net/dns/host_resolver_impl.cc:42: ../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’ <deleted> NoDestructor(const NoDestructor&) = delete; ^~~~~~~~~~~~ ../../base/no_destructor.h:60:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(T&&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’ explicit NoDestructor(T&& x) { new (storage_) T(std::move(x)); } ^~~~~~~~~~~~ ../../base/no_destructor.h:59:12: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const T&) [with T = std::unordered_set<std::__cxx11::basic_string<char> >]’ explicit NoDestructor(const T& x) { new (storage_) T(x); } ^~~~~~~~~~~~ See also: https://chromium-review.googlesource.com/c/chromium/src/+/1170905 Bug: 819294 Change-Id: I821c5215bf39c9c3caf50c614710dba551b0a19a Reviewed-on: https://chromium-review.googlesource.com/c/1352353 Reviewed-by: Paul Jensen <pauljensen@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#611593}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .