Skip to content

P1684R5: Conversions and to_mdspan should provide untemplated overloads #480

@miscco

Description

@miscco

Currently the conversion to mdspan and the to_mdspan are templated with different template arguments

  template<class OtherElementType, class OtherExtents,
                   class OtherLayoutType, class OtherAccessorType>
  operator mdspan ();

  template<class OtherAccessorType>
    constexpr mdspan<element_type, extents_type, layout_type, OtherAccessorType>
      to_mdspan(const OtherAccessorType& a = default_accessor<element_type>());

That prevents us from using CTAD for the common use case where one converts to a matching mdspan. We should provide untemplated overloads so that this works

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