Skip to content

const version of data method is missing in Array2View #2718

Description

@thelfer

Calling data() on an immutable Array2View yields:

error: passing ‘const DataType’ {aka ‘const Arcane::Array2View<double>’} as ‘this’ argument discards qualifiers [-fpermissive]
   61 |     return this->values.data();
  • std::span::data is a declared const and returns a pointer to mutable values (which is probably not the semantic adapted for Array2View
  • std::vector provides two overloads of the data methods

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