gecko-dev/ipc/chromium
Chris Peterson cdcbafc835 Bug 1776347 - ipc/chromium: Replace some DISALLOW_COPY_AND_ASSIGN macros with explicitly deleted constructors to fix C++20 build errors. r=ipc-reviewers,nika
gcc -std=c++20 (but not clang -std=c++20) complains about template class definitions that specify the template parameter on the class constructor. For example:

template <typename T>
class C {
  C(int x) {}
  // OK in clang and gcc for both -std=c++17 and -std=c++20.

  C<T>(int x, int y) {}
  // OK in clang for both -std=c++17 and -std=c++20.
  // OK in gcc -std=c++17 but a build error with -std=c++20.
};

The ipc/chromium build error because the `DISALLOW_COPY_AND_ASSIGN` macro expands to such a template class definition:

ipc/chromium/src/base/basictypes.h:53:12: error: expected unqualified-id before 'const'
      |   TypeName(const TypeName&) = delete
      |            ^~~~~
ipc/chromium/src/base/threading/thread_local.h:95:3: note: in expansion of macro 'DISALLOW_COPY_AND_ASSIGN'
      |   DISALLOW_COPY_AND_ASSIGN(ThreadLocalPointer<T>);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~

Google replaced chromium/base's DISALLOW_COPY_AND_ASSIGN macros with explicitly deleted constructors, so let's apply their upstream fix:

7319bbdb7d

Differential Revision: https://phabricator.services.mozilla.com/D150216
2022-06-28 04:17:30 +00:00
..
gtest Bug 1775148 - Cleanup ipc/ includes r=sylvestre 2022-06-23 15:49:57 +00:00
src Bug 1776347 - ipc/chromium: Replace some DISALLOW_COPY_AND_ASSIGN macros with explicitly deleted constructors to fix C++20 build errors. r=ipc-reviewers,nika 2022-06-28 04:17:30 +00:00
chromium-config.mozbuild Bug 1715144 - Part 1: Stop adding /ipc/glue to LOCAL_INCLUDES when including chromium-config.mozbuild, r=ipc-reviewers,necko-reviewers,mccr8,valentin 2021-06-09 04:56:48 +00:00
moz.build Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi 2021-12-23 20:29:07 +00:00