Full example for cetl::pf20::span
#include <gtest/gtest.h>
TEST(example_02_span, dynamic_span)
{
auto print = [](
const char c) {
std::cout << c; };
std::string substring{dynamic.begin(), dynamic.size()};
}
template<typename T, std::size_t Extent>
{
return os;
}
TEST(example_02_span, static_span)
{
constexpr const char* greeting = "Hello Static World";
std::cout << cetl::pf20::span<const char, 12>{greeting, 12} <<
std::endl;
}
A borrowed view into a contiguous set of objects.
Definition span.hpp:55
constexpr iterator begin() const noexcept
Iterator to the first element in the span.
Definition span.hpp:245
constexpr iterator end() const noexcept
Iterator to the address after the last element in the span.
Definition span.hpp:261
Defines a span type that is mostly compliant to ISO/IEC 14882:2020(E) but compatible with C++14 and n...