Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P1684R5: Conversions and to_mdspan should provide untemplated overloads #480

Open
miscco opened this issue Dec 10, 2024 · 0 comments
Open

Comments

@miscco
Copy link

miscco commented Dec 10, 2024

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

@miscco miscco changed the title P1684R4: Conversions and to_mdspan should provide untemplated overloads P1684R5: Conversions and to_mdspan should provide untemplated overloads Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant