You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mlir] explicitly delete copy ctor for DialectRegistry and OperationState (#140963)
Both of these classes have fields involving `unique_ptr`s and thus can't
be copied.
Holding a unique_ptr should trigger implicit deletion of the
copy/assignment constructors, however
not when held through a container:
```
struct Foo {
explicit Foo();
std::vector<std::unique_ptr<Bar>> ptr; // Does not implicitly delete its cpy/assign ctors
};
```
This results in a complicated diagnostics when attempting to copy such a
class (it'll point to the
inner implementation of the container), instead of a nicer error message
about `Foo` not being able
to be copied/assigned. Explicitly deleting the ctors provides an
immediate diagnostic about the issue.
Fixes#118388
0 commit comments