deductiongu...rstd::mdspan(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’… NAME πŸ’…

okay so first things first β€” welcome to the C++ Standard Library manual, section (3), bestie 🫢. This page is literally called deduction guides for std::mdspan, and its whole self-description is just "deduction guides for std::mdspan" again 😭. iconic circular behaviour, we love a self-referential queen πŸ‘‘.


✨ SYNOPSIS ✨

bestie, peep this β€” it's all defined in header <mdspan> πŸŽ€:

Defined in header <mdspan>

and then we got eight deduction guides, all of them tagged (since C++23) ⭐. ngl, they're the whole main character energy of this page, so let's go one by one, no cap πŸ¦‹:

guide (1) 🧚

template< class CArray >
    requires(std::is_array_v<CArray> && std::rank_v<CArray> == 1)
mdspan( CArray& )                                        (1) (since C++23)
    -> mdspan<std::remove_all_extents_t<CArray>,
              std::extents<std::size_t, std::extent_v<CArray, 0>>>;

guide (2) 🧚

template< class Pointer >
    requires(std::is_pointer_v<std::remove_reference_t<Pointer>>)
mdspan( Pointer&& )                                      (2) (since C++23)
    -> mdspan<std::remove_pointer_t<std::remove_reference_t<Pointer>>,
              std::extents<size_t>>;

guide (3) 🧚

heads up bestie, this one is explicit πŸ‘€:

template< class ElementType, class... Integrals >
    requires((std::is_convertible_v<Integrals, std::size_t> && ...) &&
             sizeof...(Integrals) > 0)
explicit mdspan( ElementType*, Integrals... )             (3) (since C++23)
    -> mdspan<ElementType, std::dextents<std::size_t, sizeof...(Integrals)>>;

guide (4) 🧚

template< class ElementType, class OtherIndexType, std::size_t N >
mdspan( ElementType*, std::span<OtherIndexType, N> )      (4) (since C++23)
    -> mdspan<ElementType, std::dextents<std::size_t, N>>;

guide (5) 🧚

template< class ElementType, class OtherIndexType, std::size_t N >
mdspan( ElementType*, const std::array<OtherIndexType, N>& )   (5) (since C++23)
    -> mdspan<ElementType, std::dextents<std::size_t, N>>;

guide (6) 🧚

template< class ElementType, class IndexType, std::size_t... ExtentsPack >
mdspan( ElementType*, const std::extents<IndexType, ExtentsPack...>& )   (6) (since C++23)
    -> mdspan<ElementType, std::extents<IndexType, ExtentsPack...>>;

guide (7) 🧚

template< class ElementType, class MappingType >
mdspan( ElementType*, const MappingType& )                (7) (since C++23)
    -> mdspan<ElementType, typename MappingType::extents_type,
              typename MappingType::layout_type>;

guide (8) 🧚

template< class MappingType, class AccessorType >
mdspan( const typename AccessorType::data_handle_type&, const MappingType&,
        const AccessorType& )                             (8) (since C++23)
    -> mdspan<typename AccessorType::element_type,
              typename MappingType::extents_type,
              typename MappingType::layout_type, AccessorType>;

this section is incomplete πŸ™ˆ β€” the page itself fr fr says: This section is incomplete / Reason: explanation. so like… the explanation is giving "coming soon" energy. we wait πŸ’€

🌈 EXAMPLE 🌈

okay so the example section is, uh, also going through it 😭:

This section is incomplete Reason: no example

no example bestie. none. zero. the vibes are immaculate but the code sample is a ghost πŸ‘».


πŸ“ CATEGORIES πŸ“

the page is filed under these, slay:

  • Todo with reason
  • Todo no example

and that's the whole page, bestie πŸ’–βœ¨ β€” cute little todo-riddled icon. it's from http://cppreference.com, stamped 2024.06.10, and honestly? it ate. periodt πŸ’…πŸ«Ά

πŸ“¦ where this page comes from