Full example for cetl/pf20/cetlpf.hpp
#include <gtest/gtest.h>
TEST(example_01_polyfill_20, span_static)
{
cetl::span<const char> dynamic{greeting.c_str(), 13};
auto print = [](
const char c) {
std::cout << c; };
}
namespace
{
template <typename T, std::size_t Extent = my_dynamic_extent>
}
TEST(example_01_polyfill_20, example_01_polyfill_20_span_dynamic)
{
my_span<const char> dynamic{greeting.c_str(), 13};
auto print = [](
const char c) {
std::cout << c; };
}
A borrowed view into a contiguous set of objects.
Definition span.hpp:55
constexpr std::size_t dynamic_extent
Used by span to indicate that the span size is not fixed.
Definition span.hpp:31
CETL polyfill header for C++20 types.
Defines a span type that is mostly compliant to ISO/IEC 14882:2020(E) but compatible with C++14 and n...