Skip to content

[ADT] Conversion from ArrayRef<S:T> to ArrayRef<T> does not work #169314

@tgymnich

Description

@tgymnich

Conversion of an ArrayRef of some class to an ArrayRef of the base class of that class fails with the following error message:

ArrayRef.h(94, 28): Candidate template ignored:
requirement 'std::conjunction_v<std::is_convertible<const mlir::StringAttr **, const mlir::Attribute *const *>, std::is_integral<unsigned long>>' was not satisfied [with C = mlir::ArrayRef<mlir::StringAttr>]

Example

ArrayRef<mlir::StringAttr> x;
ArrayRef<mlir::Attribute> y(x);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions