std::span::data(3)
β¨ NAME β¨
okay so this is the manual page for std::span::data from the C++ Standard Library manual, section 3 β and yes bestie, itβs literally about getting a pointer to the beginning of a sequence π
std::span::data - std::span::data
π οΈ Synopsis π οΈ
constexpr pointer data() const noexcept;
(since C++20)
Returns a pointer to the beginning of the sequence. periodt β¨
π Return value π
A pointer to the beginning of the sequence. thatβs the whole vibe π«Ά
π» Example π»
// Run this code
#include <iostream>
#include <span>
int main()
{
constexpr char str[] = "ABCDEF\n";
const std::span sp{str};
for (auto n{sp.size()}; n != 2; --n)
std::cout << sp.last(n).data();
}
π€ Output π€
ABCDEF
BCDEF
CDEF
DEF
EF
F
π See also π
constructorβ constructs aspan(public member function)
no cap, thatβs the entire page β short, sweet, and giving main character energy π
source: http://cppreference.com Β· version/date: 2024.06.10 Β· page: std::span::data(3) β mwah, bye bestie πππ¦
π¦ 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