Skip to content

Decay deduced function return types #351

Open
@sdkrystian

Description

@sdkrystian

Even though parameters should have their type preserved to reflect how they were written, deduced return types should be automatically decayed because the type is not explicitly written. For example:

struct A
{
    char data[20];

    auto f() { return data; }
}

Currently (with recursive TypeInfo) the return type of f is extracted as char[20]. The actual return type of the function is char*.

Metadata

Metadata

Assignees

Labels

MetadataAST or Metadata addition/change

Type

No type

Projects

Status

Accepted

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions