FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_concept::Iterable Concept Reference

Concept for iterable containers (has begin() and end()) More...

#include <concept.hpp>

Concept definition

template<typename T>
concept ns_concept::Iterable = std::ranges::range<T>
Concept for iterable containers (has begin() and end())
Definition concept.hpp:227

Detailed Description

Concept for iterable containers (has begin() and end())

Template Parameters
TThe type to check

Uses std::ranges::range from C++20, which properly checks for begin()/end() compatibility and sentinel types.

Example:

template<Iterable Container>
void print_all(const Container& c) {
for (const auto& item : c) { std::cout << item; }
}
Concept for standard library container types.
Definition concept.hpp:319

Definition at line 227 of file concept.hpp.