std::extents::rank(3)
π std::extents::rank π
okay so welcome to the std::extents::rank(3) page from the C++ Standard Libary manual β yes that's the manual name, and we're not fixing it, bestie, we're just vibing π
β¨
πΈ NAME πΈ
std::extents::rank - std::extents::rank
β¨ Synopsis β¨
static constexpr rank_type rank() const noexcept; (since C++23)
it returns the number of dimensions in extents. that's the whole assignment, and it ate. no cap. π«Ά
π Parameters π
(none)β literally no parameters, bestie; this function takes zero things. π
π Return value π
the number of dimensions. periodt. π
π¦ Example π¦
// Run this code
#include <iostream>
#include <mdspan>
int main()
{
std::extents<int, 1, 2> e1;
std::extents<int, 3, 4, std::dynamic_extent> e2(5);
std::cout << e1.rank() << ", " << e2.rank() << '\n';
}
π Output π
2, 3
π See also π
rank_dynamicβ returns the dynamic rank of an extents[static](public static member function)
rankβ obtains the number of dimensions of an array type(C++11)(class template)
π source/version check, bestie: http://cppreference.com, 2024.06.10, page std::extents::rank(3) β now go slay those dimensions. periodt. β¨π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms