commit | c33e832cc145c696d2157796c7640e659740dafa | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Fri Feb 08 08:44:00 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 08 08:44:00 2019 |
tree | bba99f738bebd1d929074f2749628f679e714587 | |
parent | 6267d3e16eeb500cc6ebe43b6521fe4cc71fbd1f [diff] |
quic_flags_impl: Fix GCC build after #618558 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/third_party/quic/platform/impl/quic_flags_impl.cc: In member function ‘bool quic::TypedQuicFlagHelper<T>::SetFlag(const string&) const [with T = bool; std::__cxx11::string = std::__cxx11::basic_string<char>]’: ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:156:41: error: call of overloaded ‘NoDestructor(<brace-enclosed initializer list>)’ is ambiguous {"", "1", "t", "true", "y", "yes"}); ^ In file included from ../../net/third_party/quic/platform/impl/quic_flags_impl.h:16, from ../../net/third_party/quic/platform/impl/quic_flags_impl.cc:5: ../../base/no_destructor.h:62:3: note: candidate: ‘base::NoDestructor<T>::NoDestructor(const base::NoDestructor<T>&) [with T = std::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::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::set<std::__cxx11::basic_string<char> >]’ explicit NoDestructor(const T& x) { new (storage_) T(x); } ^~~~~~~~~~~~ Explicitly use an std::initializer_list to make the build work everywhere. Bug: 819294 Change-Id: I775be20e3766a88a656b58c94c40869cb1bee2a8 Reviewed-on: https://chromium-review.googlesource.com/c/1458214 Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Ryan Hamilton <rch@chromium.org> Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Cr-Commit-Position: refs/heads/master@{#630249}
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 .