20 template <
typename Iterator>
23 for (
auto &&x : view) {
31 int array[] = {0, 1, 2, 3, 4, 5};
33 std::array<int, 6u> std_array = {0, 1, 2, 3, 4, 5};
35 std::vector<int> vector = {0, 1, 2, 3, 4, 5};
37 std::list<int> list = {0, 1, 2, 3, 4, 5};
39 std::set<int>
set = {0, 1, 2, 3, 4, 5};
44 std::string str =
"Hello list view!";
49 ASSERT_EQ(result, str);
51 auto begin = std::begin(hello);
52 for (
char c :
MakeListView(str.begin(), str.begin() + 5u)) {
56 ASSERT_EQ(std::strcmp(hello,
"Hello"), 0);
A view over a range of elements in a container.
static void TestSequence(carla::ListView< Iterator > view)
static auto MakeListView(Iterator begin, Iterator end)