Skip to content

Error in gcc master detected in Boolean_set_operations_2_examples #8827

@sloriot

Description

@sloriot

Errors here are due to what looks like a bug in gcc master.

Bug reported to gcc: submitted a gcc bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119859

The following does not compile (ambiguous)

struct Curve{};

struct A
{
  template<typename T>
  A& operator=(const T& t) {
    return *this;
  }
};

struct B : public A
{
  using A::operator=;
  template<typename T>
  B& operator=(const T& t) {
    return *this;
  }
};

int main()
{
  Curve c;

  B b;
  b=c;
}

Observed with:

commit 03ac8886e5c1fa16da90276fd721a57fa9435f4f (HEAD -> master, origin/master, origin/HEAD)
Author: Jonathan Wakely [[email protected]](mailto:[email protected])
Date: Wed Mar 26 11:47:05 2025 +0000

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions