Skip to content

Wrapping a const function that returns a pointer #136

@kennyweiss

Description

@kennyweiss

In the references example, there is the following case:

  - decl: double* getArray() +dimension(getSize())

I ran into a problem wrapping the function if it is const, e.g.

  - decl: double* getArray() const +dimension(getSize())

The errors were of the form:

<src>.cpp: error: a value of type "const ArrayWrapper *" cannot be used to initialize an entity of type "ArrayWrapper *"
      ArrayWrapper *obj = static_cast<const ArrayWrapper *>(self->addr);

Could you please add the const versions of these functions, with shroud wrappers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions