commit | 1131840b370f71d4c60d2427254381505dd06571 | [log] [tgz] |
---|---|---|
author | Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> | Fri May 04 20:15:13 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri May 04 20:15:13 2018 |
tree | 4c102e9cc8be7d8e3bdb1e381615d85ffa8f6b34 | |
parent | f128bbe0913226faf2a06a9ccd4d9c796cab6f54 [diff] |
flat_map: Readd constructors and assignment operator overloads. https://chromium-review.googlesource.com/c/chromium/src/+/705955 ("base::flat_map was missing defaults for duplication handling") removed them in favor of inheriting them from flat_tree. This can cause problems with GCC due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84782, and the build has been failing with it since https://chromium-review.googlesource.com/1000393 ("Mojo C++ Bindings: unordered_map => flat_map") with a message like this: gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.cc: In member function ‘void mojo::test::ObjectUnion::set_f_map_int8(const base::flat_map<std::__cxx11::basic_string<char>, signed char>&)’: gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.cc:455:30: error: use of deleted function ‘base::flat_map<std::__cxx11::basic_string<char>, signed char>::flat_map(const base::flat_map<std::__cxx11::basic_string<char>, signed char>&)’ std::move(f_map_int8)); ^ In file included from ../../mojo/public/cpp/bindings/clone_traits.h:11:0, from gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.h:22, from gen/mojo/public/interfaces/bindings/tests/test_unions.mojom.cc:15: ../../base/containers/flat_map.h:152:7: note: ‘base::flat_map<std::__cxx11::basic_string<char>, signed char>::flat_map(const base::flat_map<std::__cxx11::basic_string<char>, signed char>&)’ is implicitly declared as deleted because ‘base::flat_map<std::__cxx11::basic_string<char>, signed char>’ declares a move constructor or move assignment operator class flat_map : public ::base::internal::flat_tree< ^~~~~~~~ Work around it by replacing the inheritance statements with actual constructors and operator=() overloads again. This change does not completely revert https://chromium-review.googlesource.com/1000393, as the constructors maintain their new signature (so that they look like flat_tree's). Bug: 819294, 837221 Change-Id: I8f37a2c8aa269b3c1025cdc009518a7709e95947 Reviewed-on: https://chromium-review.googlesource.com/1038103 Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: kylechar <kylechar@chromium.org> Cr-Commit-Position: refs/heads/master@{#556168}
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 .